Relocating .rodata

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

Relocating .rodata

跳至解决方案
901 次查看
Nik
Contributor III

I need to relacate constant data like:

 

 

const byte geh_interface[18] = { 18, 0x3, 'H',0, 'I',0, 'D',0, '-',0, 'L',0, 'E',0, 'D',0, 's',0 };

 

and I see that it places it:
geh_interface                             862B      12      18       1   .rodata

 

How can I relocate read only data?

 

Thanks,

Robert

标签 (1)
标记 (1)
0 项奖励
回复
1 解答
671 次查看
Nik
Contributor III

I may have answerd this myself:

 

in SECTIONS

 

Bootloader               =   READ_ONLY    0xD000 TO 0xFFAD;


in Placement

Bootloader_CONST INTO  Bootloader;

 

In code:

#pragma CONST_SEG Bootloader_CONST

 

 

在原帖中查看解决方案

0 项奖励
回复
1 回复
672 次查看
Nik
Contributor III

I may have answerd this myself:

 

in SECTIONS

 

Bootloader               =   READ_ONLY    0xD000 TO 0xFFAD;


in Placement

Bootloader_CONST INTO  Bootloader;

 

In code:

#pragma CONST_SEG Bootloader_CONST

 

 

0 项奖励
回复