This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Not able to do firmware update using MCUBOOT over UART

Hi Team,

I am trying to perform firmware update of nrf52840DK using MCUBOOT bootloader over UART. I have followed the link: https://devzone.nordicsemi.com/nordic/nrf-connect-sdk-guides/b/software/posts/device-firmware-update-dfu-with-mcuboot-bootloader But this link is to perform update over USB. So I have used serial_recovery.conf instead of usb_cdc_acm_log_recovery.conf file. I am able to execute below command successfully. I am using usb port (j2) of the board which is basically JLINK usb port.

mcumgr --conntype="serial" --connstring="dev=/dev/ttyACM0,baud=115200" image list -lDEBUG

I am getting this response

Images:
 image=0 slot=0
    version: 0.0.0.0
    bootable: false
    flags:
    hash: Unavailable
Split status: N/A (0)

After this I am trying to perform dfu using below command.

mcumgr --conntype serial --connstring "/dev/ttyACM0,baud=115200" image upload ./build/zephyr/app_update.bin

But it is not able to do dfu, progress bar is no increasing and showing only 0.00% like below

bhavya@bhavya:~/bhavya/ncs/zephyr/samples/basic/blinky$ mcumgr --conntype serial --connstring "/dev/ttyACM0,baud=115200" image upload /home/volansys/bhavya/ncs/zephyr/samples/basic/blinky/build/zephyr/app_update.bin
 0 B / 20.51 KiB [-------------------------------------------------------------------------------------------------------------------]   0.00%

Please help me here to find what I am doing wrong?

Parents
  • Hi, 

    Do you put the DK into MCUBoot’s DFU mode by pressing the reset button on the DK while holding down Button 1 on the DK? 

    Maybe you could try this uart_log_recovery.conf with ncs v1.4.0.  

    CONFIG_LOG=y
    
    # The build won't fit on the partition allocated for it without size
    # optimizations.
    CONFIG_SIZE_OPTIMIZATIONS=y
    
    # Serial
    CONFIG_SERIAL=y
    CONFIG_CONSOLE=y
    CONFIG_UART_CONSOLE=n
    CONFIG_UART_LINE_CTRL=y
    
    # MCUBoot serial
    CONFIG_MCUBOOT_SERIAL=y
    CONFIG_BOOT_SERIAL_UART=y
    
    CONFIG_LOG_BACKEND_UART=y
    CONFIG_RTT_CONSOLE=y
    CONFIG_LOG_BACKEND_RTT=y
    CONFIG_RTT_TX_RETRY_CNT=2
    CONFIG_RTT_TX_RETRY_DELAY_MS=2
    
    CONFIG_PM_PARTITION_SIZE_MCUBOOT=0x10000

    My colleague also uploaded the solution with NCS 1.6.0 to the blog

    -Amanda H.

Reply
  • Hi, 

    Do you put the DK into MCUBoot’s DFU mode by pressing the reset button on the DK while holding down Button 1 on the DK? 

    Maybe you could try this uart_log_recovery.conf with ncs v1.4.0.  

    CONFIG_LOG=y
    
    # The build won't fit on the partition allocated for it without size
    # optimizations.
    CONFIG_SIZE_OPTIMIZATIONS=y
    
    # Serial
    CONFIG_SERIAL=y
    CONFIG_CONSOLE=y
    CONFIG_UART_CONSOLE=n
    CONFIG_UART_LINE_CTRL=y
    
    # MCUBoot serial
    CONFIG_MCUBOOT_SERIAL=y
    CONFIG_BOOT_SERIAL_UART=y
    
    CONFIG_LOG_BACKEND_UART=y
    CONFIG_RTT_CONSOLE=y
    CONFIG_LOG_BACKEND_RTT=y
    CONFIG_RTT_TX_RETRY_CNT=2
    CONFIG_RTT_TX_RETRY_DELAY_MS=2
    
    CONFIG_PM_PARTITION_SIZE_MCUBOOT=0x10000

    My colleague also uploaded the solution with NCS 1.6.0 to the blog

    -Amanda H.

Children
No Data
Related