MCUBOOT not entering recovery mode

I am unable to enter recovery mode using the boot button method while testing the bootloader/mcuboot/samples/zephyr/hello-world example on my nRF5340DK board.

Here's the setup:

  • Using a brand new nRF5340DK development board.
  • Employing a clean example with no modifications to prj.conf and no overlays included.
  • Running on an M1 Mac.
  • Using nRF Connect for Desktop v4.4.0 with Toolchain Manager v1.3.0.
  • Employing nRF Connect SDK v2.5.2 and toolchain v2.5.2.
  • Building with the nrf5340dk_nrf5340_cpuapp_ns board selected.

Observing UART output via the nRF Connect Serial Terminal, I receive the following output on reset regardless of whether I hold the boot button:

*** Booting nRF Connect SDK v2.5.2 ***
I: Starting bootloader
I: Primary image: magic=unset, swap_type=0x1, copy_done=0x3, image_ok=0x3
I: Secondary image: magic=unset, swap_type=0x1, copy_done=0x3, image_ok=0x3
I: Boot source: none
I: Image index: 0, Swap type: none
I: Bootloader chainload address offset: 0xc000
*** Booting nRF Connect SDK v2.5.2 ***
Hello World from Zephyr on nrf5340dk_nrf5340_cpuapp!

The boot led doesn't react at all either.

Additionally, I've tested the button example to confirm that button0 and led0 operate as expected.

Any insights or suggestions on resolving this issue would be greatly appreciated.

Parents Reply Children
  • Just tried it, and it is an unknown symbol
    Here is the new contents of prj.conf in the hello_world example:

    # Print a banner on the UART on startup.
    CONFIG_BOOT_BANNER=y

    # Enable console and printk()
    CONFIG_PRINTK=y
    CONFIG_STDOUT_CONSOLE=y

    # Enable Zephyr application to be booted by MCUboot
    CONFIG_BOOTLOADER_MCUBOOT=y

    CONFIG_MCUBOOT_SERIAL=y // Unknown symbol CONFIG_MCUBOOT_SERIAL
    I am building with the nrf5340dk_nrf5340_cpuapp board.
  • Hi!

    The CONFIG_MCUBOOT_SERIAL should not be in the application prj.conf, but rather in /child_image/mcuboot.conf , so that it get's applied to the mcuboot build.

  • Ok I added the directory /child_image to my project and the mcuboot.conf with CONFIG_MCUBOOT_SERIAL

    After getting some more errors I followed this example https://github.com/hellesvik-nordic/samples_for_nrf_connect_sdk/blob/main/bootloader_samples/serial_recovery/mcuboot_serial_recovery_uart/child_image/mcuboot.conf

    and ended up with this mcuboot.conf

    CONFIG_SIZE_OPTIMIZATIONS=y
    CONFIG_SINGLE_APPLICATION_SLOT=y
    CONFIG_MCUBOOT_SERIAL=y
    CONFIG_UART_CONSOLE=n

    CONFIG_MCUBOOT_INDICATION_LED=y

    After building and flashing, it now shows it is in recovery mode via the LED.

    But I still have a few problems:

    1) Is there any way to activate UART for the bootloader so I can see messages from the bootloader?

    2) The programming utility for nRF Connect for Desktop is not letting me use mcuboot to upload a new application. I get this error when trying to upload dfu_application.zip from the build folder of hello_world.

    13:29:45.392
    Error: Failed with exit code 1. One or more program tasks failed. Message: Failed, No matching plugin found for operations to execute.
    13:29:45.396
    MCUboot DFU failed with error: Error: Failed with exit code 1. One or more program tasks failed. Message: Failed, No matching plugin found for operations to execute.
    13:29:45.396
    Error: Failed with exit code 1. One or more program tasks failed. Message: Failed, No matching plugin found for operations to execute.
  • Hi!

    Bedmonds91 said:
    After building and flashing, it now shows it is in recovery mode via the LED.

    Great!

    Bedmonds91 said:
    1) Is there any way to activate UART for the bootloader so I can see messages from the bootloader?

    Try 

    # Enable logging for MCUboot
    CONFIG_LOG=y
    CONFIG_MCUBOOT_LOG_LEVEL_WRN=y

    Bedmonds91 said:
    The programming utility for nRF Connect for Desktop is not letting me use mcuboot to upload a new application.
    Bedmonds91 said:
    2) The programming utility for nRF Connect for Desktop is not letting me use mcuboot to upload a new application. I get this error when trying to upload dfu_application.zip from the build folder of hello_world.

    Maybe try app_update.bin instead.

    PS: If you run into new issues, please open a new case.

    PSS: You might find this useful: https://academy.nordicsemi.com/courses/nrf-connect-sdk-intermediate/lessons/lesson-8-bootloaders-and-dfu-fota/

Related