Dear Sirs,
My C Startup code is written in assembly and has those lines (copied from HARDCHA.LST):
------ 1803 ?PR?STARTUP1?HARDWARE_DRV_CH_ASM SEGMENT CODE ------ 1804 RSEG ?PR?STARTUP1?HARDWARE_DRV_CH_ASM ... 00013A 020000 E 2212 LJMP ?C_START
LX51 linker shows:
*** ERROR L121: IMPROPER FIXUP MODULE: .\Temp\HarDCha.obj (?HARDWARE_DRV_CH_ASM) SEGMENT: ?PR?STARTUP1?HARDWARE_DRV_CH_ASM OFFSET: 00013BH
The map file has:
MEMORY MAP OF MODULE: .\Temp\TP_KIca.a03 (KERNEL) START STOP LENGTH ALIGN RELOC MEMORY CLASS SEGMENT NAME ========================================================================= * * * * * * * * * * * C O D E M E M O R Y * * * * * * * * * * * * * *** CODE BANK 0 *** 002700H 00277FH 000080H BYTE UNIT CODE/B0 ?C_C51STARTUP ... *** COMMON AREA *** 001A68H 001BADH 000146H BYTE UNIT CODE ?PR?STARTUP1?HARDWARE_DRV_CH_ASM ... PUBLIC SYMBOLS OF MODULE: .\Temp\TP_KIca.a03 (KERNEL) VALUE CLASS TYPE PUBLIC SYMBOL NAME ================================================= 0080273BH CODE/B0 --- ?C_START
Why this error happens? I'm using LJMP and LX51 can put a 16 bit address on 13BH address.
What's a meanning of "E" letter after 020000 on HARDCHA.LST?
Yes.
LX51 User's Guide: GENERAL: LOCATING IMPROPER FIXUP INSTRUCTIONS:
CAUSE A fixup error is generated when it is impossible to generate an instruction address that reaches an operand. This is frequently the case with instructions that implement relative jumps or branches. Typically, improper fixups are caused by in-line assembly code that attempts to access an address that is too far away. LX51 can put destination address (273BH) on 2 byte of LJMP operand (address ?PR?STARTUP1?HARDWARE_DRV_CH_ASM + 013BH).