mcumgr image confirm returns error 3 while following the "Add DFU support to your application" walk-through (serial DFU)

Add DFU support to your application walk-through
devzone.nordicsemi.com/.../ncs-dfu
Serial DFU chapter
Fails on a nRF52840 DK (with one HW change)
With error 3 on image confirm using mcumgr

All the previous steps seem fine.

nrf connect sdk 2.1.0

I tried increasing stack sizes with no success.

I ensured that the flash is fully erased before the first flash in case
Like in the walk-through, I did just rebuild the hello world sample to change the signature

The change I did to the nRF52840 DK, in case this could be of any effect
HW : disconnect the 32.768Khz quartz, reroute the wires so that P0.00 and P0.01 are the new USART0, pass through USB CDC
FW :
create an overlay to set the uart0 on P0.00 and P0.01
add to the prj.conf to run without the quartz 32.768Khz
# No 32.768Khz Quartz
CONFIG_CLOCK_CONTROL_NRF_K32SRC_SYNTH=y
CONFIG_CLOCK_CONTROL_NRF_K32SRC_XTAL=n

I was able to run several other samples with this config with no problems.


Looking at the mcumgr source code
Error 3 seems to be LOG_MGMT_ERR_EINVAL in the mcumgr source code. May have to do with cbor_read_object or cbor_write_attr

Here are the logs

D:\ndapp\serial_dfu\build\zephyr>mcumgr --conntype serial --connstring "COM7,baud=115200" image test 636ec254a624a4dd554ea46c4f04a7bda19b8f1fa88f374b701d9421b8712b96
Images:
image=0 slot=0
version: 0.0.0
bootable: true
flags: active confirmed
hash: 74ec5b3cb343075a73fe5f179e94c80cd2c8bf886a8687ac32828fbb23e6906e
image=0 slot=1
version: 0.0.0
bootable: true
flags: pending
hash: 636ec254a624a4dd554ea46c4f04a7bda19b8f1fa88f374b701d9421b8712b96
Split status: N/A (0)

D:\ndapp\serial_dfu\build\zephyr>mcumgr --conntype serial --connstring "COM7,baud=115200" reset
Done

// NRF Connect RTT properly logs the Hello World, with a new compilation time, confirming that the active slot is the one we wanted

D:\ndapp\serial_dfu\build\zephyr>mcumgr --conntype serial --connstring "COM7,baud=115200" image list
Images:
image=0 slot=0
version: 0.0.0
bootable: true
flags: active
hash: 636ec254a624a4dd554ea46c4f04a7bda19b8f1fa88f374b701d9421b8712b96
image=0 slot=1
version: 0.0.0
bootable: true
flags: confirmed
hash: 74ec5b3cb343075a73fe5f179e94c80cd2c8bf886a8687ac32828fbb23e6906e
Split status: N/A (0)

D:\ndapp\serial_dfu\build\zephyr>mcumgr --conntype serial --connstring "COM7,baud=115200" image confirm
Error: 3

// NRF Connect VSCode or no NRF connect connected, same problem.


D:\ndapp\serial_dfu\build\zephyr>mcumgr --conntype serial --connstring "COM7,baud=115200" image list
Images:
image=0 slot=0
version: 0.0.0
bootable: true
flags: active
hash: 636ec254a624a4dd554ea46c4f04a7bda19b8f1fa88f374b701d9421b8712b96
image=0 slot=1
version: 0.0.0
bootable: true
flags: confirmed
hash: 74ec5b3cb343075a73fe5f179e94c80cd2c8bf886a8687ac32828fbb23e6906e
Split status: N/A (0)

// yep, no change

I am stuck.

Parents
  • Hi,

    Did you create an overlay for the MCUboot child image, or just for the application? The configs in the prj.conf file will only be applied to the application, and not to child images. You can specify Kconfig and devicetree overlays for child images as described in Image-specific variables and Child image devicetree overlays.

    Best regards,
    Jørgen

  • Hello.

    I had not. So I tried adding  mcuboot.overlay into D:/ncs/v2.1.0/bootloader/mcuboot/boot/zephyr

    but would not see any mention of it in the compilation log. Does not appear spontaneously in the tree in vscode either

    So, I saw that there was already a file called dts.overlay in that dir that was referenced as used in the log, 

    So, I edited it.

    I noticed that the prj.conf for mcuboot already did set

    CONFIG_CLOCK_CONTROL_NRF_K32SRC_SYNTH=y
    CONFIG_CLOCK_CONTROL_NRF_K32SRC_XTAL=n
    so, no need for that.
    But after compilation and test, no change. Which I find rather logical, since the bootloader was clearly able to boot and use the 2 pins as a serial port since I can image upload with mcumgr. through these pins.
    So, here is the log in "debug"  of mcumgr FOLLOWED by the log of the compilation
    FOLLOWED by the whole process that now includes mcu boot log sequence also
    nota : today, the image is signed with a private key, but on friday, it was signed with the default key.
    I don't expect this to play any role since both situations fail the same way.
    mcumgr --loglevel "debug" --conntype serial --connstring "COM7,baud=115200" image confirm
    time="2022-10-03 19:17:30.156" level=debug msg="Using connection profile: name=unnamed type=serial connstring=COM7,baud=115200"
    time="2022-10-03 19:17:30.188" level=debug msg="{add-nmp-listener} [serial_sesn.go:213] seq=66"
    time="2022-10-03 19:17:30.189" level=debug msg="Encoded &{NmpBase:{hdr:{Op:2 Flags:0 Len:0 Group:1 Seq:66 Id:0}} Hash:[] Confirm:true} to:\n00000000 a2 67 63 6f 6e 66 69 72 6d f5 64 68 61 73 68 f6 |.gconfirm.dhash.|\n"
    time="2022-10-03 19:17:30.189" level=debug msg="Encoded:\n00000000 02 00 00 10 00 01 42 00 a2 67 63 6f 6e 66 69 72 |......B..gconfir|\n00000010 6d f5 64 68 61 73 68 f6 |m.dhash.|\n"
    time="2022-10-03 19:17:30.189" level=debug msg="Tx NMP request: 00000000 02 00 00 10 00 01 42 00 a2 67 63 6f 6e 66 69 72 |......B..gconfir|\n00000010 6d f5 64 68 61 73 68 f6 |m.dhash.|\n"
    time="2022-10-03 19:17:30.189" level=debug msg="Base64 encoding request:\n00000000 02 00 00 10 00 01 42 00 a2 67 63 6f 6e 66 69 72 |......B..gconfir|\n00000010 6d f5 64 68 61 73 68 f6 |m.dhash.|\n"
    time="2022-10-03 19:17:30.19" level=debug msg="Tx serial\n00000000 06 09 |..|\n"
    time="2022-10-03 19:17:30.19" level=debug msg="Tx serial\n00000000 41 42 6f 43 41 41 41 51 41 41 46 43 41 4b 4a 6e |ABoCAAAQAAFCAKJn|\n00000010 59 32 39 75 5a 6d 6c 79 62 66 56 6b 61 47 46 7a |Y29uZmlybfVkaGFz|\n00000020 61 50 61 71 38 41 3d 3d |aPaq8A==|\n"
    time="2022-10-03 19:17:30.192" level=debug msg="Tx serial\n00000000 0a |.|\n"
    time="2022-10-03 19:17:30.199" level=debug msg="Rx serial:\n00000000 06 09 41 42 41 44 41 41 41 47 41 41 46 43 41 4c |..ABADAAAGAAFCAL|\n00000010 39 69 63 6d 4d 44 2f 36 74 33 |9icmMD/6t3|\n"
    time="2022-10-03 19:17:30.199" level=debug msg="Decoded input:\n00000000 03 00 00 06 00 01 42 00 bf 62 72 63 03 ff |......B..brc..|\n"
    time="2022-10-03 19:17:30.199" level=debug msg="rx nmp response: 00000000 03 00 00 06 00 01 42 00 bf 62 72 63 03 ff |......B..brc..|\n"
    time="2022-10-03 19:17:30.2" level=debug msg="Received nmp rsp: &{NmpBase:{hdr:{Op:3 Flags:0 Len:6 Group:1 Seq:66 Id:0}} Rc:3 Images:[] SplitStatus:N/A}"
    time="2022-10-03 19:17:30.203" level=debug msg="{remove-nmp-listener} [serial_sesn.go:213] seq=66"
    Error: 3
    ===============================================================

    Building serial_dfu
    west build --build-dir d:\lc\ndapp\serial_dfu\build d:\lc\ndapp\serial_dfu --pristine --board nrf52840dk_nrf52840 -- -DNCS_TOOLCHAIN_VERSION:STRING="NONE" -DBOARD_ROOT:STRING="d:/lc/ndapp/radio_test;d:/lc/ndapp/dtm;d:/lc/ndapp/smp_server;d:/lc/ndapp/bootloader" -DCONFIG_DEBUG_OPTIMIZATIONS:STRING="y" -DCONFIG_DEBUG_THREAD_INFO:STRING="y" -DDTC_OVERLAY_FILE:STRING="d:/lc/ndapp/serial_dfu/nrf52840dk_nrf52840.overlay" -DCONF_FILE:STRING="d:/lc/ndapp/serial_dfu/prj.conf"
    
    -- west build: generating a build system
    Loading Zephyr default modules (Zephyr base).
    -- Application: D:/lc/ndapp/serial_dfu
    -- Found Python3: D:/ncs/toolchains/v2.1.0/opt/bin/python.exe (found suitable exact version "3.8.2") found components: Interpreter
    -- Cache files will be written to: D:/ncs/v2.1.0/zephyr/.cache
    -- Zephyr version: 3.1.99 (D:/ncs/v2.1.0/zephyr)
    -- Found west (found suitable version "0.14.0", minimum required is "0.7.1")
    -- Board: nrf52840dk_nrf52840
    -- Found host-tools: zephyr 0.14.1 (D:/ncs/toolchains/v2.1.0/opt/zephyr-sdk)
    -- Found dtc: D:/ncs/toolchains/v2.1.0/opt/bin/dtc.exe (found suitable version "1.4.7", minimum required is "1.4.6")
    -- Found toolchain: zephyr 0.14.1 (D:/ncs/toolchains/v2.1.0/opt/zephyr-sdk)
    -- Found BOARD.dts: D:/ncs/v2.1.0/zephyr/boards/arm/nrf52840dk_nrf52840/nrf52840dk_nrf52840.dts
    -- Found devicetree overlay: d:/lc/ndapp/serial_dfu/nrf52840dk_nrf52840.overlay
    -- Generated zephyr.dts: D:/lc/ndapp/serial_dfu/build/zephyr/zephyr.dts
    -- Generated devicetree_unfixed.h: D:/lc/ndapp/serial_dfu/build/zephyr/include/generated/devicetree_unfixed.h
    -- Generated device_extern.h: D:/lc/ndapp/serial_dfu/build/zephyr/include/generated/device_extern.h
    -- Including generated dts.cmake file: D:/lc/ndapp/serial_dfu/build/zephyr/dts.cmake
    Parsing D:/ncs/v2.1.0/zephyr/Kconfig
    Loaded configuration 'D:/lc/ndapp/serial_dfu/build/zephyr/.config'
    No change to configuration in 'D:/lc/ndapp/serial_dfu/build/zephyr/.config'
    No change to Kconfig header in 'D:/lc/ndapp/serial_dfu/build/zephyr/include/generated/autoconf.h'
    -- The C compiler identification is GNU 10.3.0
    -- The CXX compiler identification is GNU 10.3.0
    -- The ASM compiler identification is GNU
    -- Found assembler: D:/ncs/toolchains/v2.1.0/opt/zephyr-sdk/arm-zephyr-eabi/bin/arm-zephyr-eabi-gcc.exe
    -- Found Python3: D:/ncs/toolchains/v2.1.0/opt/bin/python.exe (found version "3.8.2") found components: Interpreter
    
    === child image mcuboot - begin ===
    loading initial cache file D:/lc/ndapp/serial_dfu/build/mcuboot/child_image_preload.cmake
    Loading Zephyr default modules (Zephyr base).
    -- Application: D:/ncs/v2.1.0/bootloader/mcuboot/boot/zephyr
    -- Found Python3: D:/ncs/toolchains/v2.1.0/opt/bin/python.exe (found suitable exact version "3.8.2") found components: Interpreter
    -- Cache files will be written to: D:/ncs/v2.1.0/zephyr/.cache
    -- Zephyr version: 3.1.99 (D:/ncs/v2.1.0/zephyr)
    -- Found west (found suitable version "0.14.0", minimum required is "0.7.1")
    -- Board: nrf52840dk_nrf52840
    -- Found host-tools: zephyr 0.14.1 (D:/ncs/toolchains/v2.1.0/opt/zephyr-sdk)
    -- Found dtc: D:/ncs/toolchains/v2.1.0/opt/bin/dtc.exe (found suitable version "1.4.7", minimum required is "1.4.6")
    -- Found toolchain: zephyr 0.14.1 (D:/ncs/toolchains/v2.1.0/opt/zephyr-sdk)
    -- Found BOARD.dts: D:/ncs/v2.1.0/zephyr/boards/arm/nrf52840dk_nrf52840/nrf52840dk_nrf52840.dts
    -- Found devicetree overlay: D:/ncs/v2.1.0/nrf/modules/mcuboot/usb.overlay
    -- Found devicetree overlay: D:/ncs/v2.1.0/bootloader/mcuboot/boot/zephyr/dts.overlay
    -- Generated zephyr.dts: D:/lc/ndapp/serial_dfu/build/mcuboot/zephyr/zephyr.dts
    -- Generated devicetree_unfixed.h: D:/lc/ndapp/serial_dfu/build/mcuboot/zephyr/include/generated/devicetree_unfixed.h
    -- Generated device_extern.h: D:/lc/ndapp/serial_dfu/build/mcuboot/zephyr/include/generated/device_extern.h
    -- Including generated dts.cmake file: D:/lc/ndapp/serial_dfu/build/mcuboot/zephyr/dts.cmake
    Parsing D:/ncs/v2.1.0/bootloader/mcuboot/boot/zephyr/Kconfig
    Loaded configuration 'D:/ncs/v2.1.0/zephyr/boards/arm/nrf52840dk_nrf52840/nrf52840dk_nrf52840_defconfig'
    Merged configuration 'D:/ncs/v2.1.0/bootloader/mcuboot/boot/zephyr/prj.conf'
    Merged configuration 'D:/ncs/v2.1.0/bootloader/mcuboot/boot/zephyr/boards/nrf52840dk_nrf52840.conf'
    Merged configuration 'D:/ncs/v2.1.0/nrf/subsys/partition_manager/partition_manager_enabled.conf'
    Merged configuration 'D:/lc/ndapp/serial_dfu/build/mcuboot/zephyr/misc/generated/extra_kconfig_options.conf'
    Configuration saved to 'D:/lc/ndapp/serial_dfu/build/mcuboot/zephyr/.config'
    Kconfig header saved to 'D:/lc/ndapp/serial_dfu/build/mcuboot/zephyr/include/generated/autoconf.h'
    -- The C compiler identification is GNU 10.3.0
    -- The CXX compiler identification is GNU 10.3.0
    -- The ASM compiler identification is GNU
    -- Found assembler: D:/ncs/toolchains/v2.1.0/opt/zephyr-sdk/arm-zephyr-eabi/bin/arm-zephyr-eabi-gcc.exe
    CMake Warning at D:/ncs/v2.1.0/nrf/lib/flash_patch/CMakeLists.txt:8 (message):
    
    
    ----------------------------------------------------------
    --- WARNING: To maintain the integrity of secure boot, ---
    --- enable CONFIG_DISABLE_FLASH_PATCH in production. ---
    ----------------------------------------------------------
    
    
    MCUBoot bootloader key file: D:\\lc\\ndapp\\serial_dfu\\sig_private1.pem
    -- Configuring done
    -- Generating done
    -- Build files have been written to: D:/lc/ndapp/serial_dfu/build/mcuboot
    === child image mcuboot - end ===
    
    -- Configuring done
    -- Generating done
    -- Build files have been written to: D:/lc/ndapp/serial_dfu/build
    -- west build: building application
    [1/230] Generating include/generated/version.h
    -- Zephyr version: 3.1.99 (D:/ncs/v2.1.0/zephyr), build: v3.1.99-ncs1
    [2/230] Creating directories for 'mcuboot_subimage'
    [3/230] No download step for 'mcuboot_subimage'
    [4/230] No update step for 'mcuboot_subimage'
    [5/230] No patch step for 'mcuboot_subimage'
    [6/230] No configure step for 'mcuboot_subimage'
    [6/230] Performing build step for 'mcuboot_subimage'
    [1/204] Generating include/generated/version.h
    -- Zephyr version: 3.1.99 (D:/ncs/v2.1.0/zephyr), build: v3.1.99-ncs1
    [2/204] Generating misc/generated/syscalls.json, misc/generated/struct_tags.json
    [3/204] Generating include/generated/syscall_dispatch.c, include/generated/syscall_list.h
    [4/204] Generating include/generated/driver-validation.h
    [5/204] Generating include/generated/kobj-types-enum.h, include/generated/otype-to-str.h, include/generated/otype-to-size.h
    [6/204] Building C object zephyr/CMakeFiles/offsets.dir/arch/arm/core/offsets/offsets.c.obj
    [7/204] Generating include/generated/offsets.h
    [8/204] Building C object zephyr/CMakeFiles/zephyr.dir/soc/arm/nordic_nrf/validate_base_addresses.c.obj
    [9/204] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/multi_heap.c.obj
    [10/204] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/assert.c.obj
    [11/204] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/cbprintf.c.obj
    [12/204] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/cbprintf_nano.c.obj
    [13/204] Building C object zephyr/CMakeFiles/zephyr.dir/soc/arm/nordic_nrf/validate_enabled_instances.c.obj
    [14/204] Building C object zephyr/CMakeFiles/zephyr.dir/subsys/logging/log_minimal.c.obj
    [15/204] Building C object zephyr/CMakeFiles/zephyr.dir/misc/generated/configs.c.obj
    [16/204] Building C object zephyr/CMakeFiles/zephyr.dir/subsys/storage/flash_map/flash_map.c.obj
    [17/204] Building C object zephyr/CMakeFiles/zephyr.dir/subsys/storage/flash_map/flash_map_layout.c.obj
    [18/204] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/reboot.c.obj
    [19/204] Building ASM object zephyr/CMakeFiles/zephyr.dir/soc/arm/nordic_nrf/common/soc_nrf_common.S.obj
    [20/204] Building C object zephyr/CMakeFiles/zephyr.dir/D_/ncs/v2.1.0/nrfxlib/crypto/nrf_cc310_platform/src/nrf_cc3xx_platform_abort_zephyr.c.obj
    [21/204] Building C object zephyr/CMakeFiles/zephyr.dir/D_/ncs/v2.1.0/nrf/subsys/partition_manager/flash_map_partition_manager.c.obj
    [22/204] Building C object zephyr/CMakeFiles/zephyr.dir/D_/ncs/v2.1.0/nrfxlib/crypto/nrf_cc310_platform/src/nrf_cc3xx_platform_mutex_zephyr.c.obj
    [23/204] Building C object zephyr/CMakeFiles/zephyr.dir/subsys/tracing/tracing_none.c.obj
    [24/204] Generating linker_zephyr_pre1.cmd
    [25/204] Building ASM object zephyr/arch/arch/arm/core/aarch32/CMakeFiles/arch__arm__core__aarch32.dir/cpu_idle.S.obj
    [26/204] Building C object zephyr/arch/common/CMakeFiles/arch__common.dir/sw_isr_common.c.obj
    [27/204] Building C object zephyr/arch/arch/arm/core/aarch32/CMakeFiles/arch__arm__core__aarch32.dir/fatal.c.obj
    [28/204] Building C object zephyr/arch/arch/arm/core/aarch32/CMakeFiles/arch__arm__core__aarch32.dir/nmi.c.obj
    [29/204] Building ASM object zephyr/arch/arch/arm/core/aarch32/CMakeFiles/arch__arm__core__aarch32.dir/nmi_on_reset.S.obj
    [30/204] Building C object zephyr/arch/common/CMakeFiles/isr_tables.dir/isr_tables.c.obj
    [31/204] Generating linker_zephyr_pre0.cmd
    [32/204] Building ASM object zephyr/arch/arch/arm/core/aarch32/CMakeFiles/arch__arm__core__aarch32.dir/isr_wrapper.S.obj
    [33/204] Building C object zephyr/arch/arch/arm/core/aarch32/CMakeFiles/arch__arm__core__aarch32.dir/prep_c.c.obj
    [34/204] Building C object zephyr/arch/arch/arm/core/aarch32/CMakeFiles/arch__arm__core__aarch32.dir/irq_manage.c.obj
    [35/204] Building C object zephyr/arch/arch/arm/core/aarch32/CMakeFiles/arch__arm__core__aarch32.dir/swap.c.obj
    [36/204] Building ASM object zephyr/arch/arch/arm/core/aarch32/CMakeFiles/arch__arm__core__aarch32.dir/swap_helper.S.obj
    [37/204] Building C object zephyr/arch/arch/arm/core/aarch32/CMakeFiles/arch__arm__core__aarch32.dir/thread.c.obj
    [38/204] Building ASM object zephyr/arch/arch/arm/core/aarch32/cortex_m/CMakeFiles/arch__arm__core__aarch32__cortex_m.dir/exc_exit.S.obj
    [39/204] Building ASM object zephyr/arch/arch/arm/core/aarch32/cortex_m/CMakeFiles/arch__arm__core__aarch32__cortex_m.dir/fault_s.S.obj
    [40/204] Building C object zephyr/arch/arch/arm/core/aarch32/cortex_m/CMakeFiles/arch__arm__core__aarch32__cortex_m.dir/fpu.c.obj
    [41/204] Building ASM object zephyr/arch/arch/arm/core/aarch32/cortex_m/CMakeFiles/arch__arm__core__aarch32__cortex_m.dir/reset.S.obj
    [42/204] Linking C static library zephyr\arch\common\libisr_tables.a
    [43/204] Building C object zephyr/arch/arch/arm/core/aarch32/cortex_m/CMakeFiles/arch__arm__core__aarch32__cortex_m.dir/fault.c.obj
    [44/204] Building C object zephyr/arch/arch/arm/core/aarch32/cortex_m/CMakeFiles/arch__arm__core__aarch32__cortex_m.dir/irq_init.c.obj
    [45/204] Building C object zephyr/arch/arch/arm/core/aarch32/cortex_m/CMakeFiles/arch__arm__core__aarch32__cortex_m.dir/thread_abort.c.obj
    [46/204] Building C object zephyr/arch/arch/arm/core/aarch32/cortex_m/CMakeFiles/arch__arm__core__aarch32__cortex_m.dir/scb.c.obj
    [47/204] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/dec.c.obj
    [48/204] Building ASM object zephyr/arch/arch/arm/core/aarch32/cortex_m/CMakeFiles/arch__arm__core__aarch32__cortex_m.dir/vector_table.S.obj
    [49/204] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/cbprintf_packaged.c.obj
    [50/204] Linking C static library zephyr\arch\arch\arm\core\aarch32\libarch__arm__core__aarch32.a
    [51/204] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/crc16_sw.c.obj
    [52/204] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/crc8_sw.c.obj
    [53/204] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/crc32_sw.c.obj
    [54/204] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/crc32c_sw.c.obj
    [55/204] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/crc7_sw.c.obj
    [56/204] Linking C static library zephyr\arch\common\libarch__common.a
    [57/204] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/printk.c.obj
    [58/204] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/notify.c.obj
    [59/204] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/hex.c.obj
    [60/204] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/timeutil.c.obj
    [61/204] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/fdtable.c.obj
    [62/204] Linking C static library zephyr\arch\arch\arm\core\aarch32\cortex_m\libarch__arm__core__aarch32__cortex_m.a
    [63/204] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/thread_entry.c.obj
    [64/204] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/onoff.c.obj
    [65/204] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/rb.c.obj
    [66/204] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/heap.c.obj
    [67/204] Generating ../../../include/generated/libc/minimal/strerror_table.h
    [68/204] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/sem.c.obj
    [69/204] Building C object zephyr/lib/posix/CMakeFiles/lib__posix.dir/perror.c.obj
    [70/204] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/bitarray.c.obj
    [71/204] Generating zephyr/autogen-pubkey.c
    [72/204] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/heap-validate.c.obj
    [73/204] Building C object zephyr/arch/arch/arm/core/aarch32/mpu/CMakeFiles/arch__arm__core__aarch32__mpu.dir/arm_mpu.c.obj
    [74/204] Building C object zephyr/arch/arch/arm/core/aarch32/mpu/CMakeFiles/arch__arm__core__aarch32__mpu.dir/arm_core_mpu.c.obj
    [75/204] Building C object zephyr/lib/posix/CMakeFiles/lib__posix.dir/nanosleep.c.obj
    [76/204] Building C object zephyr/lib/libc/minimal/CMakeFiles/lib__libc__minimal.dir/source/stdlib/abort.c.obj
    [77/204] Building C object zephyr/lib/posix/CMakeFiles/lib__posix.dir/pthread_common.c.obj
    [78/204] Building C object zephyr/lib/libc/minimal/CMakeFiles/lib__libc__minimal.dir/source/stdlib/strtoul.c.obj
    [79/204] Building C object zephyr/lib/libc/minimal/CMakeFiles/lib__libc__minimal.dir/source/stdlib/strtol.c.obj
    [80/204] Building C object zephyr/lib/libc/minimal/CMakeFiles/lib__libc__minimal.dir/source/stdlib/strtoll.c.obj
    [81/204] Building C object zephyr/CMakeFiles/zephyr_pre0.dir/misc/empty_file.c.obj
    [82/204] Building C object CMakeFiles/app.dir/keys.c.obj
    [83/204] Building C object CMakeFiles/app.dir/D_/ncs/v2.1.0/bootloader/mcuboot/boot/bootutil/src/encrypted.c.obj
    [84/204] Building C object CMakeFiles/app.dir/main.c.obj
    [85/204] Building C object CMakeFiles/app.dir/flash_map_extended.c.obj
    [86/204] Building C object CMakeFiles/app.dir/D_/ncs/v2.1.0/bootloader/mcuboot/boot/bootutil/src/tlv.c.obj
    [87/204] Building C object CMakeFiles/app.dir/os.c.obj
    [88/204] Building C object CMakeFiles/app.dir/D_/ncs/v2.1.0/bootloader/mcuboot/boot/bootutil/src/image_ed25519.c.obj
    [89/204] Building C object CMakeFiles/app.dir/D_/ncs/v2.1.0/bootloader/mcuboot/boot/bootutil/src/image_rsa.c.obj
    [90/204] Building C object CMakeFiles/app.dir/D_/ncs/v2.1.0/bootloader/mcuboot/boot/bootutil/src/image_validate.c.obj
    [91/204] Linking C static library zephyr\libzephyr.a
    [92/204] Building C object CMakeFiles/app.dir/D_/ncs/v2.1.0/bootloader/mcuboot/boot/bootutil/src/image_ec256.c.obj
    [93/204] Building C object CMakeFiles/app.dir/D_/ncs/v2.1.0/bootloader/mcuboot/boot/bootutil/src/fault_injection_hardening.c.obj
    [94/204] Building C object CMakeFiles/app.dir/D_/ncs/v2.1.0/bootloader/mcuboot/boot/bootutil/src/caps.c.obj
    [95/204] Building C object CMakeFiles/app.dir/D_/ncs/v2.1.0/bootloader/mcuboot/boot/bootutil/src/bootutil_misc.c.obj
    [96/204] Building C object CMakeFiles/app.dir/zephyr/autogen-pubkey.c.obj
    [97/204] Building C object CMakeFiles/app.dir/D_/ncs/v2.1.0/bootloader/mcuboot/boot/bootutil/src/swap_misc.c.obj
    [98/204] Building C object CMakeFiles/app.dir/nrf_cleanup.c.obj
    [99/204] Building C object CMakeFiles/app.dir/D_/ncs/v2.1.0/bootloader/mcuboot/boot/bootutil/src/swap_scratch.c.obj
    [100/204] Building C object CMakeFiles/app.dir/D_/ncs/v2.1.0/bootloader/mcuboot/ext/nrf/cc310_glue.c.obj
    [101/204] Building C object CMakeFiles/app.dir/D_/ncs/v2.1.0/bootloader/mcuboot/ext/mbedtls-asn1/src/asn1parse.c.obj
    [102/204] Building C object CMakeFiles/app.dir/D_/ncs/v2.1.0/bootloader/mcuboot/ext/mbedtls-asn1/src/platform_util.c.obj
    [103/204] Building C object CMakeFiles/app.dir/D_/ncs/v2.1.0/bootloader/mcuboot/boot/bootutil/src/swap_move.c.obj
    [104/204] Building C object zephyr/lib/libc/minimal/CMakeFiles/lib__libc__minimal.dir/source/stdlib/atoi.c.obj
    [105/204] Building C object zephyr/lib/libc/minimal/CMakeFiles/lib__libc__minimal.dir/source/stdlib/strtoull.c.obj
    [106/204] Building C object zephyr/lib/libc/minimal/CMakeFiles/lib__libc__minimal.dir/source/stdlib/bsearch.c.obj
    [107/204] Building C object zephyr/lib/libc/minimal/CMakeFiles/lib__libc__minimal.dir/source/stdlib/qsort.c.obj
    [108/204] Building C object CMakeFiles/app.dir/D_/ncs/v2.1.0/bootloader/mcuboot/boot/bootutil/src/loader.c.obj
    [109/204] Building C object zephyr/lib/libc/minimal/CMakeFiles/lib__libc__minimal.dir/source/string/string.c.obj
    [110/204] Building C object zephyr/lib/libc/minimal/CMakeFiles/lib__libc__minimal.dir/source/stdlib/exit.c.obj
    [111/204] Building C object zephyr/lib/libc/minimal/CMakeFiles/lib__libc__minimal.dir/source/string/strncasecmp.c.obj
    [112/204] Building C object zephyr/lib/libc/minimal/CMakeFiles/lib__libc__minimal.dir/source/string/strspn.c.obj
    [113/204] Building C object zephyr/lib/libc/minimal/CMakeFiles/lib__libc__minimal.dir/source/stdout/fprintf.c.obj
    [114/204] Building C object zephyr/lib/libc/minimal/CMakeFiles/lib__libc__minimal.dir/source/string/strstr.c.obj
    [115/204] Building C object zephyr/lib/libc/minimal/CMakeFiles/lib__libc__minimal.dir/source/stdlib/malloc.c.obj
    [116/204] Linking C static library zephyr\arch\arch\arm\core\aarch32\mpu\libarch__arm__core__aarch32__mpu.a
    [117/204] Building C object zephyr/lib/libc/minimal/CMakeFiles/lib__libc__minimal.dir/source/string/strerror.c.obj
    [118/204] Building C object zephyr/lib/libc/minimal/CMakeFiles/lib__libc__minimal.dir/source/math/sqrtf.c.obj
    [119/204] Building C object zephyr/lib/libc/minimal/CMakeFiles/lib__libc__minimal.dir/source/stdout/sprintf.c.obj
    [120/204] Building C object zephyr/lib/libc/minimal/CMakeFiles/lib__libc__minimal.dir/source/math/sqrt.c.obj
    [121/204] Building C object zephyr/lib/libc/minimal/CMakeFiles/lib__libc__minimal.dir/source/stdout/stdout_console.c.obj
    [122/204] Linking C static library app\libapp.a
    [123/204] Building C object zephyr/soc/arm/common/cortex_m/CMakeFiles/soc__arm__common__cortex_m.dir/arm_mpu_regions.c.obj
    [124/204] Linking C static library zephyr\lib\posix\liblib__posix.a
    [125/204] Building C object zephyr/soc/arm/nordic_nrf/nrf52/CMakeFiles/soc__arm__nordic_nrf__nrf52.dir/soc.c.obj
    [126/204] Building C object zephyr/lib/libc/minimal/CMakeFiles/lib__libc__minimal.dir/source/time/gmtime.c.obj
    [127/204] Building C object modules/nrf/lib/fatal_error/CMakeFiles/..__nrf__lib__fatal_error.dir/fatal_error.c.obj
    [128/204] Building C object zephyr/drivers/console/CMakeFiles/drivers__console.dir/uart_console.c.obj
    [129/204] Building C object zephyr/drivers/clock_control/CMakeFiles/drivers__clock_control.dir/clock_control_nrf.c.obj
    [130/204] Building C object zephyr/drivers/flash/CMakeFiles/drivers__flash.dir/flash_page_layout.c.obj
    [131/204] Building C object zephyr/drivers/gpio/CMakeFiles/drivers__gpio.dir/gpio_nrfx.c.obj
    [132/204] Building C object zephyr/drivers/serial/CMakeFiles/drivers__serial.dir/uart_nrfx_uarte.c.obj
    [133/204] Linking C static library zephyr\soc\arm\common\cortex_m\libsoc__arm__common__cortex_m.a
    [134/204] Linking C static library zephyr\soc\arm\nordic_nrf\nrf52\libsoc__arm__nordic_nrf__nrf52.a
    [135/204] Building C object zephyr/drivers/flash/CMakeFiles/drivers__flash.dir/soc_flash_nrf.c.obj
    [136/204] Linking C static library zephyr\lib\libc\minimal\liblib__libc__minimal.a
    [137/204] Linking C static library modules\nrf\lib\fatal_error\lib..__nrf__lib__fatal_error.a
    [138/204] Linking C static library zephyr\drivers\clock_control\libdrivers__clock_control.a
    [139/204] Building C object zephyr/drivers/timer/CMakeFiles/drivers__timer.dir/nrf_rtc_timer.c.obj
    [140/204] Linking C static library zephyr\drivers\serial\libdrivers__serial.a
    [141/204] Linking C static library zephyr\drivers\gpio\libdrivers__gpio.a
    [142/204] Linking C static library zephyr\drivers\console\libdrivers__console.a
    [143/204] Building C object zephyr/drivers/timer/CMakeFiles/drivers__timer.dir/sys_clock_init.c.obj
    [144/204] Building C object zephyr/drivers/pinctrl/CMakeFiles/drivers__pinctrl.dir/common.c.obj
    [145/204] Building C object modules/hal_nordic/nrfx/CMakeFiles/modules__hal_nordic__nrfx.dir/D_/ncs/v2.1.0/modules/hal/nordic/nrfx/mdk/system_nrf52840.c.obj
    [146/204] Building C object zephyr/drivers/pinctrl/CMakeFiles/drivers__pinctrl.dir/pinctrl_nrf.c.obj
    [147/204] Building C object modules/hal_nordic/nrfx/CMakeFiles/modules__hal_nordic__nrfx.dir/nrfx_glue.c.obj
    [148/204] Building C object modules/nrf/lib/fprotect/CMakeFiles/..__nrf__lib__fprotect.dir/fprotect_acl.c.obj
    [149/204] Building C object modules/nrf/drivers/hw_cc310/CMakeFiles/..__nrf__drivers__hw_cc310.dir/hw_cc310.c.obj
    [150/204] Linking C static library zephyr\drivers\flash\libdrivers__flash.a
    [151/204] Building C object modules/hal_nordic/nrfx/CMakeFiles/modules__hal_nordic__nrfx.dir/D_/ncs/v2.1.0/modules/hal/nordic/nrfx/helpers/nrfx_flag32_allocator.c.obj
    [152/204] Building C object modules/mcuboot/boot/bootutil/zephyr/CMakeFiles/mcuboot_util.dir/D_/ncs/v2.1.0/bootloader/mcuboot/boot/bootutil/src/bootutil_public.c.obj
    [153/204] Building C object modules/hal_nordic/nrfx/CMakeFiles/modules__hal_nordic__nrfx.dir/D_/ncs/v2.1.0/modules/hal/nordic/nrfx/drivers/src/nrfx_ppi.c.obj
    [154/204] Linking C static library zephyr\drivers\timer\libdrivers__timer.a
    [155/204] Linking C static library zephyr\drivers\pinctrl\libdrivers__pinctrl.a
    [156/204] Linking C static library modules\nrf\lib\fprotect\lib..__nrf__lib__fprotect.a
    [157/204] Building C object modules/hal_nordic/nrfx/CMakeFiles/modules__hal_nordic__nrfx.dir/D_/ncs/v2.1.0/modules/hal/nordic/nrfx/drivers/src/nrfx_clock.c.obj
    [158/204] Building C object modules/hal_nordic/nrfx/CMakeFiles/modules__hal_nordic__nrfx.dir/D_/ncs/v2.1.0/modules/hal/nordic/nrfx/drivers/src/nrfx_gpiote.c.obj
    [159/204] Building C object modules/hal_nordic/nrfx/CMakeFiles/modules__hal_nordic__nrfx.dir/D_/ncs/v2.1.0/modules/hal/nordic/nrfx/drivers/src/nrfx_wdt.c.obj
    [160/204] Building C object modules/hal_nordic/nrfx/CMakeFiles/modules__hal_nordic__nrfx.dir/D_/ncs/v2.1.0/modules/hal/nordic/nrfx/drivers/src/nrfx_nvmc.c.obj
    [161/204] Linking C static library modules\nrf\drivers\hw_cc310\lib..__nrf__drivers__hw_cc310.a
    [162/204] Linking C static library modules\mcuboot\boot\bootutil\zephyr\libmcuboot_util.a
    [163/204] Building C object modules/segger/CMakeFiles/modules__segger.dir/SEGGER_RTT_zephyr.c.obj
    [164/204] Building C object modules/segger/CMakeFiles/modules__segger.dir/D_/ncs/v2.1.0/modules/debug/segger/SEGGER/SEGGER_RTT.c.obj
    [165/204] Building C object zephyr/kernel/CMakeFiles/kernel.dir/main_weak.c.obj
    [166/204] Building C object zephyr/kernel/CMakeFiles/kernel.dir/banner.c.obj
    [167/204] Building C object zephyr/kernel/CMakeFiles/kernel.dir/errno.c.obj
    [168/204] Linking C static library modules\hal_nordic\nrfx\libmodules__hal_nordic__nrfx.a
    [169/204] Building C object zephyr/kernel/CMakeFiles/kernel.dir/fatal.c.obj
    [170/204] Building C object zephyr/kernel/CMakeFiles/kernel.dir/version.c.obj
    [171/204] Building C object zephyr/kernel/CMakeFiles/kernel.dir/device.c.obj
    [172/204] Building C object zephyr/kernel/CMakeFiles/kernel.dir/init.c.obj
    [173/204] Building C object zephyr/kernel/CMakeFiles/kernel.dir/kheap.c.obj
    [174/204] Building C object zephyr/kernel/CMakeFiles/kernel.dir/idle.c.obj
    [175/204] Building C object zephyr/kernel/CMakeFiles/kernel.dir/mem_slab.c.obj
    [176/204] Building C object zephyr/kernel/CMakeFiles/kernel.dir/thread.c.obj
    [177/204] Linking C static library modules\segger\libmodules__segger.a
    [178/204] Building C object zephyr/kernel/CMakeFiles/kernel.dir/queue.c.obj
    [179/204] Building C object zephyr/kernel/CMakeFiles/kernel.dir/msg_q.c.obj
    [180/204] Building C object zephyr/kernel/CMakeFiles/kernel.dir/sem.c.obj
    [181/204] Building C object zephyr/kernel/CMakeFiles/kernel.dir/mailbox.c.obj
    [182/204] Building C object zephyr/kernel/CMakeFiles/kernel.dir/mutex.c.obj
    [183/204] Building C object zephyr/kernel/CMakeFiles/kernel.dir/system_work_q.c.obj
    [184/204] Building C object zephyr/kernel/CMakeFiles/kernel.dir/condvar.c.obj
    [185/204] Building C object zephyr/kernel/CMakeFiles/kernel.dir/pipes.c.obj
    [186/204] Building C object zephyr/kernel/CMakeFiles/kernel.dir/xip.c.obj
    [187/204] Building C object zephyr/kernel/CMakeFiles/kernel.dir/stack.c.obj
    [188/204] Building C object zephyr/kernel/CMakeFiles/kernel.dir/mempool.c.obj
    [189/204] Building C object zephyr/kernel/CMakeFiles/kernel.dir/sched.c.obj
    [190/204] Building C object zephyr/kernel/CMakeFiles/kernel.dir/work.c.obj
    [191/204] Building C object zephyr/kernel/CMakeFiles/kernel.dir/timeout.c.obj
    [192/204] Building C object zephyr/kernel/CMakeFiles/kernel.dir/timer.c.obj
    [193/204] Linking C static library zephyr\kernel\libkernel.a
    [194/204] Linking C executable zephyr\zephyr_pre0.elf
    
    [195/204] Generating dev_handles.c
    [196/204] Building C object zephyr/CMakeFiles/zephyr_pre1.dir/misc/empty_file.c.obj
    [197/204] Building C object zephyr/CMakeFiles/zephyr_pre1.dir/dev_handles.c.obj
    [198/204] Linking C executable zephyr\zephyr_pre1.elf
    
    [199/204] Generating linker.cmd
    [200/204] Generating isr_tables.c, isrList.bin
    [201/204] Building C object zephyr/CMakeFiles/zephyr_final.dir/misc/empty_file.c.obj
    [202/204] Building C object zephyr/CMakeFiles/zephyr_final.dir/isr_tables.c.obj
    [203/204] Building C object zephyr/CMakeFiles/zephyr_final.dir/dev_handles.c.obj
    [204/204] Linking C executable zephyr\zephyr.elf
    Memory region Used Size Region Size %age Used
    FLASH: 39016 B 48 KB 79.38%
    SRAM: 20608 B 256 KB 7.86%
    IDT_LIST: 0 GB 2 KB 0.00%
    [209/230] Linking C executable zephyr\zephyr_pre0.elf
    
    [213/230] Linking C executable zephyr\zephyr_pre1.elf
    
    [218/230] Building C object zephyr/CMakeFiles/zephyr_final.dir/dev_handles.c.obj
    [220/230] No install step for 'mcuboot_subimage'
    [221/230] Linking C executable zephyr\zephyr.elf
    Memory region Used Size Region Size %age Used
    FLASH: 52256 B 499200 B 10.47%
    SRAM: 19248 B 256 KB 7.34%
    IDT_LIST: 0 GB 2 KB 0.00%
    [222/230] Completed 'mcuboot_subimage'
    [223/230] Generating zephyr/mcuboot_primary.hex
    [224/230] Generating zephyr/mcuboot_primary_app.hex
    [225/230] Generating ../../zephyr/app_update.bin
    sign the payload
    [226/230] Generating ../../zephyr/app_signed.hex
    sign the payload
    [227/230] Generating ../../zephyr/dfu_application.zip
    [228/230] Generating ../../zephyr/app_test_update.hex
    sign the payload
    [229/230] Generating ../../zephyr/app_moved_test_update.hex
    [230/230] Generating zephyr/merged.hex
    * Terminal will be reused by tasks, press any key to close it.
    ==================================
    MCU boot logs added : 
    just after flashing second build and a reset:

    [00:00:00.003,875] <inf> mcuboot: Starting bootloader
    [00:00:00.004,333] <inf> mcuboot: Primary image: magic=good, swap_type=0x4, copy_done=0x1, image_ok=0x1
    [00:00:00.004,394] <inf> mcuboot: Secondary image: magic=unset, swap_type=0x1, copy_done=0x3, image_ok=0x3
    [00:00:00.004,394] <inf> mcuboot: Boot source: none
    [00:00:00.004,486] <inf> mcuboot: Swap type: none
    

    after image test
    mcumgr --conntype serial --connstring "COM7,baud=115200" image test 347abe036d7dd3901fedabebc87b98e35a99b99f85968d71a123a8179c4570e6
    and reset

    *** Booting Zephyr OS build v3.1.99-ncs1 ***
    [00:00:00.003,875] <inf> mcuboot: Starting bootloader
    [00:00:00.004,333] <inf> mcuboot: Primary image: magic=good, swap_type=0x4, copy_done=0x1, image_ok=0x1
    [00:00:00.004,394] <inf> mcuboot: Secondary image: magic=good, swap_type=0x2, copy_done=0x3, image_ok=0x3
    [00:00:00.004,394] <inf> mcuboot: Boot source: none
    [00:00:00.004,486] <inf> mcuboot: Swap type: test
    [00:00:00.072,021] <inf> mcuboot: Starting swap using move algorithm.


    no more displays, even waiting for 5mn

    and the J-Link log confirms that we are running the new build

    and image list returns
    Images:
    image=0 slot=0
    version: 0.0.0
    bootable: true
    flags: active
    hash: 347abe036d7dd3901fedabebc87b98e35a99b99f85968d71a123a8179c4570e6
    image=0 slot=1
    version: 0.0.0
    bootable: true
    flags: confirmed
    hash: 490fe0ea0066fde74379562f5a0239679c40c6523c0a9a1a9ed53a55cbf94b02
    Split status: N/A (0)


    then image confirm still returns an error 3....
    mcumgr --conntype serial --connstring "COM7,baud=115200" image confirm
    Error 3......

    image list shows still
    mcumgr --conntype serial --connstring "COM7,baud=115200" image list
    Images:
    image=0 slot=0
    version: 0.0.0
    bootable: true
    flags: active
    hash: 347abe036d7dd3901fedabebc87b98e35a99b99f85968d71a123a8179c4570e6
    image=0 slot=1
    version: 0.0.0
    bootable: true
    flags: confirmed
    hash: 490fe0ea0066fde74379562f5a0239679c40c6523c0a9a1a9ed53a55cbf94b02
    Split status: N/A (0)


    so all I can do is a reset, in case ?
    but then I see that I reboot on the first original image (oldest date)

    and the mcuboot log confirms that we are back at square 1


    I hope that you can find with all this information what's wrong
  • Can you post a link to the file that sets:

    CONFIG_CLOCK_CONTROL_NRF_K32SRC_SYNTH=y
    CONFIG_CLOCK_CONTROL_NRF_K32SRC_XTAL=n

    in mcuboot? As far as I can see, this is not set by default in the prj.conf file.
    Can you also verify that this is set in the built config (from sample directory: build\mcuboot\zephyr\.config). I built a sample with MCUboot for nRF52840 DK, and this is the result:
    CONFIG_CLOCK_CONTROL_NRF_K32SRC_XTAL=y
    # CONFIG_CLOCK_CONTROL_NRF_K32SRC_SYNTH is not set
  • build\mcuboot\zephyr\.config

    it does also contain the line.

    # CONFIG_CLOCK_CONTROL_LOG_LEVEL_OFF is not set
    # CONFIG_CLOCK_CONTROL_LOG_LEVEL_ERR is not set
    # CONFIG_CLOCK_CONTROL_LOG_LEVEL_WRN is not set
    CONFIG_CLOCK_CONTROL_LOG_LEVEL_INF=y
    # CONFIG_CLOCK_CONTROL_LOG_LEVEL_DBG is not set
    CONFIG_CLOCK_CONTROL_LOG_LEVEL=3
    CONFIG_CLOCK_CONTROL_NRF=y
    # CONFIG_CLOCK_CONTROL_NRF_K32SRC_RC is not set
    # CONFIG_CLOCK_CONTROL_NRF_K32SRC_XTAL is not set
    CONFIG_CLOCK_CONTROL_NRF_K32SRC_SYNTH=y
    # CONFIG_CLOCK_CONTROL_NRF_K32SRC_EXT_LOW_SWING is not set
    # CONFIG_CLOCK_CONTROL_NRF_K32SRC_EXT_FULL_SWING is not set
    # CONFIG_CLOCK_CONTROL_NRF_K32SRC_500PPM is not set
    # CONFIG_CLOCK_CONTROL_NRF_K32SRC_250PPM is not set
    # CONFIG_CLOCK_CONTROL_NRF_K32SRC_150PPM is not set
    # CONFIG_CLOCK_CONTROL_NRF_K32SRC_100PPM is not set
    # CONFIG_CLOCK_CONTROL_NRF_K32SRC_75PPM is not set
    CONFIG_CLOCK_CONTROL_NRF_K32SRC_50PPM=y
    # CONFIG_CLOCK_CONTROL_NRF_K32SRC_30PPM is not set
    # CONFIG_CLOCK_CONTROL_NRF_K32SRC_20PPM is not set
    CONFIG_CLOCK_CONTROL_NRF_ACCURACY=50

    ====================================

    D:\ncs\v2.1.0\bootloader\mcuboot\boot\zephyr\prj.conf

    contains it too.  I did so many modifications, I may have forgotten that I had done myself right from the start ? 

    (I have not modified it since the start of that discussion, except for the signature part)

    it is at the end

    CONFIG_PM=n


    CONFIG_MAIN_STACK_SIZE=10240
    CONFIG_MBEDTLS_CFG_FILE="mcuboot-mbedtls-cfg.h"

    # Start LC changes
    # Signature to use
    # private sig
    CONFIG_BOOT_SIGNATURE_KEY_FILE="D:\\ .personal info.. private1.pem"
    CONFIG_BOOT_SIGNATURE_TYPE_ECDSA_P256=y

    # End LC changes

    CONFIG_BOOT_SWAP_SAVE_ENCTLV=n
    CONFIG_BOOT_ENCRYPT_RSA=n
    CONFIG_BOOT_ENCRYPT_EC256=n
    CONFIG_BOOT_ENCRYPT_X25519=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=n # former CONFIG_MODE_MINIMAL
    ### Ensure Zephyr logging changes don't use more resources
    CONFIG_LOG_DEFAULT_LEVEL=0
    ### Decrease footprint by ~4 KB in comparison to CBPRINTF_COMPLETE=y
    CONFIG_CBPRINTF_NANO=y
    CONFIG_NRF_RTC_TIMER_USER_CHAN_COUNT=0

    #CONFIG_BOARD_ENABLE_DCDC=n
    CONFIG_CLOCK_CONTROL_NRF_K32SRC_SYNTH=y
    CONFIG_CLOCK_CONTROL_NRF_K32SRC_XTAL=n
    CONFIG_MULTITHREADING=y
    ======================================
    It could work partially without that set properly ?  
    If no, then it looks like a more in depth problem. 
    So, How can we proceed so that we find quickly the issue ? 
    I can of course remodify the devkit to be in the exact original config...
    But that does not look like 
Reply
  • build\mcuboot\zephyr\.config

    it does also contain the line.

    # CONFIG_CLOCK_CONTROL_LOG_LEVEL_OFF is not set
    # CONFIG_CLOCK_CONTROL_LOG_LEVEL_ERR is not set
    # CONFIG_CLOCK_CONTROL_LOG_LEVEL_WRN is not set
    CONFIG_CLOCK_CONTROL_LOG_LEVEL_INF=y
    # CONFIG_CLOCK_CONTROL_LOG_LEVEL_DBG is not set
    CONFIG_CLOCK_CONTROL_LOG_LEVEL=3
    CONFIG_CLOCK_CONTROL_NRF=y
    # CONFIG_CLOCK_CONTROL_NRF_K32SRC_RC is not set
    # CONFIG_CLOCK_CONTROL_NRF_K32SRC_XTAL is not set
    CONFIG_CLOCK_CONTROL_NRF_K32SRC_SYNTH=y
    # CONFIG_CLOCK_CONTROL_NRF_K32SRC_EXT_LOW_SWING is not set
    # CONFIG_CLOCK_CONTROL_NRF_K32SRC_EXT_FULL_SWING is not set
    # CONFIG_CLOCK_CONTROL_NRF_K32SRC_500PPM is not set
    # CONFIG_CLOCK_CONTROL_NRF_K32SRC_250PPM is not set
    # CONFIG_CLOCK_CONTROL_NRF_K32SRC_150PPM is not set
    # CONFIG_CLOCK_CONTROL_NRF_K32SRC_100PPM is not set
    # CONFIG_CLOCK_CONTROL_NRF_K32SRC_75PPM is not set
    CONFIG_CLOCK_CONTROL_NRF_K32SRC_50PPM=y
    # CONFIG_CLOCK_CONTROL_NRF_K32SRC_30PPM is not set
    # CONFIG_CLOCK_CONTROL_NRF_K32SRC_20PPM is not set
    CONFIG_CLOCK_CONTROL_NRF_ACCURACY=50

    ====================================

    D:\ncs\v2.1.0\bootloader\mcuboot\boot\zephyr\prj.conf

    contains it too.  I did so many modifications, I may have forgotten that I had done myself right from the start ? 

    (I have not modified it since the start of that discussion, except for the signature part)

    it is at the end

    CONFIG_PM=n


    CONFIG_MAIN_STACK_SIZE=10240
    CONFIG_MBEDTLS_CFG_FILE="mcuboot-mbedtls-cfg.h"

    # Start LC changes
    # Signature to use
    # private sig
    CONFIG_BOOT_SIGNATURE_KEY_FILE="D:\\ .personal info.. private1.pem"
    CONFIG_BOOT_SIGNATURE_TYPE_ECDSA_P256=y

    # End LC changes

    CONFIG_BOOT_SWAP_SAVE_ENCTLV=n
    CONFIG_BOOT_ENCRYPT_RSA=n
    CONFIG_BOOT_ENCRYPT_EC256=n
    CONFIG_BOOT_ENCRYPT_X25519=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=n # former CONFIG_MODE_MINIMAL
    ### Ensure Zephyr logging changes don't use more resources
    CONFIG_LOG_DEFAULT_LEVEL=0
    ### Decrease footprint by ~4 KB in comparison to CBPRINTF_COMPLETE=y
    CONFIG_CBPRINTF_NANO=y
    CONFIG_NRF_RTC_TIMER_USER_CHAN_COUNT=0

    #CONFIG_BOARD_ENABLE_DCDC=n
    CONFIG_CLOCK_CONTROL_NRF_K32SRC_SYNTH=y
    CONFIG_CLOCK_CONTROL_NRF_K32SRC_XTAL=n
    CONFIG_MULTITHREADING=y
    ======================================
    It could work partially without that set properly ?  
    If no, then it looks like a more in depth problem. 
    So, How can we proceed so that we find quickly the issue ? 
    I can of course remodify the devkit to be in the exact original config...
    But that does not look like 
Children
No Data
Related