perrystg - 2011-09-03

I’d like to force all constant program data like:

  __code Byte TCvrt = {77,23,30,39,52,65,80, 94,103,104, 96,82,62,45,30};

to lower half of the flash. The reason is to allow playing with MCU upper code pages (MOVC access) without worrying about access to this constant data declared in the program.

Currently the linker places it after the CSEG which is way above 0x7FFF.  I tried linker option: "-Wl -b CONST = 0x1000" but linker still places it after CSEG. If I force CSEG to start higher example: "-Wl -b CSEG= 0x1800" then it works. But I will always have to check and set it manually in case CONST grows larger, not to mention wasted space.

Anyone know a better way to do this?

Many thanks.