Constants Into ROM

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Constants Into ROM

Jump to solution
787 Views
WadeH
Contributor III

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

Labels (1)
Tags (1)
0 Kudos
Reply
1 Solution
572 Views
BlackNight
NXP Employee
NXP Employee

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

View solution in original post

0 Kudos
Reply
1 Reply
573 Views
BlackNight
NXP Employee
NXP Employee

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

0 Kudos
Reply