mcu-tools / mcuboot

Secure boot for 32-bit Microcontrollers!
Apache License 2.0
1.34k stars 674 forks source link

Need to reset again after image swap for mcumgr to work correctly. #576

Closed rickconrey closed 3 years ago

rickconrey commented 5 years ago

Using STM32WB, mcuboot master, and zephyr master.

Uploading an image the first time works. I can list, test, confirm, and reset. Everything seems to work normally. Once I have confirmed the uploaded image and reset the device to swap the image, the new image is loaded and runs fine. If I try to upload a new image, I receive an UNKNOWN (1) error.

Work around: Any time I want to upload new firmware, I must make sure the device has reset again after the last swap, then it seems to work.

Steps to make it work:

  1. Upload image
  2. confirm image and reset
  3. image swaps and new firmware is running
  4. reset again
  5. now I can upload new firmware
nvlsianpu commented 5 years ago

What is described above must be zephyr mcumgr library or zephyr dfu subsystem issue. Mcuboot just chainnload the zephyr application in which issue was encountered so it doesn't control any application activities after that.

nvlsianpu commented 5 years ago

I can't reproduce this with zephyr master on nRF52840_pca10056 board.

utzig commented 5 years ago

@nvlsianpu What transport are you using?

nvlsianpu commented 5 years ago

mcumgr over serial port - works out of the box with zephyr smp_svr sample.

github-actions[bot] commented 3 years ago

This issue has been marked as stale because it has been open (more than) 60 days with no activity. Remove the stale label or add a comment saying that you would like to have the label removed otherwise this issue will automatically be closed in 14 days. Note, that you can always re-open a closed issue at any time.