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!
yes.
For example:
uint32_t *p = (uint32_t*)main; uint32_t startOfMainCode = *p;
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