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

I need to move the C Library functions to a different memory area

Hi,

I've got a program getting the startup code to locate in the proper place because its being displaced by the C Lib module

Here's a mapfile snippet

* * * * * * * * * * *   C O D E   M E M O R Y   * * * * * * * * * * * * *
000000H   000002H   000003H   BYTE   OFFS..   CODE           ?C_CPURESET?0
000003H   000022H   000020H   ---    ---      **GAP**
000023H   000025H   000003H   BYTE   OFFS..   CODE           ?SYS_SERIAL0?00023
000026H   003FFFH   003FDAH   ---    ---      **GAP**
004000H   004176H   000177H   BYTE   UNIT     CODE           ?C?LIB_CODE
004177H   0042A9H   000133H   BYTE   UNIT     CODE           ?C_C51STARTUP
0042AAH   0042BEH   000015H   BYTE   UNIT     CODE           ?C_INITSEG

And the memory map:
BASE        START       END         USED      MEMORY CLASS
==========================================================
X:000000H   X:00A000H   X:00FFFFH   00078BH   XDATA
X:000000H   X:020000H   X:03FFFEH   000401H   HDATA
C:000000H   C:004000H   C:009FFFH   0002C5H   CODE
C:000000H   C:010000H   C:01FFFFH   0007C1H   ECODE
C:000000H   C:004000H   C:00DFFFH             HCONST
I:000000H   I:000000H   I:0000FFH   000001H   IDATA
I:000000H   I:000000H   I:00007FH   000018H   DATA

I need to get the C51Startup module to 0x4000

I'm using a slightly altered version of the auto-generated startup.a51. The alterations are fairly trivial, no new segments.

I have tried appending the segment declaration of C51Startup with 'at 0x4000' and the linker really does not appreciate it.

The best I've managed like that is to get the CINIT_SEG to locate at 0x4000 then came CLIB, etc...

Yesterday I managed to fudge things by declaring ECODE from 0x4000 and moving the CODE area somewhere else but this didn't seem to be a good idea in the long run. Also can't replicate it now (...and before anyone says I know I should have taken copy when it was working...How many years have I been doing this!)

Anyway cheers for any help

Bernard

Bernard

0