Access Flash at runtime

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

Access Flash at runtime

522 次查看
Arpit_Jain
Contributor I

Hi.....

Is it possible to access code at run time?

How can we access code stored at flash at runtime in NXP MK60?

At what address code is store in flash, how to check that?

thank you!

0 项奖励
1 回复

516 次查看
ErichStyger
Senior Contributor V

Is it possible to access code at run time?

yes.

How can we access code stored at flash at runtime in NXP MK60?

For example:

uint32_t *p = (uint32_t*)main;
uint32_t startOfMainCode = *p;

At what address code is store in flash, how to check that?

As in above example, if you want to access the code of a known symbol/function.

Otherwise check your linker file and linker map file: You can use these symbols too. I wrote a while back an article on that topic: https://mcuoneclipse.com/2016/11/01/getting-the-memory-range-of-sections-with-gnu-linker-files/

I hope this helps,

Erich

0 项奖励