Hi Amey,
Please check start12z.c and start12z.h file in your project/Project Settings/Startup_Code.
This structure is used for initialize RAM prior start main() routine. The default bare metal project execute _Startup() function after reset. This _Startup() function will erase and initialize RAM.
Note: If you use ProcessorExpert, the reset vector points to _EntryPoint() instead of _Startup() .
Startup code is placed by linker, therefore location of this code could vary according linker settings and your project size.
Note: prm linker file is in your project/Project Settings/Linker_Files.
You could try for example specifying some part of RAM and filling them by some pattern. For example:
RAM3 = READ_WRITE 0x003000 TO 0x003FFF FILL 0x33;
In that case startup code will initialize this part of RAM prior enter into main() function.
The similar way you could also copy some code from flash into RAM (RELOCATE_TO).
See "c:\Freescale\CW MCU v10.6\MCU\Help\PDF\MCU_Build_Tools_Utilities.pdf" document for more details.
I hope it helps you.
Have a great day,
RadekS
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------