Access Flash at runtime

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Access Flash at runtime

515件の閲覧回数
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 返信

509件の閲覧回数
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 件の賞賛