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

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

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

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

967 Views
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 Kudos
Reply