AutoLoad Code in RAM

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

AutoLoad Code in RAM

跳至解决方案
1,496 次查看
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 项奖励
回复
1 解答
1,305 次查看
Rick_Li
NXP Employee
NXP Employee
0 项奖励
回复
3 回复数
1,305 次查看
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 项奖励
回复
1,306 次查看
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 项奖励
回复
1,305 次查看
brunopaillard
Contributor III

Thanks Rick!

0 项奖励
回复