code warrior load my .data at VMA instead of LMA

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

code warrior load my .data at VMA instead of LMA

1,420件の閲覧回数
farozeibnejava
Contributor III

 

i want to load my .data in flash instead of ram using code warrior eclipse IDE. here is the scenario.

.data : { *(.data); } > ram AT> flash 

now, all address are correctly generated (LMA and VMA) but code warrior load .data at VMA instead of LMA. how can i change this setting.

ラベル(1)
0 件の賞賛
返信
1 返信

1,256件の閲覧回数
Carlos_Musich
NXP Employee
NXP Employee

Hi!

.data section is always loaded by default in flash (LMA) and the it is copied in runtime to RAM (VMA). You must not keep this section in flash because you will not be able to write the variables, just read them. The correct way to do this is next:

.data : AT(__flashAddress)

{

*(.data);

} > ram

In this case the instruction 'AT' indicates that section .data is going to be loaded in the flash addres indicated by label '__flashAddress' (LMA) and '> ram' indicates that it is being linked in segment ram (VMA).

Hope this helps,

Carlos

0 件の賞賛
返信