Hello,
I am encountering a crash in MCUBoot when using the following configuration:
- MCUBoot as bootloader (SB_CONFIG_BOOTLOADER_MCUBOOT)
- TFM configuration (build /ns board)
- Multi-image update (SB_CONFIG_MCUBOOT_UPDATEABLE_IMAGES=2)
- Swap mode (CONFIG_BOOT_SWAP_USING_MOVE)
- Serial Recovery in USB ACM (CONFIG_BOOT_SERIAL_CDC_ACM)
- Auterm sends a firmware or list images.
This issue seems to match an already-identified bug in upstream MCUBoot: https://github.com/mcu-tools/mcuboot/issues/2336
The version of MCUBoot included in the current nRF Connect SDK 3 .1.1 does not contain this fix, and the crash occurs on our side (a null pointer access).
Questions:
- When does Nordic plan to integrate this upstream MCUBoot fix into the nRF Connect SDK?
- Is there a known workaround recommended by Nordic until the fix is officially integrated?
Additional issue on the nRF5340 : sometime, the device freezes at startup when CONFIG_BOOT_SERIAL_WAIT_FOR_DFU is set. This behavior looks very similar to an older issue:
MCUBoot does not load application when using CONFIG_BOOT_SERIAL_WAIT_FOR_DFU .
Is this freeze a known issue ?
please find below logs when mcuboot freezes :
nrf_usbd_common_disable () at ./src/nrf/zephyr/drivers/usb/common/nrf_usbd_common/nrf_usbd_common.c:1225
1225 while (!NRF_USBD->EVENTS_ENDEPIN[0]) {
(gdb) bt
#0 nrf_usbd_common_disable ()
at ./src/nrf/zephyr/drivers/usb/common/nrf_usbd_common/nrf_usbd_common.c:1225
#1 0x00006efe in usb_dc_detach ()
at ./src/nrf/zephyr/drivers/usb/device/usb_dc_nrfx.c:1322
#2 0x00003b96 in usb_disable ()
at ./src/nrf/zephyr/subsys/usb/device/usb_device.c:1358
#3 0x0000065c in do_boot (rsp=0x2000cf9c <z_main_stack+10172>)
at ./src/nrf/bootloader/mcuboot/boot/zephyr/main.c:200
#4 main ()
at ./src/nrf/bootloader/mcuboot/boot/zephyr/main.c:682
(gdb)
Unplugging the USB cable doesn't solve the boot when we are frozen.
If USB cable is not present during boot : issue doesn't reproduce.
Best Regards,
Rémi Moessner
