MPC5744P

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决
3,327 次查看
1121146885
Contributor II

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

in MPC5744P,

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

1 解答
2,764 次查看
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

在原帖中查看解决方案

3 回复数
2,765 次查看
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,764 次查看
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 项奖励
回复
2,764 次查看
1121146885
Contributor II

Oh!Thank you so much,my friend! 

0 项奖励
回复