Hi,there
I am developing with mcu:MKL17Z128VLH4, I tried KL43 too.
How to jump to another image in the internal flash?
description:
1, burn project A to the mcu, this image locates at 0x00000 address.
2, burn project B to the mcu, this image locates starting at 0x0F000 address for example.
3, when project A run, this project trys to jump to project B image, just like the bootloader in ROM, but failed.
source code:
// Variables
uint32_t runBootloaderAddress;
void (*runBootloader)(void * arg);
// Read the function address from the ROM API tree.
//runBootloaderAddress = **(uint32_t **)(0x1c00001c);
runBootloaderAddress = **(uint32_t **)(0x2001c);
//runBootloaderAddress = **(uint32_t **)(0x1c);
runBootloader = (void (*)(void * arg))runBootloaderAddress;
// Start the bootloader.
runBootloader(NULL);
Maybe I used wrong address? But I put the image B at 0x20000.(0x20000 tried, also failed)
Why failed? or How to jump to another image of the internal Flash?