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?
Someone has any idea what's happens?
My C Startup code
why is it 'special'?
what happens if you use the regular startup.a51?
Erik
This startup code: -choices 1 from 2 firmwares, check it and run it; -turns power supply on or not; -initializes bank switch; -... When all is ok, then jump to ?C_START in order to initialize variables and run main().
I'll test with startup.a51.
I give up. There are so many errors when I put Startup.A51 on project...
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.