Hi
I've an application running on nRF Conenct SDK 3.0.2 on an nRF52840DK. Now I tried to enable update support over serial recovery of MCUBoot using the USB ACM.
First I've setup sysbuild to use MCUboot in sysbuild.conf file:
# Enable bootloader with dedicated bootloader image
SB_CONFIG_BOOTLOADER_MCUBOOT=y
SB_CONFIG_MCUBOOT_MODE_SINGLE_APP=y
In the configuration for the mcuboot image (sysbuild/mcuboot/prj.conf) the following configuration was added:
CONFIG_PM=n
CONFIG_PM_PARTITION_SIZE_MCUBOOT=0x20000
CONFIG_MAIN_STACK_SIZE=10240
CONFIG_BOOT_SWAP_SAVE_ENCTLV=n
CONFIG_BOOT_ENCRYPT_IMAGE=n
CONFIG_BOOT_UPGRADE_ONLY=n
CONFIG_BOOT_BOOTSTRAP=n
### mbedTLS has its own heap
# CONFIG_HEAP_MEM_POOL_SIZE is not set
### We never want Zephyr's copy of tinycrypt. If tinycrypt is needed,
### MCUboot has its own copy in tree.
# CONFIG_TINYCRYPT is not set
# CONFIG_TINYCRYPT_ECC_DSA is not set
# CONFIG_TINYCRYPT_SHA256 is not set
CONFIG_FLASH=y
CONFIG_FPROTECT=y
### Various Zephyr boards enable features that we don't want.
# CONFIG_BT is not set
# CONFIG_BT_CTLR is not set
# CONFIG_I2C is not set
CONFIG_LOG=y
CONFIG_LOG_MODE_MINIMAL=y # former CONFIG_MODE_MINIMAL
### Ensure Zephyr logging changes don't use more resources
CONFIG_LOG_DEFAULT_LEVEL=0
### Use info log level by default
CONFIG_MCUBOOT_LOG_LEVEL_INF=y
### Decrease footprint by ~4 KB in comparison to CBPRINTF_COMPLETE=y
CONFIG_CBPRINTF_NANO=y
### Use the minimal C library to reduce flash usage
CONFIG_MINIMAL_LIBC=y
CONFIG_NRF_RTC_TIMER_USER_CHAN_COUNT=0
# NCS boot banner
CONFIG_NCS_APPLICATION_BOOT_BANNER_STRING="MCUboot"
# Partition table set by pm_static.yml
# CONFIG_PM_PARTITION_SIZE_MCUBOOT=0x20000
CONFIG_GPIO=y
CONFIG_SINGLE_APPLICATION_SLOT=y
# CONFIG_BOOT_SWAP_USING_MOVE=y
# Enable MCUboot Serial Recovery
CONFIG_MCUBOOT_SERIAL=y
CONFIG_BOOT_SERIAL_UART=y
CONFIG_UART_CONSOLE=n
# Point Serial Recovery to CDC_ACM
CONFIG_BOOT_SERIAL_CDC_ACM=y
# Enable Serial Recovery by Button
CONFIG_BOOT_SERIAL_WAIT_FOR_DFU=n
CONFIG_BOOT_SERIAL_ENTRANCE_GPIO=y
# USB configuration
CONFIG_USB_DEVICE_VID=0x1915
CONFIG_USB_DEVICE_PID=0x5300
By pressing the Button 1 on startup I'm able to enter the MCUBOOT serial revovery now. Also reading the image status work properly. But if I download the created "dfu_application.zip" file by using the newtmgr CLI client the system shows me on RTT log the there is no startable image found. Somehow the downloaded image is not startable.
Anyone had success with getting serial recovery with MCUBoot working? What could be wrong?