AnsweredAssumed Answered

Erasing/filling RAM at startup

Question asked by SCOTT MILLER on Sep 25, 2018
Latest reply on Sep 26, 2018 by SCOTT MILLER

I've got a (hopefully) simple question for once:  What's the best way to zero out RAM at startup?  I'm chasing what seems to be a stack-related problem and I need to know what's actually been written to.

 

I seem to remember this being easy with the HCS08's linker parameter file.  I know you can fill non-volatile memory with the gcc linker, but that doesn't work with RAM.

 

Obviously this could be done in the startup code, but I'm not really proficient in Cortex assembly.  Is there a gdb command to do this?  Or can it be done through some other scripting mechanism?

 

Thanks,

 

Scott

Outcomes