sk14x Filling unused memory

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

sk14x Filling unused memory

2,138 次查看
wujiabin
Contributor II

Hi all. I am using s32ds for projects development. For safety reasons, the unused/remaining ROM must be filled. From other threats I've learned that the remaininngs will be flashed with 0xFF by default.  Questions are: 1, will all  the unused cells be filled? 2, whats the conquence of 0xFF, I mean, what wouldhappen if the pointer accidently jump to it?

much thanks in advance!

  Jiabin.

标记 (3)
0 项奖励
回复
6 回复数

2,005 次查看
ErichStyger
Specialist I

By default erased flash cells have the value of 0xff.

For safety reasons I do fill memory with a predefined pattern to catch error cases easier.

See FILLing unused Memory with the GNU Linker | MCU on Eclipse  how to do this with the linker.

I hope this helps,

Erich

2,005 次查看
jiri_kral
NXP Employee
NXP Employee

Hi, 

empty ROM has 0xFF value. Prior programming is performed mass erase - all Flash is set to 0xFF. 

If program jumps into unused memory - program ends in exception because of unknown instruction. 

You may find helpful this thread - https://community.nxp.com/message/1234820?commentID=1234820#comment-1234820   

Jiri

2,005 次查看
wujiabin
Contributor II

Hi Jiri, 

by "ends in exception" you mean, no software restart or  something, just stop there and wait for power-on-reset?

0 项奖励
回复

2,005 次查看
jiri_kral
NXP Employee
NXP Employee

Hi, 

program ends in exception handler - which is by default infinite loop with no instructions. You need to reset board (or wait for watchdog - if it is enabled)

Jiri 

2,005 次查看
wujiabin
Contributor II

thanks jiri, very helpful!

0 项奖励
回复

2,005 次查看
wujiabin
Contributor II

Thanks Jiri, it helps.

0 项奖励
回复