How to change the Flash memory start address of the code in the NXP_Kinetis_Bootloader_2_0_0

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to change the Flash memory start address of the code in the NXP_Kinetis_Bootloader_2_0_0

889 Views
durgasivakrishn
Contributor III

Hi,

    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?

pastedImage_3.png

After upgrading my user application code.hex it is like below image

pastedImage_4.png

0 Kudos
1 Reply

830 Views
jingpan
NXP TechSupport
NXP TechSupport

Hi Durga,

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.

Regards,

Jing

0 Kudos