Constants Into ROM

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

Constants Into ROM

跳至解决方案
1,152 次查看
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

标签 (1)
标记 (1)
0 项奖励
回复
1 解答
937 次查看
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 项奖励
回复
1 回复
938 次查看
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 项奖励
回复