I am able to update the app core successfully from an external flash partition via the `mcumgr` desktop tool. However, this is not working for the net core.
It successfully uploads to the same external secondary flash slot used for the app core:
mcumgr -c acm1 image upload -n 2 net_core_app_update.bin 72.28 KiB / 72.28 KiB [==========================================================================================================] 100.00% 2.97 KiB/s 24s Done
And the image is shown in image list:
mcumgr -c acm1 image list Images: image=0 slot=0 version: 0.0.121 bootable: true flags: active confirmed hash: 4e3a1762799fb9f1d33471f6f71b1ec5eb9faf89a8416cd01074b1cd81debce2 image=0 slot=1 version: 0.0.121 bootable: true flags: hash: 4c3470051a94186de9d4fb0f7e71228f2805cb70643da428efc5d7c7b6f10cf5 Split status: N/A (0)
However, neither running a device reset, nor an image test followed by device reset, nor an image confirm followed by a device reset, seem to work. The flags do get updated though:
Images: image=0 slot=0 version: 0.0.121 bootable: true flags: confirmed hash: 4e3a1762799fb9f1d33471f6f71b1ec5eb9faf89a8416cd01074b1cd81debce2 image=0 slot=1 version: 0.0.121 bootable: true flags: pending hash: 4c3470051a94186de9d4fb0f7e71228f2805cb70643da428efc5d7c7b6f10cf5 Split status: N/A (0)
But I can't get it to actually update the net app (I confirm via the shell name, `CONFIG_SHELL_PROMPT_IPC` not changing).
Any ideas what could be happening?
Here is our mcuboot.conf:
# These configurations override those from prj.conf when compiling mcuboot. CONFIG_SIZE_OPTIMIZATIONS=y CONFIG_MULTITHREADING=y # CONFIG_DEBUG=y # @todo: These are useful for tracing operation with a debugger attached, and have a modest # size (< 5kB). As long as including them doesn't push us over a 16kB page boundary (SPU # granularity), no reason to disable them. CONFIG_USE_SEGGER_RTT=y CONFIG_CONSOLE=y CONFIG_RTT_CONSOLE=y CONFIG_LOG=y CONFIG_MCUBOOT_LOG_LEVEL_DBG=y # Enable internal crystal for MCUboot CONFIG_CLOCK_CONTROL_NRF_K32SRC_RC=y CONFIG_CLOCK_CONTROL_NRF_K32SRC_500PPM=y # Ensure SPI NOR is disabled, as we use our own NAND driver. CONFIG_SPI_NOR=n # Enable MCUboot Serial Recovery CONFIG_MCUBOOT_SERIAL=y CONFIG_BOOT_SERIAL_CDC_ACM=y CONFIG_BOOT_SERIAL_NO_APPLICATION=y CONFIG_BOOT_USB_DFU_GPIO=n CONFIG_BOOT_SERIAL_BOOT_MODE=n CONFIG_BOOT_SERIAL_PIN_RESET=n # After a hard reset, enter serial recovery mode only if the power button is held for # BOOT_SERIAL_DETECT_DELAY. That allows a button reset and release for a normal restart. CONFIG_BOOT_SERIAL_ENTRANCE_GPIO=y CONFIG_BOOT_SERIAL_DETECT_DELAY=5000 # Alternatively comment out the above and use the following to enter serial recovery mode via timeout on reset # CONFIG_BOOT_SERIAL_WAIT_FOR_DFU=y # CONFIG_BOOT_SERIAL_WAIT_FOR_DFU_TIMEOUT=5000 # LED will be solid red when in recovery mode. CONFIG_MCUBOOT_INDICATION_LED=y # Maximize the serial receive size CONFIG_BOOT_SERIAL_MAX_RECEIVE_SIZE=4096 # TODO: Adding more buffers might improve image update speed # CONFIG_BOOT_LINE_BUFS=8 # Secondary slots are in external NAND, defined as partitions. CONFIG_SINGLE_APPLICATION_SLOT=n CONFIG_BOOT_MAX_IMG_SECTORS=256 CONFIG_PM_EXTERNAL_FLASH_MCUBOOT_SECONDARY=y CONFIG_BOOT_SERIAL_IMG_GRP_IMAGE_STATE=y # Use scratch instead of move since it allows more internal flash utilization, and with FTL we # don't need to worry about wear leveling. CONFIG_BOOT_SWAP_USING_SCRATCH=y # With SERIAL_DIRECT_IMAGE_UPLOAD, serial recovery can upload to either the primary or secondary # slot. -n 0 (or unspecified) and -n 1 both go to primary slot, 2 is first image secondary slot, # see Kconfig for other values. CONFIG_MCUBOOT_SERIAL_DIRECT_IMAGE_UPLOAD=y # Net core update. # CONFIG_UPDATEABLE_IMAGE_NUMBER=1 # CONFIG_BOOT_UPGRADE_ONLY=y # CONFIG_USE_NRF53_MULTI_IMAGE_WITHOUT_UPGRADE_ONLY=y CONFIG_NRF53_MULTI_IMAGE_UPDATE=y # Since cpuapp can't access cpunet flash directly, the cpunet update gets copied to a RAM area # that's emulated as a flash area through flash simulator CONFIG_FLASH_SIMULATOR=y CONFIG_FLASH_SIMULATOR_UNALIGNED_READ=y CONFIG_FLASH_SIMULATOR_DOUBLE_WRITES=y CONFIG_FLASH_SIMULATOR_STATS=n
Does it have to do with any of these Kconfigs?
# CONFIG_UPDATEABLE_IMAGE_NUMBER=1
# CONFIG_BOOT_UPGRADE_ONLY=y
# CONFIG_USE_NRF53_MULTI_IMAGE_WITHOUT_UPGRADE_ONLY=y
Note that we are doing this with non-encrypted images for now...