MPC5744P

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

MPC5744P

Jump to solution
3,332 Views
1121146885
Contributor II

请教一些各位大神,MPC5744P中,如何使得在软件复位后指定RAM分区里的数据不丢失?

in MPC5744P,

How to make the data in the specified RAM partition not lost after the software reset?

1 Solution
2,769 Views
jiri_kral
NXP Employee
NXP Employee

Hi, 

Normally after reset are uninitialized variables set to 0 by startup code. You can put your variables into .noinit section. In this case variables will be skipped out from setting to 0:

__attribute__ ((section(".noinit"))) uint16_t my_global_array[100];

Jiri

View solution in original post

3 Replies
2,770 Views
jiri_kral
NXP Employee
NXP Employee

Hi, 

Normally after reset are uninitialized variables set to 0 by startup code. You can put your variables into .noinit section. In this case variables will be skipped out from setting to 0:

__attribute__ ((section(".noinit"))) uint16_t my_global_array[100];

Jiri

2,769 Views
1121146885
Contributor II

hello sir,

         more question to me, my aim is to define a bootloader_start_var __, I jut use  __attribute__ ((section(".noinit")))  to define my var didn't work, I found there is't  .noinit section in the 57xx_flash.ld.     

          Do i  need to define the .noinit section in the .ld files? should I do something in the file startup.s?

          I am a totally newbies, thanks for your time!

0 Kudos
Reply
2,769 Views
1121146885
Contributor II

Oh!Thank you so much,my friend! 

0 Kudos
Reply