Image swap with MCUmgr does not work, after reset device end up in endless loop

Hello i have an issue that i created boot and booted the thingy53 nrf5340 with smp svr example with west. So far everything went smoothly. Then i tried to create similar build and upload signed.bin via mcumgr image upload
mcumgr --conntype serial --connstring "COM7,baud=115200" image upload C:\ncs\v2.5.2\zephyr\samples\subsys\mgmt\mcumgr\smp_svr\build_console\zephyr\zephyr.signed.bin
124.17 KiB / 124.17 KiB

then i tested the image and reset the device.

Images:
image=0 slot=0
version: 0.0.0
bootable: true
flags: active confirmed
hash: c242c2c20cb8b6fa7b82f659c9d7ca9d8700725b1b0a9102d5eccd0e415943ab
image=0 slot=1
version: 0.0.0
bootable: true
flags: pending
hash: 2ed62aac00265647c8343286dcc410a59ed8b83a5fffab103f54abedca21a5b6
Split status: N/A (0)

after that device does not communicate and after debug i discovered it got stuck in endless halt with reason 35.

If anyone have some ideas what can cause this problem i would really appreciate help

  • I resolved the issue i dug down into the problem. It was in signing the image as i used:

    # I used "--header-size 32 --pad-header" becase --> "error header size was not specified"
    # The error suggested using specified 32 size header
    
    west sign -t imgtool -- --key C:\ncs\v2.5.2\bootloader\mcuboot\root-rsa-2048.pem  --header-size 32 --pad-header

    The problem was that image generated before sign had 512 header so after adjusting command as shown

    west sign -t imgtool -- --key C:\ncs\v2.5.2\bootloader\mcuboot\root-rsa-2048.pem  --header-size 512 --pad-header

    i was able to update firmware via MCUmgr and serial communication
    also minor changes i used these config files: 

    -DEXTRA_CONF_FILE='overlay-serial.conf;overlay-fs.conf;overlay-shell-mgmt.conf'

Related