Update image of signed application Fails for lwip_httpsrv_ota_enet demo on EVK-MIMXRT1064

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

Update image of signed application Fails for lwip_httpsrv_ota_enet demo on EVK-MIMXRT1064

Jump to solution
1,370 Views
ulivinico1
Contributor II

I'm testing the demo lwip_httpsrv_ota_enet on EVK-MIMXRT1064.

First, I've downloaded mcuboot_opensource and executed Bootloader Version 1.7.2

Then I run the demo lwip_httpsrv_ota_enet successfully, I give the command 'jump ResetISR' and the terminal displays the following:


Initializing PHY...

************************************************
mbedSSL HTTPS Server example
************************************************
IPv4 Address : 192.168.0.102
IPv4 Subnet mask : 255.255.255.0
IPv4 Gateway : 192.168.0.100
************************************************

Then, with a web browser I connect to https://192.168.0.102 

I see the main web page of the example and I can upload a bin file. 

I make signed application image (i.e. of Hello_world) of a bin file with the command

python imgtool.py sign --key sign-rsa2048-priv.pem --align 4 --header-size 0x400 --pad-header --slot-size 0x200000 --max-sectors 800 --version "1.0" hello_world.bin hello_world_SIGNED.bin

I obtain the signed file hello_world_SIGNED.bin

I upload that file from the web page button and I can read from serial

store_update_image: processed 14044 bytes
store_update_image: upload complete

After that I push the "Reboot" button as requested in readme file, and the board communicates :

write magic number offset = 0x33ff00
update_image_state(1): 0
SystemReset

And after that, the system hangs .

In theory, the application had to start and the browser had to activate the "Accept update" button. But nothing happens. I have to restart the board and I read the bootloader message


Bootloader Version 1.7.2
Primary image: magic=unset, swap_type=0x1, copy_done=0x3, image_ok=0x3
Secondary image: magic=good, swap_type=0x1, copy_done=0x3, image_ok=0x3
Boot source: none
Failed reading image headers; Image=0
Unable to find bootable image

- What am i doing wrong in preparing the signed application?

- And why do I have to reprogram lwip_httpsrv_ota_enet every time after failing to load the image?

 

 

Labels (1)
0 Kudos
Reply
1 Solution
1,346 Views
ulivinico1
Contributor II

Dear  jeremyzhou

I found the problem. The instruction in readme.txt file of lwip_httpsrv_ota_enet project  lacks one important information!

In the section "Running the demo" it is written:

"...

7. After the file is uploaded, click "Reboot" button to start newly uploaded firmware in test mode.
8. Once the updated firmware executes, the "Accept update" button becomes active. Click it to make the update permanent.

..etc"

Actually, after the step 7 the execution stalls and it is necessary those steps (just call them 7b and 7c )

7b:  issue again command 'jump ResetISR' from debugger console

7c:  resume the application to run it

After this the updated firmware finally executes!

View solution in original post

0 Kudos
Reply
2 Replies
1,348 Views
jeremyzhou
NXP Employee
NXP Employee

Hi,
Thank you for your interest in NXP Semiconductor products and for the opportunity to serve you.
I think I need more information, on whether you can illustrate the steps of testing you did via sharing screenshots, as it can help me to figure out the issue.
Have a great day,
TIC

-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

 

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos
Reply
1,347 Views
ulivinico1
Contributor II

Dear  jeremyzhou

I found the problem. The instruction in readme.txt file of lwip_httpsrv_ota_enet project  lacks one important information!

In the section "Running the demo" it is written:

"...

7. After the file is uploaded, click "Reboot" button to start newly uploaded firmware in test mode.
8. Once the updated firmware executes, the "Accept update" button becomes active. Click it to make the update permanent.

..etc"

Actually, after the step 7 the execution stalls and it is necessary those steps (just call them 7b and 7c )

7b:  issue again command 'jump ResetISR' from debugger console

7c:  resume the application to run it

After this the updated firmware finally executes!

0 Kudos
Reply