Menu

#57 Ability to locate segments arbitrarily in code memory

closed
None
5
2005-07-19
2004-01-19
No

With the Keil Compiler linker, it is possible to specify the
absolute memory address of a code segment for a specific
function call. This is useful when setting aside a region of
code memory for a seperate piece of code such as a
bootloader, whose address you wish to specify explicitly.

For example, the Keil linker directive

CODE(?PR?*?OSOverwrite(0x7800))

will place the OSOverwrite() function at adress 0x7800 in
code space.

Would it be feasible to implement a similar option in the
sdcc linker?

Discussion

  • Maarten Brock

    Maarten Brock - 2005-05-16
    • assigned_to: nobody --> maartenbrock
     
  • Maarten Brock

    Maarten Brock - 2005-07-19
    • status: open --> closed
     
  • Maarten Brock

    Maarten Brock - 2005-07-19

    Logged In: YES
    user_id=888171

    This is now possible in SDCC 2.5.1 #1061.
    You use the command line option --codeseg MYSEG when
    compiling or pragma codeseg MYSEG inside the source to
    specify the name of the code segment. Then when linking
    you use -Wl-b MYSEG=0x7800 to set the start address of
    this segment.

    Maarten

     

Log in to post a comment.