How to put constants into ROM?
(CW 6.3 SE, Coldfire 51MM256)
The help-file says to use "#pragma INTO_ROM" but the compiler rejects this as an " illegal pragma."
Help-file also suggests "-Cc: Allocate Constant Objects into ROM" but I can't see how to do this.
The 'Standard Settings: menu (completely changed from last time I saw it, BTW) has no place under 'Coldfire Linker' to make this change.
Wade Hassler
Solved! Go to Solution.
Hello,
by default, constants with the ColdFire compiler are already in ROM. You should be able to verify this if you enable the linker map file (in the linker output options).
The pragma INTO_ROM and the option -Cc are not for the ColdFire compiler, but for the HCS08 one. That's why they are not accepted by the ColdFire compiler. And INTO_ROM and -Cc for the S08 compiler are only for the HIWARE object file format (a proprietary and legacy object file format). For ELF/Dwarf which is a standard and the default these option and pragma are not needed.
Hope this helps,
BK
Hello,
by default, constants with the ColdFire compiler are already in ROM. You should be able to verify this if you enable the linker map file (in the linker output options).
The pragma INTO_ROM and the option -Cc are not for the ColdFire compiler, but for the HCS08 one. That's why they are not accepted by the ColdFire compiler. And INTO_ROM and -Cc for the S08 compiler are only for the HIWARE object file format (a proprietary and legacy object file format). For ELF/Dwarf which is a standard and the default these option and pragma are not needed.
Hope this helps,
BK