Hi
Your code looks good - it is basically the same as that used in the uTasker boot loader (for Ethernet based firmware updates on M5223X).
However the start address seems a little strange.
The FLASH has 2k sectors so the first sectors start at
0x00000000
0x00000800
0x00001000
0x00001800
etc.
If you are putting you application to 0x00001200 it is 512 bytes into the third FLASH sector.
You say this is directly after by the boot loader.
Is it possible that your loader is deleting the FLASH which it will be programmed to beforehand and then also deleting the last few bytes of the boot loader, which then fails to jump to the new code since it has been removed?
Or is it possible that the boot loader has grown slightly and is now overlapping with the new code (resulting in corrupted values at the start of the new code location?
Starting the application in its own FLASH sector (0x00001800) may be suitable.
Regards
Mark
www.uTasker.com