I'm using a nRF5340DK with nRF Connect SDK v1.9.0 with MCUBoot and want to upload firmware updates for the application core using mcumgr.
I use the hello_world sample in Segger Embedded Studio.
The mass storage functionality of the nRF5340DK is disabled.
I connect the nRF5340DK to my Windows 10 PC and get three COM devices. COM3 is connected to the application core.
In mcumgr, I added the connstring:
mcumgr conn add nrf53 type="serial" connstring="COM3,baud=115200,mtu=4096"
Testing the connection works:
mcumgr -c nrf53 echo hello hello
Showing all images on the nRF5340DK works too:
mcumgr -c nrf53 image list
Images:
image=0 slot=0
version: 1.0.0
bootable: true
flags: active confirmed
hash: 153ac8a64b4c3f007157f7b808663936ba6745dd86d75b20dab5bce5029d628f
Split status: N/A (0)
And now, according to every tutorial I found, I should upload the newly built image file like this:
mcumgr -c nrf53 image upload -e app_update.bin 0 B / 41.25 KiB [-------------------------------------------------------------------------------------------------------------------------------] 0.00%
But this is all that happens. It stalls at 0%. I tried to start cmd in admin-mode, still the same problem. I tried the timeout flag -t, but still nothing.
Using RTT Viewer, I get the text from the print() statement in main.c, so this works too.
I followed mainly this tutorial.
This is my prj.conf file:
# Added MCUBoot as first stage bootloader CONFIG_BOOTLOADER_MCUBOOT=y #CONFIG_BOOT_SIGNATURE_KEY_FILE="privMCUBoot.pem" # for debugging remove private key file CONFIG_MCUBOOT_IMAGE_VERSION="2" # Enable mcumgr CONFIG_MCUMGR=y # Enable the serial mcumgr transport CONFIG_MCUMGR_SMP_UART=y # Enable most core commands CONFIG_MCUMGR_CMD_IMG_MGMT=y CONFIG_MCUMGR_CMD_OS_MGMT=y # Disable UART Console and enable the RTT console CONFIG_UART_CONSOLE=n CONFIG_RTT_CONSOLE=y CONFIG_USE_SEGGER_RTT=y # Some command handlers require a large stack. CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=4096 CONFIG_HEAP_MEM_POOL_SIZE=2048
My main.c file:
/*
* Copyright (c) 2012-2014 Wind River Systems, Inc.
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <zephyr.h>
#include <sys/printk.h>
#include "os_mgmt/os_mgmt.h"
#include "img_mgmt/img_mgmt.h"
void main(void)
{
os_mgmt_register_group();
img_mgmt_register_group();
printk("Print to check change.\n");
}
I'm at a loss here. Any idea how to fix this?
Best regards,
Alex