MIMXRT1170-EVKB OTA Update Example

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

MIMXRT1170-EVKB OTA Update Example

1,682 Views
MichaelC_Future
Contributor II

Trying to follow the example for OTA Updates on the MIMXRT1170-EVKB.

What has been done so far:

Followed the instructions in both readme files.

Install Bootloader – console output from sbl is attached, sbl-console.txt

Confirms that the Bootloader is installed, Reset start the Bootloader

  • hello sbl.
  • Disabling flash remapping function
  • Bootloader Version 1.10.0
  • Image 0 Primary slot: Image not found
  • Image 0 Secondary slot: Image not found
  • No slot to load for image 0
  • Unable to find bootable image

Python command to build the signed application binary:

python imgtool.py sign --key C:\nxp\IMXRT\SDK_2_15_100_MIMXRT1170-EVKB\boards\evkbmimxrt1170\ota_examples\mcuboot_opensource\cm7\keys\sign-rsa2048-priv.pem --align 4 --header-size 0x400 --pad-header --slot-size 0x200000 --max-sectors 800 --version "1.10.0" C:\Users\geo15\Documents\MCUXpressoIDE_11.9.0_2144\workspace\evkbmimxrt1170_ota_mcuboot_server_enet\Release\evkbmimxrt1170_ota_mcuboot_server_enet.bin evkbmimxrt1170_ota_mcuboot_server_enet_signed.bin

Memory configuration for the application is in attached Memory Details.png.

Downloaded the signed binary to flash – console output is attached, sever_enet-signed_console.txt

Execute a reset and the Bootloader should install application, but no bootable image is found.

Reset starts the Bootloader

  • hello sbl.
  • Disabling flash remapping function
  • Bootloader Version 1.10.0
  • Image 0 Primary slot: Image not found
  • Image 0 Secondary slot: Image not found
  • No slot to load for image 0
  • Unable to find bootable image

Could there be an issue with the memory locations or commands?

0 Kudos
Reply
5 Replies

1,661 Views
Gavin_Jia
NXP TechSupport
NXP TechSupport

Hi @MichaelC_Future ,

Thanks for contacting NXP tech support.

I am glad to provide service for you. By reviewing your procedure, I found two problems.

1. sign image. For the main application running in Flash, which is the http_server, padding is required. Please add --pad --confirm

imgtool sign --key sign-rsa2048-priv.pem --align 4 --header-size 0x400 --pad-header --slot-size 0x200000 --max-sectors 800 --version "1.0.0" server_v1_orginal.bin server_v1_signed_pad.bin --pad --confirm

 

2. The IDE loads the main app's image to 0x30040400 by default, but we need to load it to 0x30040000 after padding, to be consistent with the mcu_boot project.

// jlink commander

r
h
loadfile server_v1_signed_pad.bin 0x30040000

 

The steps after that are to change the IPV4 address and ensure that you ping 192.168.0.102 address.

I've also attached my image file for your reference.

Gavin_Jia_0-1717575703933.pngGavin_Jia_1-1717575733437.png

Gavin_Jia_2-1717575766182.png

 

 

Best regards,
Gavin

0 Kudos
Reply

1,655 Views
Gavin_Jia
NXP TechSupport
NXP TechSupport

Amendment:

IPV4 address should be 192.168.0.100 , not 101

0 Kudos
Reply

1,618 Views
MichaelC_Future
Contributor II

Hi @Gavin_Jia ,

Made the changes suggested and the results were mixed. Started over with the project. Attached the console messages from flashing each binary.

 

Removed the existing project and imported evkbmimxrt1170_ota_mcuboot_server_enet from SDK_2_15_100_MIMXRT1170-EVKB (updated the memory location as suggested by NXP).

           Built the project and created the binary.

           Created the signed binary with padding, used the updated Python command to build the binary.

 

python imgtool.py sign --key C:\nxp\IMXRT\SDK_2_15_100_MIMXRT1170-EVKB\boards\evkbmimxrt1170\ota_examples\mcuboot_opensource\cm7\keys\sign-rsa2048-priv.pem --align 4 --header-size 0x400 --pad-header --slot-size 0x200000 --max-sectors 800 --version "1.0.0" C:\Users\geo15\Documents\MCUXpressoIDE_11.9.0_2144\workspace\evkbmimxrt1170_ota_mcuboot_server_enet\Release\evkbmimxrt1170_ota_mcuboot_server_enet.bin evkbmimxrt1170_ota_mcuboot_server_enet_signed_pad.bin --pad –confirm

 

The Bootloader finds a candidate but nothing happens when Reset.

Message on the terminal during flashing - Geosonics binary,

Booting the primary slot - flash remapping is disabled

hello sbl.

Disabling flash remapping function

                                  Bootloader Version 1.10.0

Primary   slot: version=1.0.0+0

Image 0 Secondary slot: Image not found

Found a candidate in slot 0

                           writing copy_done; fa_id=0 off=0x1fffe0 (0x23ffe0)

Image 0 loaded from the primary slot

Bootloader chainload address offset: 0x40000

Reset_Handler address offset: 0x40400

Jumping to the image

 

After Reset

 

Booting the primary slot - flash remapping is disabled

                                                      hello sbl.

Disabling flash remapping function

                                  Bootloader Version 1.10.0

Primary   slot: version=1.0.0+0

Image 0 Secondary slot: Image not found

Image 0 loaded from the primary slot

Bootloader chainload address offset: 0x40000

Reset_Handler address offset: 0x40400

Jumping to the image

 

Booting the primary slot - flash remapping is disabled

 


 

Using the binary NXP sent works as expected.

 

Message on the terminal - NXP binary

 

Booting the primary slot - flash remapping is disabled

hello sbl.

Disabling flash remapping function

Bootloader Version 1.10.0

Primary   slot: version=1.0.0+0

Image 0 Secondary slot: Image not found

Found a candidate in slot 0

writing copy_done; fa_id=0 off=0x1fffe0 (0x23ffe0)

Image 0 loaded from the primary slot

Bootloader chainload address offset: 0x40000

Reset_Handler address offset: 0x40400

Jumping to the image

After Reset

Booting the primary slot - flash remapping is disabled

Initializing PHY...

V1V1V1...

************************************************

mbedTLS HTTPS Server example

************************************************

 IPv4 Address     : 192.168.0.102

 IPv4 Subnet mask : 255.255.255.0

 IPv4 Gateway     : 192.168.0.100

************************************************

0 Kudos
Reply

1,592 Views
Gavin_Jia
NXP TechSupport
NXP TechSupport

Hi @MichaelC_Future ,

During my previous test I used the same project:ota_mcuboot_server_enet, only changed to two prints V1 and V2.

After flashing V1 via JLink, mcuboot will boot V1, then upload the image file of V2 via the web side, after that, click Reboot on the web side, you can see that they swap, and this time the image of V2 is booted.

I didn't quite figure out your testing process, can you help clarify?

Best regards,
Gavin

0 Kudos
Reply

1,470 Views
MichaelC_Future
Contributor II

Hi @Gavin_Jia,

I spoke with the engineer and the short answer to this problem was operator error, see below.

One other question is why your OTA Update page is different from the one that was generated?

Your OTA Update is Running in test mode and the generated version is Permanent only.  

"Reviewed the initial response from you and discovered that the image was not loading because the BOARD_FLASH location was incorrectly changed to 0x30040000. 

MichaelC_Future_0-1718044907697.png

The Target Flash location should have been changed to 0x30040000 instead of the BOARD_FLASH location.

MichaelC_Future_1-1718044907699.png

After fixing the BOARD_FLASH location and changing the Target Flash Base Address the Primary Slot booted Version 1.10.0

hello sbl.

Disabling flash remapping function

Bootloader Version 1.10.0

Primary   slot: version=1.10.0+0

Secondary slot: version=1.11.0+0

Found a candidate in slot 0

writing copy_done; fa_id=0 off=0x1fffe0 (0x23ffe0)

Image 0 loaded from the primary slot

Bootloader chainload address offset: 0x40000

Reset_Handler address offset: 0x40400

Jumping to the image

Booting the primary slot - flash remapping is disabled

Initializing PHY...

************************************************

mbedTLS HTTPS Server example

************************************************

IPv4 Address     : 192.168.0.102

IPv4 Subnet mask : 255.255.255.0

IPv4 Gateway     : 192.168.0.100

************************************************

Updated the Target Flash Base Address and the Secondary Slot booted Version 1.11.0

MichaelC_Future_2-1718044907700.png

hello sbl.

Disabling flash remapping function

Bootloader Version 1.10.0

Primary   slot: version=1.10.0+0

Secondary slot: version=1.11.0+0

Found a candidate in slot 1

writing copy_done; fa_id=1 off=0x1fffe0 (0x43ffe0)

Image 0 loaded from the secondary slot

Bootloader chainload address offset: 0x240000

Reset_Handler address offset: 0x240400

Jumping to the image

Booting the secondary slot - flash remapping is enabled

 Initializing PHY...

************************************************

mbedTLS HTTPS Server example

************************************************

IPv4 Address     : 192.168.0.102

IPv4 Subnet mask : 255.255.255.0

IPv4 Gateway     : 192.168.0.100

************************************************

MichaelC_Future_3-1718044907701.png"