MPC5744P

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 
3,324件の閲覧回数
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,761件の閲覧回数
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,762件の閲覧回数
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,761件の閲覧回数
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,761件の閲覧回数
1121146885
Contributor II

Oh!Thank you so much,my friend! 

0 件の賞賛
返信