sk14x Filling unused memory

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

sk14x Filling unused memory

2,063 Views
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.

0 Kudos
Reply
6 Replies

1,930 Views
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

1,930 Views
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

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

1,930 Views
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 

1,930 Views
wujiabin
Contributor II

thanks jiri, very helpful!

0 Kudos
Reply

1,930 Views
wujiabin
Contributor II

Thanks Jiri, it helps.

0 Kudos
Reply