NCS2.0 MCUBOOT OTA startup with old firmware not the new one after upload app_update.bin

We follow the OTA guide:  Add DFU support to your application 

Add below code in main.c:

    printk("build time: %s %s Version: %s\n", __DATE__, __TIME__, CONFIG_MCUBOOT_IMAGE_VERSION);
    os_mgmt_register_group();
    img_mgmt_register_group();
    smp_bt_register();

Our prj.conf:

CONFIG_MCUMGR=y
CONFIG_MCUMGR_CMD_IMG_MGMT=y
CONFIG_MCUMGR_CMD_OS_MGMT=y
CONFIG_BOOTLOADER_MCUBOOT=y
CONFIG_MCUMGR_SMP_BT=y
CONFIG_MCUMGR_SMP_BT_AUTHEN=n
CONFIG_IMG_ERASE_PROGRESSIVELY=y
CONFIG_MCUBOOT_SIGNATURE_KEY_FILE="child_image/mcuboot/mcuboot_private.pem"
CONFIG_MCUBOOT_IMAGE_VERSION="0.0.0+0"
......
Mcuboot prj.conf:
CONFIG_SIZE_OPTIMIZATIONS=y
CONFIG_HW_STACK_PROTECTION=n
CONFIG_SYSTEM_CLOCK_NO_WAIT=y
CONFIG_PM=n
CONFIG_MAIN_STACK_SIZE=10240
CONFIG_BOOT_BOOTSTRAP=n
CONFIG_BOOT_ENCRYPT_RSA=n
CONFIG_BOOT_SIGNATURE_TYPE_RSA=y
CONFIG_BOOT_SIGNATURE_TYPE_ECDSA_P256=y
CONFIG_BOOT_SIGNATURE_KEY_FILE="mcuboot_private.pem"
CONFIG_CLOCK_CONTROL_NRF_K32SRC_RC=y
CONFIG_FLASH=y
CONFIG_BOOT_ERASE_PROGRESSIVELY=y
CONFIG_SOC_FLASH_NRF_EMULATE_ONE_BYTE_WRITE_ACCESS=y
CONFIG_USE_SEGGER_RTT=y
CONFIG_LOG=y
CONFIG_LOG_DEFAULT_LEVEL=2
CONFIG_LOG_MAX_LEVEL=3
CONFIG_LOG_PRINTK=y
CONFIG_LOG_MODE_IMMEDIATE=y
CONFIG_LOG_BACKEND_SHOW_COLOR=n
CONFIG_LOG_BACKEND_FORMAT_TIMESTAMP=n
Build the project, then flash to device, the rtt log:
Then we change CONFIG_MCUBOOT_IMAGE_VERSION="0.0.1+0", rebuild project, and use nRF Connect update the app_update.bin to device, everything is ok, but after device reboot, the rtt log is the same with old one:
The nRF Connect log:
The mcuboot exec the old firmware after upload app_update.bin success, how can this happen? What i missed?
Parents Reply Children
Related