Relocating .rodata

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

Relocating .rodata

Jump to solution
900 Views
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

Labels (1)
Tags (1)
0 Kudos
Reply
1 Solution
670 Views
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

 

 

View solution in original post

0 Kudos
Reply
1 Reply
671 Views
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 Kudos
Reply