Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

Differentiating XDATA contents from CODE contents in the hex file (8051 target)

Ram
2013-11-14
2013-11-16
  • Ram
    Ram
    2013-11-14

    Hello,

    I am compiling some code for the 8051 where some (constant) arrays are marked as __xdata. These naturally are placed in external memory.

    SDCC (does not generate a binary ? but) generates a hex file in intel hex format. As far as I know, intel hex cannot describe memory contents of separate memories. This is problematic because both CODE and XDATA range from 0-xFF...

    How will the loader know which parts of the hex file go to XDATA and which to CODE?

    Any advice is greatly appreciated. Thanks.

    Note: I technically can place constants in CODE, but there are code size issues.

     
  • Maarten Brock
    Maarten Brock
    2013-11-16

    Please don't double-post.