how to write in no init ram for sharing in boot and application code

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

how to write in no init ram for sharing in boot and application code

984 次查看
hari3
Contributor I

i have using lpc54628 and i am developing boot and application code. i have decalred a variable in ram region which is portioned for 1k in application code and using extern if i fetch from boot code it shows undefined reference to the flag, i want to know how to add a variable to no init ram and share the  variable between boot and application code and how to use that variable in boot code.memory_nxp_boot.png

nxp_bootmap.png

0 项奖励
回复
1 回复

968 次查看
ZhangJennie
NXP TechSupport
NXP TechSupport

Hi @hari3 

Please follow below steps you will make it.

1. Create a separate RAM_0 (RAM5) in MCU setting

ZhangJennie_0-1738044709398.png

2. Set RAM_0 as .noinit

ZhangJennie_1-1738044760395.png

Then build the project.

3. Define gloabl variables g_val in this NOINIT section.

ZhangJennie_2-1738044893874.png

4. execute download code to Flash -> run code -> reset -> step over run. You will see g_val not initialize 

ZhangJennie_3-1738045214244.png

 

Hope this helps,

Jun Zhang

 

0 项奖励
回复