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

STRING (XDATA)

Hi All,

Target : ST Micro uPSD3354V

I have a number of (implicit) strings in my application that I want to move from CODE space to XADATA as I am approaching the 64KB threshold, and I do not want to move to code banking.

So I tried using STRING (XDATA) to force my implicit strings into XDATA rather than CODE. Everything compiled and linked no problems, but my application now does nothing! If I change nothing except remove the compile option STRING (XDATA) all is well once more.

With STRING (XDATA) in place I try and launch my debugger only to be told that the loaded app does not match what's in ROM and so I cannot debug the problem (at the moment).

Does anyone have any pearls of wisdom they wish to pass on regarding this scenario? Is there some deeper issue I am missing regarding the use of STRING (XDATA)? Is there an alternative strategy for getting my implicit strings out of CODE and into XDATA?

Any help appreciated.

Andy Atkinson

Parents
  • You must use the LX51 Linker to link program that use string(xdata). The strings are located in XDATA by the compiler and the linker stores them in the object file output in the xdata space.

    You'll need to get the strings from the output object file and into your target system. You may need to generate a HEX file containing the string/xdata memory and another HEX file containing the CODE memory.

    Typically, when you do this, you use a ROM that you map into the XDATA memory space.

    Hope this helps.

    Jon

Reply
  • You must use the LX51 Linker to link program that use string(xdata). The strings are located in XDATA by the compiler and the linker stores them in the object file output in the xdata space.

    You'll need to get the strings from the output object file and into your target system. You may need to generate a HEX file containing the string/xdata memory and another HEX file containing the CODE memory.

    Typically, when you do this, you use a ROM that you map into the XDATA memory space.

    Hope this helps.

    Jon

Children