I am trying to flash my NXP device (MK66FN2M0VLQ18) using NXP_Kinetis_Bootloader_2_0_0, I am trying to divide the Flash into two sectors. In the first sector Boot code (NXP_Kinetis_Bootloader_2_0_0 (flashloader)) will be residing and In the second sector User Application code has to sit. I am using KinetisFlashTool GUI for upgrading the firmware(User Application code.hex) in the second region of flash. For this below are the sizes of the codes.
NXP_Kinetis_Bootloader_2_0_0 (flashloader) -----> 0x0001C75C
User Application code -----> 0x00007C6E
First I am flashing the NXP_Kinetis_Bootloader_2_0_0 (flashloader) and power OFF the device and again powered ON now the NXP_Kinetis_Bootloader_2_0_0 (flashloader) code is running successfully and when I connect the GUI it is connecting to the GUI and all the details are displaying. When I trying to upgrade my User Application code .hex using GUI is it not upgrading it is displaying
Error: Update image failed(kStatusMemoryRangeInvalid).
Update process is stopped by error.
What are the changes that need to do in the User Application code and NXP_Kinetis_Bootloader_2_0_0 (flashloader) codes?
After upgrading my user application code.hex it is like below image
It seems this is a space conflict problem. In the status information which you read back from target board, the reserved flash is from 0 to 0xAFFF. But the code size is 0x1c75c(why is it so big?). So, the bootloader can't write application from 0xb000.