mcuboot, Image in the primary slot is not valid, Unable to find bootable image

I followed the course to enable MCUBOOT over BLE it is successful for the project peripheral_lbs but not my application.

uart log;

Fullscreen
1
2
3
4
5
6
7
8
*** Booting nRF Connect SDK v3.5.99-ncs1-1 ***
I: Starting bootloader
I: Primary image: magic=unset, swap_type=0x1, copy_done=0x3, image_ok=0x3
I: Secondary image: magic=unset, swap_type=0x1, copy_done=0x3, image_ok=0x3
I: Boot source: none
I: Image index: 0, Swap type: none
E: Image in the primary slot is not valid!
E: Unable to find bootable image
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

build log:

Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
Building peripheral
west build --build-dir /home/longqi/peripheral/build /home/longqi/peripheral --pristine --board nrf52833dk_nrf52833 --no-sysbuild -- -DNCS_TOOLCHAIN_VERSION=NONE -DBOARD_ROOT=/home/longqi/peripheral -Dmcuboot_OVERLAY_CONFIG=/home/longqi/ncs/v2.6.1/nrf/subsys/partition_manager/partition_manager_enabled.conf -Dmcuboot_secondary_app_OVERLAY_CONFIG=/home/longqi/ncs/v2.6.1/nrf/subsys/partition_manager/partition_manager_enabled.conf -DCONFIG_CORTEX_M_DEBUG_MONITOR_HOOK=y -DCONFIG_DEBUG_OPTIMIZATIONS=y -DCONFIG_DEBUG_THREAD_INFO=y -DCONFIG_SEGGER_DEBUGMON=y -DCACHED_CONF_FILE=/home/longqi/peripheral/prj.conf -DDTC_OVERLAY_FILE=/home/longqi/peripheral/nrf52833dk_nrf52833.overlay
-- west build: generating a build system
Loading Zephyr default modules (Zephyr base).
-- Application: /home/longqi/peripheral
-- CMake version: 3.21.0
-- Found Python3: /home/longqi/ncs/toolchains/2be090971e/usr/local/bin/python3.9 (found suitable version "3.9.18", minimum required is "3.8") found components: Interpreter
-- Cache files will be written to: /home/longqi/.cache/zephyr
-- Zephyr version: 3.5.99 (/home/longqi/ncs/v2.6.1/zephyr)
-- Found west (found suitable version "1.2.0", minimum required is "0.14.0")
-- Board: nrf52833dk_nrf52833
-- Found host-tools: zephyr 0.16.5 (/home/longqi/ncs/toolchains/2be090971e/opt/zephyr-sdk)
-- Found toolchain: zephyr 0.16.5 (/home/longqi/ncs/toolchains/2be090971e/opt/zephyr-sdk)
-- Found Dtc: /home/longqi/ncs/toolchains/2be090971e/usr/bin/dtc (found suitable version "1.5.0", minimum required is "1.4.6")
-- Found BOARD.dts: /home/longqi/ncs/v2.6.1/zephyr/boards/arm/nrf52833dk_nrf52833/nrf52833dk_nrf52833.dts
-- Found devicetree overlay: /home/longqi/peripheral/nrf52833dk_nrf52833.overlay
-- Generated zephyr.dts: /home/longqi/peripheral/build/zephyr/zephyr.dts
-- Generated devicetree_generated.h: /home/longqi/peripheral/build/zephyr/include/generated/devicetree_generated.h
-- Including generated dts.cmake file: /home/longqi/peripheral/build/zephyr/dts.cmake
Parsing /home/longqi/ncs/v2.6.1/zephyr/Kconfig
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

prj.conf

Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# Increased stack due to settings API usage
CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=2048
CONFIG_BT=y
# Enable logging
CONFIG_LOG=y
CONFIG_BT_SMP=y
CONFIG_BT_SIGNING=y
CONFIG_BT_PERIPHERAL=y
CONFIG_BT_DIS=y
CONFIG_BT_ATT_PREPARE_COUNT=5
CONFIG_BT_PRIVACY=n
CONFIG_BT_DEVICE_NAME="p1"
CONFIG_BT_DEVICE_APPEARANCE=833
CONFIG_BT_DEVICE_NAME_DYNAMIC=y
CONFIG_BT_DEVICE_NAME_MAX=65
CONFIG_BT_DIS_MANUF="xnergy"
CONFIG_BT_DIS_MODEL="phoenix"
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX


Parents
  • I tried every commit in my repo and it eventually works after I disabled CONFIG_UART_ASYNC_API and removed uart related program.

    May I know what the reason is? 

Reply
  • I tried every commit in my repo and it eventually works after I disabled CONFIG_UART_ASYNC_API and removed uart related program.

    May I know what the reason is? 

Children