string constants in XDATA

Hi,
In an attempt to free some code space, I'm looking at a couple of options;

a) preventing the compiler from automatically placing all string constants in the common code area (regardless of in which banks the strings are used) or

b) locating all string constants in XDATA. I gather I'll need to use OMF2 and STRING and maybe XCROM directives (and LX51). I'm missing something obvious with this option though, since the initialisation strings for these constants will have to be somewhere within the code, so where does the saving occur?

Has anyone experience or recommedations with either of these approaches?

Thanks,

David

Parents
  • String constants in XRAM won't help you at all---XDATA is erased by power-cycling, so somewhere in the initialization code, there will have to be a master copy of that constant to generate the XRAM contents are reset time.

    Which of course means you've now come round full-circle and again have a string constant that the compiler has to store somewhere in CODE space...

Reply
  • String constants in XRAM won't help you at all---XDATA is erased by power-cycling, so somewhere in the initialization code, there will have to be a master copy of that constant to generate the XRAM contents are reset time.

    Which of course means you've now come round full-circle and again have a string constant that the compiler has to store somewhere in CODE space...

Children
More questions in this forum