This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Help on Improper fixup

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?

Parents Reply Children
  • You keep adding info a little bit at a time.
    Special startup, that you did not Post.
    Banking?
    Selecting different firmware? How are you compiling that?

    Are you starting this from scratch or modifying some other project?

    How can using the compiler supplied startup cause errors?

  • Banking?
    Yes, 2 banks

    Selecting different firmware? How are you compiling that?
    There is only 1 firmware to compile. The other one came with remote download, loaded on other memory area and startup changes to new version.

    Are you starting this from scratch or modifying some other project?
    From begining years ago.

    How can using the compiler supplied startup cause errors?
    My startup has a lot of functions, it isn't a simple startup like the Keil one. When I change it with Keil startup, I must create fake function, segments, variables and so on.

  • "My startup has a lot of functions, it isn't a simple startup like the Keil one. When I change it with Keil startup, I must create fake function, segments, variables and so on."

    Sounds like a classic "you are doing it wrong".

  • Going back to your original posting:

    "What's a meanning of "E" letter after 020000 on HARDCHA.LST?"

    As far as I can remember, the E signifies that it is an external reference that must be satisfied and filled in by the linker.

    Have you tried placing the ?C_C51STARTUP module in the common area as opposed to a banked area?

  • Have you tried placing the ?C_C51STARTUP module in the common area as opposed to a banked area?
    BINGO!!! It works now.

    Thanks a lot, IB Shy :)

    To everyone else, thanks for your help, too.