AutoLoad Code in RAM

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

AutoLoad Code in RAM

Jump to solution
621 Views
brunopaillard
Contributor III

Hi

I am working on the MK22FN512VLH12 using Processor Expert. I am trying to run code from RAM. That code is intended to initiate Flash operations (erase, reprogram), without limitation on the Flash block that is being manipulated.

For that I need to have that code automatically loaded into RAM. The JTAG debugger has no difficulty loading code into RAM. But for this to work in real life I need a way for that code to be loaded into RAM, from Flash, at startup.

Is there a way to direct the startup __copy_rom_sections_to_ram() function to load code, in addition to the initialized variables into RAM at startup?

Thanks

Bruno

0 Kudos
1 Solution
430 Views
Rick_Li
NXP Employee
NXP Employee
0 Kudos
3 Replies
430 Views
brunopaillard
Contributor III

Last minute: Specifying that the specified code resides in the .data section seems to work. Is there a more elegant solution?

The Processor Expert linker file is designed by default to auto-load everything that is in the .data section using the __copy_rom_sections_to_ram() function

Thanks

Bruno

0 Kudos
431 Views
Rick_Li
NXP Employee
NXP Employee

Hi Bruno,

could you please refer to AN4329 which is available at:

http://cache.freescale.com/files/soft_dev_tools/doc/app_note/AN4329.pdf

0 Kudos
430 Views
brunopaillard
Contributor III

Thanks Rick!

0 Kudos