MCUBoot with serial UART and image encryption

I am working on a development with a nRF52840-DK development board and I am trying to enable image encryption with MCUboot. I followed the case advice given in "nRF52840 + NCS + MCUBoot, CC310-enabled image encryption?" since it appeared to be working. However I also have the UART serial port enabled and that appears to be generating a compile error as shown below.

C:\nordicsemi\v2.0.0\bootloader\mcuboot\boot\boot_serial\src\boot_serial.c:476: undefined reference to `boot_handle_enc_fw'
collect2.exe: error: ld returned 1 exit status

The .conf files are shown below.

prj.conf file:

CONFIG_GPIO=y
CONFIG_BOOTLOADER_MCUBOOT=y

mcuboot.conf file:

CONFIG_SIZE_OPTIMIZATIONS=y

CONFIG_PM_PARTITION_SIZE_MCUBOOT=0x10000

CONFIG_UART_CONSOLE=n
CONFIG_MCUBOOT_SERIAL=y
CONFIG_BOOT_SERIAL_UART=y

CONFIG_BOOT_SIGNATURE_TYPE_ECDSA_P256=y
CONFIG_BOOT_SIGNATURE_KEY_FILE="C:/Workspace/VScode/wren_blinky/child_image/keys/mcuboot_private_sign.pem"

CONFIG_BOOT_ENCRYPT_EC256=y
CONFIG_BOOT_ENCRYPTION_KEY_FILE="C:/Workspace/VScode/wren_blinky/child_image/keys/mcuboot_private_enc.pem"

CONFIG_BOOT_ECDSA_TINYCRYPT=y

Bootloading with mcumger works with the signature enabled. However, adding the CONFIG_BOOT_ENCRYPT_EC256=y line causes the undefined reference to boot_handle_enc_fw error to be generated. Any ideas why I am getting this compile error?

Best regards,

Ray

  • Hi, 

    As my colleague Virda said in that postEncrypted DFU is feature we do not officially support in our SDK. You could edit the CMakeLists.txt as Virda indicated in the thread

    Regards,
    Amanda

  • Hi Amanda,

    I did get encrypted DFU to work following the links you provided with a few additions. To fix the 'boot_handle_enc_fw' issue I had to add CONFIG_SINGLE_APPLICATION_SLOT=y. This enables including 'boot_handle_enc_fw' in the build. I also had to change CONFIG_BOOT_ENCRYPT_EC256=y to CONFIG_BOOT_SERIAL_ENCRYPT_EC256=y to fix some compile errors. Finally I added the line --encrypt C:/Workspace/VScode/wren2_blinky/child_image/keys/mcuboot_private_enc.pem to the CMakeLists.txt file as shown in one of the links. The app_update.bin file is now encrypted and downloads with mcumgr.

    A new issue is there appears to be a size limit to app_update.bin where encrypted DFU fails. If the app_update.bin file is greater than about 238K, encrypted DFU appears to stop working. Is there something I need to add or change in the configuration to remove the app_update.bin file size limitation?

    Best regards,

    Ray

  • Hi, 

    rdolejs said:
    The app_update.bin file is now encrypted and downloads with mcumgr.

    Good to hear you make it work. 

    rdolejs said:
    Is there something I need to add or change in the configuration to remove the app_update.bin file size limitation?

    I think the size is depended on the available slot's space. 

    Could you update the prj.conf and mcuboot.conf? Please run "ninja partition_manager_report" under build folder and provide the report. Thanks. 

    -Amanda

  • Hi,

    An error on my part on generating an encrypted app_update.bin file. I am not able to generate an encrypted file. Let's set aside the file size limitation for now.

    My test setup is a nRF52840-DK, VS Code with SDK 2.0.0 and mcumgr CLI. The starting point is the blinky example. I added the following prj.conf file:

    CONFIG_GPIO=y
    CONFIG_BOOTLOADER_MCUBOOT=y
    
    CONFIG_CLOCK_CONTROL_NRF_K32SRC_RC=y
    

    And mcuboot.conf file:

    CONFIG_SIZE_OPTIMIZATIONS=y
    
    CONFIG_PM_PARTITION_SIZE_MCUBOOT=0x10000
    
    CONFIG_UART_CONSOLE=n
    CONFIG_MCUBOOT_SERIAL=y
    CONFIG_BOOT_SERIAL_UART=y
    
    # Signature configuration
    CONFIG_BOOT_SIGNATURE_TYPE_ECDSA_P256=y
    CONFIG_BOOT_SIGNATURE_KEY_FILE="C:/Workspace/VScode/blinky/child_image/keys/mcuboot_private_sign.pem"
    
    # Encryption configuration
    CONFIG_BOOT_SERIAL_ENCRYPT_EC256=y
    CONFIG_BOOT_ENCRYPTION_KEY_FILE="C:/Workspace/VScode/blinky/child_image/keys/mcuboot_private_enc.pem"
    
    CONFIG_BOOT_ECDSA_TINYCRYPT=y
    
    CONFIG_SINGLE_APPLICATION_SLOT=y

    The project compiles :

    Executing task: nRF Connect: Build: blinky/release_build (active) 
    
    Building blinky
    west build --build-dir c:\Workspace\VScode\blinky\release_build c:\Workspace\VScode\blinky --pristine --board nrf52840dk_nrf52840 -- -DNCS_TOOLCHAIN_VERSION:STRING="NONE" -DCONF_FILE:STRING="c:/Workspace/VScode/blinky/prj.conf"
    
    -- west build: generating a build system
    Loading Zephyr default modules (Zephyr base).
    -- Application: C:/Workspace/VScode/blinky
    -- Found Python3: C:/nordicsemi/toolchains/v2.0.0/opt/bin/python.exe (found suitable exact version "3.8.2") found components: Interpreter 
    -- Cache files will be written to: C:/nordicsemi/v2.0.0/zephyr/.cache
    -- Zephyr version: 3.0.99 (C:/nordicsemi/v2.0.0/zephyr)
    -- Found west (found suitable version "0.13.1", minimum required is "0.7.1")
    -- Board: nrf52840dk_nrf52840
    -- Found host-tools: zephyr 0.14.1 (C:/nordicsemi/toolchains/v2.0.0/opt/zephyr-sdk)
    -- Found dtc: C:/nordicsemi/toolchains/v2.0.0/opt/bin/dtc.exe (found suitable version "1.4.7", minimum required is "1.4.6")
    -- Found toolchain: zephyr 0.14.1 (C:/nordicsemi/toolchains/v2.0.0/opt/zephyr-sdk)
    -- Found BOARD.dts: C:/nordicsemi/v2.0.0/zephyr/boards/arm/nrf52840dk_nrf52840/nrf52840dk_nrf52840.dts
    -- Generated zephyr.dts: C:/Workspace/VScode/blinky/release_build/zephyr/zephyr.dts
    -- Generated devicetree_unfixed.h: C:/Workspace/VScode/blinky/release_build/zephyr/include/generated/devicetree_unfixed.h
    -- Generated device_extern.h: C:/Workspace/VScode/blinky/release_build/zephyr/include/generated/device_extern.h
    -- Including generated dts.cmake file: C:/Workspace/VScode/blinky/release_build/zephyr/dts.cmake
    Parsing C:/nordicsemi/v2.0.0/zephyr/Kconfig
    Loaded configuration 'C:/nordicsemi/v2.0.0/zephyr/boards/arm/nrf52840dk_nrf52840/nrf52840dk_nrf52840_defconfig'
    Merged configuration 'c:/Workspace/VScode/blinky/prj.conf'
    Configuration saved to 'C:/Workspace/VScode/blinky/release_build/zephyr/.config'
    Kconfig header saved to 'C:/Workspace/VScode/blinky/release_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: C:/nordicsemi/toolchains/v2.0.0/opt/zephyr-sdk/arm-zephyr-eabi/bin/arm-zephyr-eabi-gcc.exe
    -- Found Python3: C:/nordicsemi/toolchains/v2.0.0/opt/bin/python.exe (found version "3.8.2") found components: Interpreter 
    
    === child image mcuboot -  begin ===
    loading initial cache file C:/Workspace/VScode/blinky/release_build/mcuboot/child_image_preload.cmake
    Loading Zephyr default modules (Zephyr base).
    -- Application: C:/nordicsemi/v2.0.0/bootloader/mcuboot/boot/zephyr
    -- Found Python3: C:/nordicsemi/toolchains/v2.0.0/opt/bin/python.exe (found suitable exact version "3.8.2") found components: Interpreter 
    -- Cache files will be written to: C:/nordicsemi/v2.0.0/zephyr/.cache
    -- Zephyr version: 3.0.99 (C:/nordicsemi/v2.0.0/zephyr)
    -- Found west (found suitable version "0.13.1", minimum required is "0.7.1")
    -- Board: nrf52840dk_nrf52840
    -- Found host-tools: zephyr 0.14.1 (C:/nordicsemi/toolchains/v2.0.0/opt/zephyr-sdk)
    -- Found dtc: C:/nordicsemi/toolchains/v2.0.0/opt/bin/dtc.exe (found suitable version "1.4.7", minimum required is "1.4.6")
    -- Found toolchain: zephyr 0.14.1 (C:/nordicsemi/toolchains/v2.0.0/opt/zephyr-sdk)
    -- Found BOARD.dts: C:/nordicsemi/v2.0.0/zephyr/boards/arm/nrf52840dk_nrf52840/nrf52840dk_nrf52840.dts
    -- Found devicetree overlay: C:/nordicsemi/v2.0.0/nrf/modules/mcuboot/usb.overlay
    -- Found devicetree overlay: C:/nordicsemi/v2.0.0/bootloader/mcuboot/boot/zephyr/dts.overlay
    -- Generated zephyr.dts: C:/Workspace/VScode/blinky/release_build/mcuboot/zephyr/zephyr.dts
    -- Generated devicetree_unfixed.h: C:/Workspace/VScode/blinky/release_build/mcuboot/zephyr/include/generated/devicetree_unfixed.h
    -- Generated device_extern.h: C:/Workspace/VScode/blinky/release_build/mcuboot/zephyr/include/generated/device_extern.h
    -- Including generated dts.cmake file: C:/Workspace/VScode/blinky/release_build/mcuboot/zephyr/dts.cmake
    Parsing C:/nordicsemi/v2.0.0/bootloader/mcuboot/boot/zephyr/Kconfig
    Loaded configuration 'C:/nordicsemi/v2.0.0/zephyr/boards/arm/nrf52840dk_nrf52840/nrf52840dk_nrf52840_defconfig'
    Merged configuration 'C:/nordicsemi/v2.0.0/bootloader/mcuboot/boot/zephyr/prj.conf'
    Merged configuration 'C:/nordicsemi/v2.0.0/nrf/subsys/partition_manager/partition_manager_enabled.conf'
    Merged configuration 'C:/Workspace/VScode/blinky/child_image/mcuboot.conf'
    Merged configuration 'C:/Workspace/VScode/blinky/release_build/mcuboot/zephyr/misc/generated/extra_kconfig_options.conf'
    Configuration saved to 'C:/Workspace/VScode/blinky/release_build/mcuboot/zephyr/.config'
    Kconfig header saved to 'C:/Workspace/VScode/blinky/release_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: C:/nordicsemi/toolchains/v2.0.0/opt/zephyr-sdk/arm-zephyr-eabi/bin/arm-zephyr-eabi-gcc.exe
    CMake Warning at C:/nordicsemi/v2.0.0/nrf/lib/flash_patch/CMakeLists.txt:9 (message):
      
    
            ----------------------------------------------------------
            --- WARNING: To maintain the integrity of secure boot, ---
            --- enable CONFIG_DISABLE_FLASH_PATCH in production.   ---
            ----------------------------------------------------------
    
    
    CMake Warning at C:/nordicsemi/v2.0.0/zephyr/CMakeLists.txt:814 (message):
      No SOURCES given to Zephyr library: drivers__console
    
      Excluding target from build.
    
    
    MCUBoot bootloader key file: C:/Workspace/VScode/blinky/child_image/keys/mcuboot_private_sign.pem
    MCUBoot bootloader encryption key file: C:/Workspace/VScode/blinky/child_image/keys/mcuboot_private_enc.pem
    -- Configuring done
    -- Generating done
    -- Build files have been written to: C:/Workspace/VScode/blinky/release_build/mcuboot
    === child image mcuboot -  end ===
    
    -- Configuring done
    -- Generating done
    -- Build files have been written to: C:/Workspace/VScode/blinky/release_build
    -- west build: building application
    [1/188] Generating include/generated/version.h
    -- Zephyr version: 3.0.99 (C:/nordicsemi/v2.0.0/zephyr), build: v3.0.99-ncs1
    [2/188] Creating directories for 'mcuboot_subimage'
    [3/188] Generating misc/generated/syscalls.json, misc/generated/struct_tags.json
    [4/188] No download step for 'mcuboot_subimage'
    [5/188] No update step for 'mcuboot_subimage'
    [6/188] Generating include/generated/kobj-types-enum.h, include/generated/otype-to-str.h, include/generated/otype-to-size.h
    [7/188] Generating include/generated/driver-validation.h
    [8/188] No patch step for 'mcuboot_subimage'
    [9/188] No configure step for 'mcuboot_subimage'
    [9/188] Performing build step for 'mcuboot_subimage'
    [1/199] Generating include/generated/version.h
    -- Zephyr version: 3.0.99 (C:/nordicsemi/v2.0.0/zephyr), build: v3.0.99-ncs1
    [2/199] Generating misc/generated/syscalls.json, misc/generated/struct_tags.json
    [3/199] Generating include/generated/driver-validation.h
    [4/199] Generating include/generated/kobj-types-enum.h, include/generated/otype-to-str.h, include/generated/otype-to-size.h
    [5/199] Generating include/generated/syscall_dispatch.c, include/generated/syscall_list.h
    [6/199] Building C object zephyr/CMakeFiles/offsets.dir/arch/arm/core/offsets/offsets.c.obj
    [7/199] Generating include/generated/offsets.h
    [8/199] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/onoff.c.obj
    [9/199] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/sem.c.obj
    [10/199] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/rb.c.obj
    [11/199] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/crc7_sw.c.obj
    [12/199] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/thread_entry.c.obj
    [13/199] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/dec.c.obj
    [14/199] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/timeutil.c.obj
    [15/199] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/hex.c.obj
    [16/199] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/fdtable.c.obj
    [17/199] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/crc8_sw.c.obj
    [18/199] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/notify.c.obj
    [19/199] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/printk.c.obj
    [20/199] Building C object zephyr/CMakeFiles/zephyr.dir/soc/arm/nordic_nrf/validate_base_addresses.c.obj
    [21/199] Building ASM object zephyr/CMakeFiles/zephyr.dir/soc/arm/nordic_nrf/common/soc_nrf_common.S.obj
    [22/199] Building C object zephyr/CMakeFiles/zephyr.dir/misc/generated/configs.c.obj
    [23/199] Building C object zephyr/CMakeFiles/zephyr.dir/soc/arm/nordic_nrf/validate_enabled_instances.c.obj
    [24/199] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/cbprintf_nano.c.obj
    [25/199] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/multi_heap.c.obj
    [26/199] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/reboot.c.obj
    [27/199] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/assert.c.obj
    [28/199] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/heap.c.obj
    [29/199] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/heap-validate.c.obj
    [30/199] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/bitarray.c.obj
    [31/199] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/mpsc_pbuf.c.obj
    [32/199] Building C object zephyr/CMakeFiles/zephyr.dir/subsys/tracing/tracing_none.c.obj
    [33/199] Building C object zephyr/CMakeFiles/zephyr.dir/subsys/storage/flash_map/flash_map_layout.c.obj
    [34/199] Building C object zephyr/CMakeFiles/zephyr.dir/subsys/logging/log_minimal.c.obj
    [35/199] Building C object zephyr/CMakeFiles/zephyr.dir/C_/nordicsemi/v2.0.0/nrf/subsys/partition_manager/flash_map_partition_manager.c.obj
    [36/199] Building C object zephyr/CMakeFiles/zephyr.dir/subsys/storage/flash_map/flash_map.c.obj
    [37/199] Building C object zephyr/CMakeFiles/zephyr.dir/C_/nordicsemi/v2.0.0/nrfxlib/crypto/nrf_cc310_platform/src/nrf_cc3xx_platform_abort_zephyr.c.obj
    [38/199] Building C object zephyr/CMakeFiles/zephyr.dir/C_/nordicsemi/v2.0.0/bootloader/mcuboot/boot/boot_serial/src/serial_recovery_cbor.c.obj
    [39/199] Building C object zephyr/CMakeFiles/zephyr.dir/C_/nordicsemi/v2.0.0/nrfxlib/crypto/nrf_cc310_platform/src/nrf_cc3xx_platform_no_mutex_zephyr.c.obj
    [40/199] Building C object zephyr/CMakeFiles/zephyr.dir/C_/nordicsemi/v2.0.0/bootloader/mcuboot/boot/zephyr/serial_adapter.c.obj
    [41/199] Building C object zephyr/CMakeFiles/zephyr.dir/C_/nordicsemi/v2.0.0/bootloader/mcuboot/boot/boot_serial/src/boot_serial.c.obj
    [42/199] Building C object zephyr/CMakeFiles/zephyr.dir/C_/nordicsemi/v2.0.0/bootloader/mcuboot/boot/boot_serial/src/cbor_decode.c.obj
    [43/199] Building C object zephyr/CMakeFiles/zephyr.dir/C_/nordicsemi/v2.0.0/bootloader/mcuboot/boot/boot_serial/src/cbor_encode.c.obj
    [44/199] Building C object zephyr/CMakeFiles/zephyr.dir/C_/nordicsemi/v2.0.0/bootloader/mcuboot/boot/boot_serial/src/cbor_common.c.obj
    [45/199] Generating zephyr/autogen-pubkey.c
    [46/199] Generating zephyr/autogen-enckey.c
    [47/199] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/crc32c_sw.c.obj
    [48/199] Generating linker_zephyr_pre1.cmd
    [49/199] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/base64.c.obj
    [50/199] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/crc16_sw.c.obj
    [51/199] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/cbprintf.c.obj
    [52/199] Generating linker_zephyr_pre0.cmd
    [53/199] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/crc32_sw.c.obj
    [54/199] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/cbprintf_packaged.c.obj
    [55/199] Building C object zephyr/arch/common/CMakeFiles/isr_tables.dir/isr_tables.c.obj
    [56/199] Building C object CMakeFiles/app.dir/flash_map_extended.c.obj
    [57/199] Building C object CMakeFiles/app.dir/os.c.obj
    [58/199] Building C object CMakeFiles/app.dir/keys.c.obj
    [59/199] Building C object CMakeFiles/app.dir/main.c.obj
    [60/199] Building C object CMakeFiles/app.dir/C_/nordicsemi/v2.0.0/bootloader/mcuboot/boot/bootutil/src/image_validate.c.obj
    [61/199] Building C object zephyr/CMakeFiles/zephyr_pre0.dir/misc/empty_file.c.obj
    [62/199] Building C object CMakeFiles/app.dir/C_/nordicsemi/v2.0.0/bootloader/mcuboot/boot/bootutil/src/tlv.c.obj
    [63/199] Building C object CMakeFiles/app.dir/C_/nordicsemi/v2.0.0/bootloader/mcuboot/boot/bootutil/src/image_rsa.c.obj
    [64/199] Building C object CMakeFiles/app.dir/C_/nordicsemi/v2.0.0/bootloader/mcuboot/boot/bootutil/src/encrypted.c.obj
    [65/199] Building C object CMakeFiles/app.dir/C_/nordicsemi/v2.0.0/bootloader/mcuboot/boot/bootutil/src/image_ec256.c.obj
    [66/199] Building C object CMakeFiles/app.dir/C_/nordicsemi/v2.0.0/bootloader/mcuboot/boot/bootutil/src/bootutil_misc.c.obj
    [67/199] Building C object CMakeFiles/app.dir/C_/nordicsemi/v2.0.0/bootloader/mcuboot/boot/bootutil/src/fault_injection_hardening.c.obj
    [68/199] Building C object CMakeFiles/app.dir/C_/nordicsemi/v2.0.0/bootloader/mcuboot/boot/bootutil/src/image_ed25519.c.obj
    [69/199] Linking C static library zephyr\libzephyr.a
    [70/199] Building C object CMakeFiles/app.dir/C_/nordicsemi/v2.0.0/bootloader/mcuboot/ext/mbedtls-asn1/src/asn1parse.c.obj
    [71/199] Building C object CMakeFiles/app.dir/C_/nordicsemi/v2.0.0/bootloader/mcuboot/ext/mbedtls-asn1/src/platform_util.c.obj
    [72/199] Building C object CMakeFiles/app.dir/C_/nordicsemi/v2.0.0/bootloader/mcuboot/ext/tinycrypt/lib/source/utils.c.obj
    [73/199] Building C object CMakeFiles/app.dir/C_/nordicsemi/v2.0.0/bootloader/mcuboot/ext/tinycrypt/lib/source/aes_encrypt.c.obj
    [74/199] Building C object CMakeFiles/app.dir/C_/nordicsemi/v2.0.0/bootloader/mcuboot/ext/tinycrypt/lib/source/ecc.c.obj
    [75/199] Building C object CMakeFiles/app.dir/single_loader.c.obj
    [76/199] Building C object CMakeFiles/app.dir/C_/nordicsemi/v2.0.0/bootloader/mcuboot/ext/tinycrypt/lib/source/aes_decrypt.c.obj
    [77/199] Building C object CMakeFiles/app.dir/C_/nordicsemi/v2.0.0/bootloader/mcuboot/ext/tinycrypt/lib/source/sha256.c.obj
    [78/199] Building C object CMakeFiles/app.dir/C_/nordicsemi/v2.0.0/bootloader/mcuboot/ext/tinycrypt/lib/source/ecc_dsa.c.obj
    [79/199] Building C object CMakeFiles/app.dir/C_/nordicsemi/v2.0.0/bootloader/mcuboot/ext/tinycrypt/lib/source/ctr_mode.c.obj
    [80/199] Building C object CMakeFiles/app.dir/zephyr/autogen-pubkey.c.obj
    [81/199] Building C object CMakeFiles/app.dir/C_/nordicsemi/v2.0.0/bootloader/mcuboot/ext/tinycrypt/lib/source/hmac.c.obj
    [82/199] Building C object CMakeFiles/app.dir/C_/nordicsemi/v2.0.0/bootloader/mcuboot/ext/tinycrypt/lib/source/ecc_dh.c.obj
    [83/199] Building C object CMakeFiles/app.dir/zephyr/autogen-enckey.c.obj
    [84/199] Building C object CMakeFiles/app.dir/nrf_cleanup.c.obj
    [85/199] Building C object zephyr/arch/common/CMakeFiles/arch__common.dir/sw_isr_common.c.obj
    [86/199] Building C object zephyr/arch/arch/arm/core/aarch32/CMakeFiles/arch__arm__core__aarch32.dir/irq_manage.c.obj
    [87/199] Building ASM object zephyr/arch/arch/arm/core/aarch32/CMakeFiles/arch__arm__core__aarch32.dir/cpu_idle.S.obj
    [88/199] Building C object zephyr/arch/arch/arm/core/aarch32/CMakeFiles/arch__arm__core__aarch32.dir/nmi.c.obj
    [89/199] Building C object zephyr/arch/arch/arm/core/aarch32/CMakeFiles/arch__arm__core__aarch32.dir/fatal.c.obj
    [90/199] Building C object zephyr/arch/arch/arm/core/aarch32/CMakeFiles/arch__arm__core__aarch32.dir/swap.c.obj
    [91/199] Linking C static library zephyr\arch\common\libisr_tables.a
    [92/199] Building ASM object zephyr/arch/arch/arm/core/aarch32/CMakeFiles/arch__arm__core__aarch32.dir/nmi_on_reset.S.obj
    [93/199] Building ASM object zephyr/arch/arch/arm/core/aarch32/CMakeFiles/arch__arm__core__aarch32.dir/swap_helper.S.obj
    [94/199] Building ASM object zephyr/arch/arch/arm/core/aarch32/cortex_m/CMakeFiles/arch__arm__core__aarch32__cortex_m.dir/exc_exit.S.obj
    [95/199] Building ASM object zephyr/arch/arch/arm/core/aarch32/CMakeFiles/arch__arm__core__aarch32.dir/isr_wrapper.S.obj
    [96/199] Building C object zephyr/arch/arch/arm/core/aarch32/CMakeFiles/arch__arm__core__aarch32.dir/prep_c.c.obj
    [97/199] Building ASM object zephyr/arch/arch/arm/core/aarch32/cortex_m/CMakeFiles/arch__arm__core__aarch32__cortex_m.dir/fault_s.S.obj
    [98/199] Building C object zephyr/arch/arch/arm/core/aarch32/CMakeFiles/arch__arm__core__aarch32.dir/thread.c.obj
    [99/199] Building ASM object zephyr/arch/arch/arm/core/aarch32/cortex_m/CMakeFiles/arch__arm__core__aarch32__cortex_m.dir/reset.S.obj
    [100/199] Building C object zephyr/arch/arch/arm/core/aarch32/cortex_m/CMakeFiles/arch__arm__core__aarch32__cortex_m.dir/scb.c.obj
    [101/199] Building C object zephyr/arch/arch/arm/core/aarch32/cortex_m/CMakeFiles/arch__arm__core__aarch32__cortex_m.dir/thread_abort.c.obj
    [102/199] Building C object zephyr/arch/arch/arm/core/aarch32/cortex_m/CMakeFiles/arch__arm__core__aarch32__cortex_m.dir/fpu.c.obj
    [103/199] Building ASM object zephyr/arch/arch/arm/core/aarch32/cortex_m/CMakeFiles/arch__arm__core__aarch32__cortex_m.dir/vector_table.S.obj
    [104/199] Building C object zephyr/arch/arch/arm/core/aarch32/cortex_m/CMakeFiles/arch__arm__core__aarch32__cortex_m.dir/fault.c.obj
    [105/199] Building C object zephyr/arch/arch/arm/core/aarch32/cortex_m/CMakeFiles/arch__arm__core__aarch32__cortex_m.dir/irq_init.c.obj
    [106/199] Building C object zephyr/lib/libc/minimal/CMakeFiles/lib__libc__minimal.dir/source/stdlib/atoi.c.obj
    [107/199] Building C object zephyr/lib/libc/minimal/CMakeFiles/lib__libc__minimal.dir/source/stdlib/strtol.c.obj
    [108/199] Building C object zephyr/arch/arch/arm/core/aarch32/mpu/CMakeFiles/arch__arm__core__aarch32__mpu.dir/arm_mpu.c.obj
    [109/199] Building C object zephyr/arch/arch/arm/core/aarch32/mpu/CMakeFiles/arch__arm__core__aarch32__mpu.dir/arm_core_mpu.c.obj
    [110/199] Building C object zephyr/lib/libc/minimal/CMakeFiles/lib__libc__minimal.dir/source/stdlib/strtoull.c.obj
    [111/199] Building C object zephyr/lib/libc/minimal/CMakeFiles/lib__libc__minimal.dir/source/stdlib/abort.c.obj
    [112/199] Building C object zephyr/lib/libc/minimal/CMakeFiles/lib__libc__minimal.dir/source/stdlib/strtoul.c.obj
    [113/199] Building C object zephyr/lib/libc/minimal/CMakeFiles/lib__libc__minimal.dir/source/stdlib/malloc.c.obj
    [114/199] Building C object zephyr/lib/libc/minimal/CMakeFiles/lib__libc__minimal.dir/source/stdlib/strtoll.c.obj
    [115/199] Linking C static library zephyr\arch\common\libarch__common.a
    [116/199] Linking C static library zephyr\arch\arch\arm\core\aarch32\mpu\libarch__arm__core__aarch32__mpu.a
    [117/199] Linking C static library zephyr\arch\arch\arm\core\aarch32\cortex_m\libarch__arm__core__aarch32__cortex_m.a
    [118/199] Linking C static library app\libapp.a
    [119/199] Linking C static library zephyr\arch\arch\arm\core\aarch32\libarch__arm__core__aarch32.a
    [120/199] Building C object zephyr/lib/libc/minimal/CMakeFiles/lib__libc__minimal.dir/source/stdlib/qsort.c.obj
    [121/199] Building C object zephyr/lib/libc/minimal/CMakeFiles/lib__libc__minimal.dir/source/stdlib/bsearch.c.obj
    [122/199] Building C object zephyr/lib/libc/minimal/CMakeFiles/lib__libc__minimal.dir/source/stdout/sprintf.c.obj
    [123/199] Building C object zephyr/lib/libc/minimal/CMakeFiles/lib__libc__minimal.dir/source/string/strncasecmp.c.obj
    [124/199] Building C object zephyr/lib/libc/minimal/CMakeFiles/lib__libc__minimal.dir/source/string/string.c.obj
    [125/199] Building C object zephyr/lib/libc/minimal/CMakeFiles/lib__libc__minimal.dir/source/string/strstr.c.obj
    [126/199] Building C object zephyr/lib/libc/minimal/CMakeFiles/lib__libc__minimal.dir/source/string/strspn.c.obj
    [127/199] Building C object zephyr/lib/libc/minimal/CMakeFiles/lib__libc__minimal.dir/source/time/gmtime.c.obj
    [128/199] Building C object zephyr/lib/libc/minimal/CMakeFiles/lib__libc__minimal.dir/source/stdlib/exit.c.obj
    [129/199] Building C object zephyr/lib/libc/minimal/CMakeFiles/lib__libc__minimal.dir/source/stdout/stdout_console.c.obj
    [130/199] Building C object zephyr/lib/libc/minimal/CMakeFiles/lib__libc__minimal.dir/source/stdout/fprintf.c.obj
    [131/199] Building C object zephyr/lib/posix/CMakeFiles/lib__posix.dir/pthread_common.c.obj
    [132/199] Building C object zephyr/lib/posix/CMakeFiles/lib__posix.dir/nanosleep.c.obj
    [133/199] Building C object zephyr/soc/arm/common/cortex_m/CMakeFiles/soc__arm__common__cortex_m.dir/arm_mpu_regions.c.obj
    [134/199] Building C object zephyr/soc/arm/nordic_nrf/nrf52/CMakeFiles/soc__arm__nordic_nrf__nrf52.dir/soc.c.obj
    [135/199] Building C object modules/nrf/lib/fatal_error/CMakeFiles/..__nrf__lib__fatal_error.dir/fatal_error.c.obj
    [136/199] Building C object zephyr/drivers/clock_control/CMakeFiles/drivers__clock_control.dir/clock_control_nrf.c.obj
    [137/199] Linking C static library zephyr\lib\libc\minimal\liblib__libc__minimal.a
    [138/199] Building C object zephyr/drivers/gpio/CMakeFiles/drivers__gpio.dir/gpio_nrfx.c.obj
    [139/199] Building C object zephyr/drivers/flash/CMakeFiles/drivers__flash.dir/flash_page_layout.c.obj
    [140/199] Linking C static library zephyr\lib\posix\liblib__posix.a
    [141/199] Building C object zephyr/drivers/flash/CMakeFiles/drivers__flash.dir/soc_flash_nrf.c.obj
    [142/199] Linking C static library zephyr\soc\arm\common\cortex_m\libsoc__arm__common__cortex_m.a
    [143/199] Linking C static library zephyr\soc\arm\nordic_nrf\nrf52\libsoc__arm__nordic_nrf__nrf52.a
    [144/199] Linking C static library zephyr\drivers\gpio\libdrivers__gpio.a
    [145/199] Linking C static library modules\nrf\lib\fatal_error\lib..__nrf__lib__fatal_error.a
    [146/199] Linking C static library zephyr\drivers\clock_control\libdrivers__clock_control.a
    [147/199] Linking C static library zephyr\drivers\flash\libdrivers__flash.a
    [148/199] Building C object zephyr/drivers/serial/CMakeFiles/drivers__serial.dir/uart_nrfx_uarte.c.obj
    [149/199] Building C object zephyr/drivers/timer/CMakeFiles/drivers__timer.dir/sys_clock_init.c.obj
    [150/199] Building C object zephyr/drivers/timer/CMakeFiles/drivers__timer.dir/nrf_rtc_timer.c.obj
    [151/199] Building C object zephyr/drivers/pinctrl/CMakeFiles/drivers__pinctrl.dir/common.c.obj
    [152/199] Building C object zephyr/drivers/pinctrl/CMakeFiles/drivers__pinctrl.dir/pinctrl_nrf.c.obj
    [153/199] Building C object modules/nrf/lib/fprotect/CMakeFiles/..__nrf__lib__fprotect.dir/fprotect_acl.c.obj
    [154/199] Building C object modules/hal_nordic/nrfx/CMakeFiles/modules__hal_nordic__nrfx.dir/C_/nordicsemi/v2.0.0/modules/hal/nordic/nrfx/mdk/system_nrf52840.c.obj
    [155/199] Building C object modules/nrf/drivers/hw_cc310/CMakeFiles/..__nrf__drivers__hw_cc310.dir/hw_cc310.c.obj
    [156/199] Building C object modules/hal_nordic/nrfx/CMakeFiles/modules__hal_nordic__nrfx.dir/nrfx_glue.c.obj
    [157/199] Linking C static library zephyr\drivers\serial\libdrivers__serial.a
    [158/199] Linking C static library zephyr\drivers\pinctrl\libdrivers__pinctrl.a
    [159/199] Linking C static library zephyr\drivers\timer\libdrivers__timer.a
    [160/199] Building C object modules/mcuboot/boot/bootutil/zephyr/CMakeFiles/mcuboot_util.dir/C_/nordicsemi/v2.0.0/bootloader/mcuboot/boot/bootutil/src/bootutil_public.c.obj
    [161/199] Linking C static library modules\nrf\lib\fprotect\lib..__nrf__lib__fprotect.a
    [162/199] Building C object modules/hal_nordic/nrfx/CMakeFiles/modules__hal_nordic__nrfx.dir/C_/nordicsemi/v2.0.0/modules/hal/nordic/nrfx/drivers/src/nrfx_clock.c.obj
    [163/199] Linking C static library modules\nrf\drivers\hw_cc310\lib..__nrf__drivers__hw_cc310.a
    [164/199] Building C object modules/hal_nordic/nrfx/CMakeFiles/modules__hal_nordic__nrfx.dir/C_/nordicsemi/v2.0.0/modules/hal/nordic/nrfx/drivers/src/nrfx_gpiote.c.obj
    [165/199] Building C object modules/hal_nordic/nrfx/CMakeFiles/modules__hal_nordic__nrfx.dir/C_/nordicsemi/v2.0.0/modules/hal/nordic/nrfx/helpers/nrfx_flag32_allocator.c.obj
    [166/199] Building C object modules/hal_nordic/nrfx/CMakeFiles/modules__hal_nordic__nrfx.dir/C_/nordicsemi/v2.0.0/modules/hal/nordic/nrfx/drivers/src/nrfx_nvmc.c.obj
    [167/199] Building C object modules/hal_nordic/nrfx/CMakeFiles/modules__hal_nordic__nrfx.dir/C_/nordicsemi/v2.0.0/modules/hal/nordic/nrfx/drivers/src/nrfx_ppi.c.obj
    [168/199] Building C object modules/hal_nordic/nrfx/CMakeFiles/modules__hal_nordic__nrfx.dir/C_/nordicsemi/v2.0.0/modules/hal/nordic/nrfx/drivers/src/nrfx_wdt.c.obj
    [169/199] Linking C static library modules\mcuboot\boot\bootutil\zephyr\libmcuboot_util.a
    [170/199] Building C object modules/segger/CMakeFiles/modules__segger.dir/SEGGER_RTT_zephyr.c.obj
    [171/199] Building C object zephyr/kernel/CMakeFiles/kernel.dir/main_weak.c.obj
    [172/199] Building C object modules/segger/CMakeFiles/modules__segger.dir/C_/nordicsemi/v2.0.0/modules/debug/segger/SEGGER/SEGGER_RTT.c.obj
    [173/199] Building C object zephyr/kernel/CMakeFiles/kernel.dir/device.c.obj
    [174/199] Building C object zephyr/kernel/CMakeFiles/kernel.dir/init.c.obj
    [175/199] Building C object zephyr/kernel/CMakeFiles/kernel.dir/errno.c.obj
    [176/199] Linking C static library modules\hal_nordic\nrfx\libmodules__hal_nordic__nrfx.a
    [177/199] Building C object zephyr/kernel/CMakeFiles/kernel.dir/banner.c.obj
    [178/199] Building C object zephyr/kernel/CMakeFiles/kernel.dir/fatal.c.obj
    [179/199] Linking C static library modules\segger\libmodules__segger.a
    [180/199] Building C object zephyr/kernel/CMakeFiles/kernel.dir/timeout.c.obj
    [181/199] Building C object zephyr/kernel/CMakeFiles/kernel.dir/thread.c.obj
    [182/199] Building C object zephyr/kernel/CMakeFiles/kernel.dir/xip.c.obj
    [183/199] Building C object zephyr/kernel/CMakeFiles/kernel.dir/version.c.obj
    [184/199] Building C object zephyr/kernel/CMakeFiles/kernel.dir/kheap.c.obj
    [185/199] Building C object zephyr/kernel/CMakeFiles/kernel.dir/mem_slab.c.obj
    [186/199] Building C object zephyr/kernel/CMakeFiles/kernel.dir/timer.c.obj
    [187/199] Building C object zephyr/kernel/CMakeFiles/kernel.dir/mempool.c.obj
    [188/199] Linking C static library zephyr\kernel\libkernel.a
    [189/199] Linking C executable zephyr\zephyr_pre0.elf
    
    [190/199] Generating dev_handles.c
    [191/199] Building C object zephyr/CMakeFiles/zephyr_pre1.dir/misc/empty_file.c.obj
    [192/199] Building C object zephyr/CMakeFiles/zephyr_pre1.dir/dev_handles.c.obj
    [193/199] Linking C executable zephyr\zephyr_pre1.elf
    
    [194/199] Generating linker.cmd
    [195/199] Generating isr_tables.c, isrList.bin
    [196/199] Building C object zephyr/CMakeFiles/zephyr_final.dir/misc/empty_file.c.obj
    [197/199] Building C object zephyr/CMakeFiles/zephyr_final.dir/isr_tables.c.obj
    [198/199] Building C object zephyr/CMakeFiles/zephyr_final.dir/dev_handles.c.obj
    [199/199] Linking C executable zephyr\zephyr.elf
    Memory region         Used Size  Region Size  %age Used
               FLASH:       37964 B        64 KB     57.93%
                SRAM:       21024 B       256 KB      8.02%
            IDT_LIST:          0 GB         2 KB      0.00%
    [167/188] Linking C executable zephyr\zephyr_pre0.elf
    
    [171/188] Linking C executable zephyr\zephyr_pre1.elf
    
    [177/188] Linking C executable zephyr\zephyr.elf
    Memory region         Used Size  Region Size  %age Used
               FLASH:       25156 B     982528 B      2.56%
                SRAM:        8864 B       256 KB      3.38%
            IDT_LIST:          0 GB         2 KB      0.00%
    [184/188] Generating ../../zephyr/app_moved_test_update.hex
    [186/188] No install step for 'mcuboot_subimage'
    [187/188] Completed 'mcuboot_subimage'
    [188/188] Generating zephyr/merged.hex
     *  Terminal will be reused by tasks, press any key to close it. 

    Bootloads with mcumgr:

    But the data in the app_update.bin file is not encrypted. I can match all the data in the app_update.bin file with data in the merged.hex file.

    The ninja_partition_manager_report command gave me this result. Something is not working.

    It sounds like others have encryption working. Any ideas what I have missed? Once encryption is working on the Nordic DK board we will add the updates to our custom design.

    Thanks,

    Ray

  • Hi,

    We made an update to another project yesterday and removed the --encrypt <insert path or symbol here that points to your key file > update to the ncs/nrf/modules/mcuboot/CMakeLists.txt file. This caused encryption to stop working. When we restored this update encryption worked again. The encryption issue is resolved.

    Here is a method to duplicate the file size limitation issue.

    My test setup is a nRF52840-DK, VS Code with SDK 2.0.0 and mcumgr CLI. The starting point is the blinky example. I added the following prj.conf file:

    CONFIG_GPIO=y
    CONFIG_BOOTLOADER_MCUBOOT=y
    
    CONFIG_CLOCK_CONTROL_NRF_K32SRC_RC=y

    And mcuboot.conf file:

    CONFIG_SIZE_OPTIMIZATIONS=y
    
    CONFIG_PM_PARTITION_SIZE_MCUBOOT=0x10000
    
    CONFIG_UART_CONSOLE=n
    CONFIG_MCUBOOT_SERIAL=y
    CONFIG_BOOT_SERIAL_UART=y
    
    # Signature configuration
    CONFIG_BOOT_SIGNATURE_TYPE_ECDSA_P256=y
    CONFIG_BOOT_SIGNATURE_KEY_FILE="C:/Workspace/VScode/blinky/child_image/keys/mcuboot_private_sign.pem"
    
    # Encryption configuration
    CONFIG_BOOT_SERIAL_ENCRYPT_EC256=y
    CONFIG_BOOT_ENCRYPTION_KEY_FILE="C:/Workspace/VScode/blinky/child_image/keys/mcuboot_private_enc.pem"
    
    CONFIG_BOOT_ECDSA_TINYCRYPT=y
    
    CONFIG_SINGLE_APPLICATION_SLOT=y

    Additional line to the ncs/nrf/modules/mcuboot/CMakeLists.txt file. This was described in the link above.

    --encrypt C:/Workspace/VScode/blinky/child_image/keys/mcuboot_private_enc.pem

    Update to blinky main.c code to include an array to vary the build size of app_update.bin.

    /*
     * Copyright (c) 2016 Intel Corporation
     *
     * SPDX-License-Identifier: Apache-2.0
     */
    
    #include <zephyr.h>
    #include <drivers/gpio.h>
    
    /* 1000 msec = 1 sec */
    #define SLEEP_TIME_MS   1000
    
    /* The devicetree node identifier for the "led0" alias. */
    #define LED0_NODE DT_ALIAS(led0)
    
    // Added array code here
    volatile static const uint8_t largeArray[20480] = {0}; // app_update.bin = 46k works
    //volatile static const uint8_t largeArray[75776] = {0}; // app_update.bin = 100k fails
    
    /*
     * A build error on this line means your board is unsupported.
     * See the sample documentation for information on how to fix this.
     */
    static const struct gpio_dt_spec led = GPIO_DT_SPEC_GET(LED0_NODE, gpios);
    
    void main(void)
    {
    	int ret;
    
    	if (!device_is_ready(led.port)) {
    		return;
    	}
    
    	ret = gpio_pin_configure_dt(&led, GPIO_OUTPUT_ACTIVE);
    	if (ret < 0) {
    		return;
    	}
    
    	while (1) {
    		ret = gpio_pin_toggle_dt(&led);
    		if (ret < 0) {
    			return;
    		}
    
    		if (largeArray[0] == 10)
    		{
    			ret = gpio_pin_toggle_dt(&led);
    			if (ret < 0) {
    				return;
    			}
    		}
    
    		k_msleep(SLEEP_TIME_MS);
    	}
    }
    

    The project compiles :

    Executing task: nRF Connect: Build: blinky/release_build (active) 
    
    Building blinky
    west build --build-dir c:\Workspace\VScode\blinky\release_build c:\Workspace\VScode\blinky --pristine --board nrf52840dk_nrf52840 -- -DNCS_TOOLCHAIN_VERSION:STRING="NONE" -DCONF_FILE:STRING="c:/Workspace/VScode/blinky/prj.conf"
    
    -- west build: generating a build system
    Loading Zephyr default modules (Zephyr base).
    -- Application: C:/Workspace/VScode/blinky
    -- Found Python3: C:/nordicsemi/toolchains/v2.0.0/opt/bin/python.exe (found suitable exact version "3.8.2") found components: Interpreter 
    -- Cache files will be written to: C:/nordicsemi/v2.0.0/zephyr/.cache
    -- Zephyr version: 3.0.99 (C:/nordicsemi/v2.0.0/zephyr)
    -- Found west (found suitable version "0.13.1", minimum required is "0.7.1")
    -- Board: nrf52840dk_nrf52840
    -- Found host-tools: zephyr 0.14.1 (C:/nordicsemi/toolchains/v2.0.0/opt/zephyr-sdk)
    -- Found dtc: C:/nordicsemi/toolchains/v2.0.0/opt/bin/dtc.exe (found suitable version "1.4.7", minimum required is "1.4.6")
    -- Found toolchain: zephyr 0.14.1 (C:/nordicsemi/toolchains/v2.0.0/opt/zephyr-sdk)
    -- Found BOARD.dts: C:/nordicsemi/v2.0.0/zephyr/boards/arm/nrf52840dk_nrf52840/nrf52840dk_nrf52840.dts
    -- Generated zephyr.dts: C:/Workspace/VScode/blinky/release_build/zephyr/zephyr.dts
    -- Generated devicetree_unfixed.h: C:/Workspace/VScode/blinky/release_build/zephyr/include/generated/devicetree_unfixed.h
    -- Generated device_extern.h: C:/Workspace/VScode/blinky/release_build/zephyr/include/generated/device_extern.h
    -- Including generated dts.cmake file: C:/Workspace/VScode/blinky/release_build/zephyr/dts.cmake
    Parsing C:/nordicsemi/v2.0.0/zephyr/Kconfig
    Loaded configuration 'C:/Workspace/VScode/blinky/release_build/zephyr/.config'
    No change to configuration in 'C:/Workspace/VScode/blinky/release_build/zephyr/.config'
    No change to Kconfig header in 'C:/Workspace/VScode/blinky/release_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: C:/nordicsemi/toolchains/v2.0.0/opt/zephyr-sdk/arm-zephyr-eabi/bin/arm-zephyr-eabi-gcc.exe
    -- Found Python3: C:/nordicsemi/toolchains/v2.0.0/opt/bin/python.exe (found version "3.8.2") found components: Interpreter 
    
    === child image mcuboot -  begin ===
    loading initial cache file C:/Workspace/VScode/blinky/release_build/mcuboot/child_image_preload.cmake
    Loading Zephyr default modules (Zephyr base).
    -- Application: C:/nordicsemi/v2.0.0/bootloader/mcuboot/boot/zephyr
    -- Found Python3: C:/nordicsemi/toolchains/v2.0.0/opt/bin/python.exe (found suitable exact version "3.8.2") found components: Interpreter 
    -- Cache files will be written to: C:/nordicsemi/v2.0.0/zephyr/.cache
    -- Zephyr version: 3.0.99 (C:/nordicsemi/v2.0.0/zephyr)
    -- Found west (found suitable version "0.13.1", minimum required is "0.7.1")
    -- Board: nrf52840dk_nrf52840
    -- Found host-tools: zephyr 0.14.1 (C:/nordicsemi/toolchains/v2.0.0/opt/zephyr-sdk)
    -- Found dtc: C:/nordicsemi/toolchains/v2.0.0/opt/bin/dtc.exe (found suitable version "1.4.7", minimum required is "1.4.6")
    -- Found toolchain: zephyr 0.14.1 (C:/nordicsemi/toolchains/v2.0.0/opt/zephyr-sdk)
    -- Found BOARD.dts: C:/nordicsemi/v2.0.0/zephyr/boards/arm/nrf52840dk_nrf52840/nrf52840dk_nrf52840.dts
    -- Found devicetree overlay: C:/nordicsemi/v2.0.0/nrf/modules/mcuboot/usb.overlay
    -- Found devicetree overlay: C:/nordicsemi/v2.0.0/bootloader/mcuboot/boot/zephyr/dts.overlay
    -- Generated zephyr.dts: C:/Workspace/VScode/blinky/release_build/mcuboot/zephyr/zephyr.dts
    -- Generated devicetree_unfixed.h: C:/Workspace/VScode/blinky/release_build/mcuboot/zephyr/include/generated/devicetree_unfixed.h
    -- Generated device_extern.h: C:/Workspace/VScode/blinky/release_build/mcuboot/zephyr/include/generated/device_extern.h
    -- Including generated dts.cmake file: C:/Workspace/VScode/blinky/release_build/mcuboot/zephyr/dts.cmake
    Parsing C:/nordicsemi/v2.0.0/bootloader/mcuboot/boot/zephyr/Kconfig
    Loaded configuration 'C:/nordicsemi/v2.0.0/zephyr/boards/arm/nrf52840dk_nrf52840/nrf52840dk_nrf52840_defconfig'
    Merged configuration 'C:/nordicsemi/v2.0.0/bootloader/mcuboot/boot/zephyr/prj.conf'
    Merged configuration 'C:/nordicsemi/v2.0.0/nrf/subsys/partition_manager/partition_manager_enabled.conf'
    Merged configuration 'C:/Workspace/VScode/blinky/child_image/mcuboot.conf'
    Merged configuration 'C:/Workspace/VScode/blinky/release_build/mcuboot/zephyr/misc/generated/extra_kconfig_options.conf'
    Configuration saved to 'C:/Workspace/VScode/blinky/release_build/mcuboot/zephyr/.config'
    Kconfig header saved to 'C:/Workspace/VScode/blinky/release_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: C:/nordicsemi/toolchains/v2.0.0/opt/zephyr-sdk/arm-zephyr-eabi/bin/arm-zephyr-eabi-gcc.exe
    CMake Warning at C:/nordicsemi/v2.0.0/nrf/lib/flash_patch/CMakeLists.txt:9 (message):
      
    
            ----------------------------------------------------------
            --- WARNING: To maintain the integrity of secure boot, ---
            --- enable CONFIG_DISABLE_FLASH_PATCH in production.   ---
            ----------------------------------------------------------
    
    
    CMake Warning at C:/nordicsemi/v2.0.0/zephyr/CMakeLists.txt:814 (message):
      No SOURCES given to Zephyr library: drivers__console
    
      Excluding target from build.
    
    
    MCUBoot bootloader key file: C:/Workspace/VScode/blinky/child_image/keys/mcuboot_private_sign.pem
    MCUBoot bootloader encryption key file: C:/Workspace/VScode/blinky/child_image/keys/mcuboot_private_enc.pem
    -- Configuring done
    -- Generating done
    -- Build files have been written to: C:/Workspace/VScode/blinky/release_build/mcuboot
    === child image mcuboot -  end ===
    
    -- Configuring done
    -- Generating done
    -- Build files have been written to: C:/Workspace/VScode/blinky/release_build
    -- west build: building application
    [1/188] Generating include/generated/version.h
    -- Zephyr version: 3.0.99 (C:/nordicsemi/v2.0.0/zephyr), build: v3.0.99-ncs1
    [2/188] Creating directories for 'mcuboot_subimage'
    [3/188] No download step for 'mcuboot_subimage'
    [4/188] No update step for 'mcuboot_subimage'
    [5/188] No patch step for 'mcuboot_subimage'
    [6/188] Generating misc/generated/syscalls.json, misc/generated/struct_tags.json
    [7/188] No configure step for 'mcuboot_subimage'
    [7/188] Performing build step for 'mcuboot_subimage'
    [1/199] Generating include/generated/version.h
    -- Zephyr version: 3.0.99 (C:/nordicsemi/v2.0.0/zephyr), build: v3.0.99-ncs1
    [2/199] Generating misc/generated/syscalls.json, misc/generated/struct_tags.json
    [3/199] Generating include/generated/kobj-types-enum.h, include/generated/otype-to-str.h, include/generated/otype-to-size.h
    [4/199] Generating include/generated/driver-validation.h
    [5/199] Generating include/generated/syscall_dispatch.c, include/generated/syscall_list.h
    [6/199] Building C object zephyr/CMakeFiles/offsets.dir/arch/arm/core/offsets/offsets.c.obj
    [7/199] Generating include/generated/offsets.h
    [8/199] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/multi_heap.c.obj
    [9/199] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/heap-validate.c.obj
    [10/199] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/heap.c.obj
    [11/199] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/bitarray.c.obj
    [12/199] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/assert.c.obj
    [13/199] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/cbprintf_nano.c.obj
    [14/199] Building ASM object zephyr/CMakeFiles/zephyr.dir/soc/arm/nordic_nrf/common/soc_nrf_common.S.obj
    [15/199] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/reboot.c.obj
    [16/199] Building C object zephyr/CMakeFiles/zephyr.dir/misc/generated/configs.c.obj
    [17/199] Building C object zephyr/CMakeFiles/zephyr.dir/soc/arm/nordic_nrf/validate_base_addresses.c.obj
    [18/199] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/mpsc_pbuf.c.obj
    [19/199] Building C object zephyr/CMakeFiles/zephyr.dir/soc/arm/nordic_nrf/validate_enabled_instances.c.obj
    [20/199] Building C object zephyr/CMakeFiles/zephyr.dir/subsys/tracing/tracing_none.c.obj
    [21/199] Building C object zephyr/CMakeFiles/zephyr.dir/subsys/logging/log_minimal.c.obj
    [22/199] Building C object zephyr/CMakeFiles/zephyr.dir/C_/nordicsemi/v2.0.0/nrf/subsys/partition_manager/flash_map_partition_manager.c.obj
    [23/199] Building C object zephyr/CMakeFiles/zephyr.dir/subsys/storage/flash_map/flash_map_layout.c.obj
    [24/199] Building C object zephyr/CMakeFiles/zephyr.dir/C_/nordicsemi/v2.0.0/nrfxlib/crypto/nrf_cc310_platform/src/nrf_cc3xx_platform_no_mutex_zephyr.c.obj
    [25/199] Building C object zephyr/CMakeFiles/zephyr.dir/C_/nordicsemi/v2.0.0/nrfxlib/crypto/nrf_cc310_platform/src/nrf_cc3xx_platform_abort_zephyr.c.obj
    [26/199] Building C object zephyr/CMakeFiles/zephyr.dir/C_/nordicsemi/v2.0.0/bootloader/mcuboot/boot/boot_serial/src/serial_recovery_cbor.c.obj
    [27/199] Building C object zephyr/CMakeFiles/zephyr.dir/subsys/storage/flash_map/flash_map.c.obj
    [28/199] Building C object zephyr/CMakeFiles/zephyr.dir/C_/nordicsemi/v2.0.0/bootloader/mcuboot/boot/zephyr/serial_adapter.c.obj
    [29/199] Building C object zephyr/CMakeFiles/zephyr.dir/C_/nordicsemi/v2.0.0/bootloader/mcuboot/boot/boot_serial/src/cbor_common.c.obj
    [30/199] Building C object zephyr/CMakeFiles/zephyr.dir/C_/nordicsemi/v2.0.0/bootloader/mcuboot/boot/boot_serial/src/boot_serial.c.obj
    [31/199] Building C object zephyr/CMakeFiles/zephyr.dir/C_/nordicsemi/v2.0.0/bootloader/mcuboot/boot/boot_serial/src/cbor_decode.c.obj
    [32/199] Building C object zephyr/CMakeFiles/zephyr.dir/C_/nordicsemi/v2.0.0/bootloader/mcuboot/boot/boot_serial/src/cbor_encode.c.obj
    [33/199] Generating zephyr/autogen-enckey.c
    [34/199] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/cbprintf.c.obj
    [35/199] Generating zephyr/autogen-pubkey.c
    [36/199] Generating linker_zephyr_pre1.cmd
    [37/199] Generating linker_zephyr_pre0.cmd
    [38/199] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/cbprintf_packaged.c.obj
    [39/199] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/base64.c.obj
    [40/199] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/crc32_sw.c.obj
    [41/199] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/crc16_sw.c.obj
    [42/199] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/crc32c_sw.c.obj
    [43/199] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/sem.c.obj
    [44/199] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/timeutil.c.obj
    [45/199] Building C object CMakeFiles/app.dir/os.c.obj
    [46/199] Building C object zephyr/CMakeFiles/zephyr_pre0.dir/misc/empty_file.c.obj
    [47/199] Building C object CMakeFiles/app.dir/main.c.obj
    [48/199] Building C object CMakeFiles/app.dir/flash_map_extended.c.obj
    [49/199] Building C object CMakeFiles/app.dir/C_/nordicsemi/v2.0.0/bootloader/mcuboot/boot/bootutil/src/image_validate.c.obj
    [50/199] Building C object CMakeFiles/app.dir/keys.c.obj
    [51/199] Building C object CMakeFiles/app.dir/C_/nordicsemi/v2.0.0/bootloader/mcuboot/boot/bootutil/src/tlv.c.obj
    [52/199] Building C object CMakeFiles/app.dir/C_/nordicsemi/v2.0.0/bootloader/mcuboot/boot/bootutil/src/image_rsa.c.obj
    [53/199] Building C object CMakeFiles/app.dir/C_/nordicsemi/v2.0.0/bootloader/mcuboot/boot/bootutil/src/encrypted.c.obj
    [54/199] Building C object CMakeFiles/app.dir/C_/nordicsemi/v2.0.0/bootloader/mcuboot/boot/bootutil/src/image_ed25519.c.obj
    [55/199] Building C object CMakeFiles/app.dir/C_/nordicsemi/v2.0.0/bootloader/mcuboot/boot/bootutil/src/image_ec256.c.obj
    [56/199] Building C object CMakeFiles/app.dir/C_/nordicsemi/v2.0.0/bootloader/mcuboot/boot/bootutil/src/bootutil_misc.c.obj
    [57/199] Building C object CMakeFiles/app.dir/C_/nordicsemi/v2.0.0/bootloader/mcuboot/boot/bootutil/src/fault_injection_hardening.c.obj
    [58/199] Building C object CMakeFiles/app.dir/C_/nordicsemi/v2.0.0/bootloader/mcuboot/ext/mbedtls-asn1/src/asn1parse.c.obj
    [59/199] Building C object CMakeFiles/app.dir/C_/nordicsemi/v2.0.0/bootloader/mcuboot/ext/mbedtls-asn1/src/platform_util.c.obj
    [60/199] Building C object CMakeFiles/app.dir/single_loader.c.obj
    [61/199] Building C object CMakeFiles/app.dir/C_/nordicsemi/v2.0.0/bootloader/mcuboot/ext/tinycrypt/lib/source/aes_decrypt.c.obj
    [62/199] Building C object CMakeFiles/app.dir/C_/nordicsemi/v2.0.0/bootloader/mcuboot/ext/tinycrypt/lib/source/ecc.c.obj
    [63/199] Building C object CMakeFiles/app.dir/C_/nordicsemi/v2.0.0/bootloader/mcuboot/ext/tinycrypt/lib/source/ctr_mode.c.obj
    [64/199] Building C object CMakeFiles/app.dir/C_/nordicsemi/v2.0.0/bootloader/mcuboot/ext/tinycrypt/lib/source/utils.c.obj
    [65/199] Building C object CMakeFiles/app.dir/C_/nordicsemi/v2.0.0/bootloader/mcuboot/ext/tinycrypt/lib/source/aes_encrypt.c.obj
    [66/199] Building C object CMakeFiles/app.dir/C_/nordicsemi/v2.0.0/bootloader/mcuboot/ext/tinycrypt/lib/source/sha256.c.obj
    [67/199] Building C object CMakeFiles/app.dir/zephyr/autogen-pubkey.c.obj
    [68/199] Building C object CMakeFiles/app.dir/C_/nordicsemi/v2.0.0/bootloader/mcuboot/ext/tinycrypt/lib/source/ecc_dsa.c.obj
    [69/199] Building C object CMakeFiles/app.dir/C_/nordicsemi/v2.0.0/bootloader/mcuboot/ext/tinycrypt/lib/source/hmac.c.obj
    [70/199] Building C object CMakeFiles/app.dir/zephyr/autogen-enckey.c.obj
    [71/199] Building C object CMakeFiles/app.dir/C_/nordicsemi/v2.0.0/bootloader/mcuboot/ext/tinycrypt/lib/source/ecc_dh.c.obj
    [72/199] Building C object CMakeFiles/app.dir/nrf_cleanup.c.obj
    [73/199] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/thread_entry.c.obj
    [74/199] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/onoff.c.obj
    [75/199] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/crc8_sw.c.obj
    [76/199] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/rb.c.obj
    [77/199] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/dec.c.obj
    [78/199] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/fdtable.c.obj
    [79/199] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/crc7_sw.c.obj
    [80/199] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/hex.c.obj
    [81/199] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/notify.c.obj
    [82/199] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/printk.c.obj
    [83/199] Linking C static library app\libapp.a
    [84/199] Building ASM object zephyr/arch/arch/arm/core/aarch32/cortex_m/CMakeFiles/arch__arm__core__aarch32__cortex_m.dir/exc_exit.S.obj
    [85/199] Building ASM object zephyr/arch/arch/arm/core/aarch32/cortex_m/CMakeFiles/arch__arm__core__aarch32__cortex_m.dir/fault_s.S.obj
    [86/199] Building ASM object zephyr/arch/arch/arm/core/aarch32/CMakeFiles/arch__arm__core__aarch32.dir/cpu_idle.S.obj
    [87/199] Building C object zephyr/arch/common/CMakeFiles/isr_tables.dir/isr_tables.c.obj
    [88/199] Building C object zephyr/arch/arch/arm/core/aarch32/cortex_m/CMakeFiles/arch__arm__core__aarch32__cortex_m.dir/fault.c.obj
    [89/199] Building C object zephyr/arch/common/CMakeFiles/arch__common.dir/sw_isr_common.c.obj
    [90/199] Building C object zephyr/arch/arch/arm/core/aarch32/CMakeFiles/arch__arm__core__aarch32.dir/nmi.c.obj
    [91/199] Building C object zephyr/arch/arch/arm/core/aarch32/CMakeFiles/arch__arm__core__aarch32.dir/fatal.c.obj
    [92/199] Building C object zephyr/arch/arch/arm/core/aarch32/CMakeFiles/arch__arm__core__aarch32.dir/irq_manage.c.obj
    [93/199] Building C object zephyr/arch/arch/arm/core/aarch32/CMakeFiles/arch__arm__core__aarch32.dir/prep_c.c.obj
    [94/199] Building C object zephyr/arch/arch/arm/core/aarch32/CMakeFiles/arch__arm__core__aarch32.dir/swap.c.obj
    [95/199] Building ASM object zephyr/arch/arch/arm/core/aarch32/CMakeFiles/arch__arm__core__aarch32.dir/swap_helper.S.obj
    [96/199] Linking C static library zephyr\libzephyr.a
    [97/199] Building ASM object zephyr/arch/arch/arm/core/aarch32/CMakeFiles/arch__arm__core__aarch32.dir/nmi_on_reset.S.obj
    [98/199] Building ASM object zephyr/arch/arch/arm/core/aarch32/CMakeFiles/arch__arm__core__aarch32.dir/isr_wrapper.S.obj
    [99/199] Linking C static library zephyr\arch\common\libisr_tables.a
    [100/199] Building C object zephyr/arch/arch/arm/core/aarch32/cortex_m/CMakeFiles/arch__arm__core__aarch32__cortex_m.dir/thread_abort.c.obj
    [101/199] Building C object zephyr/arch/arch/arm/core/aarch32/cortex_m/CMakeFiles/arch__arm__core__aarch32__cortex_m.dir/fpu.c.obj
    [102/199] Building ASM object zephyr/arch/arch/arm/core/aarch32/cortex_m/CMakeFiles/arch__arm__core__aarch32__cortex_m.dir/reset.S.obj
    [103/199] Building C object zephyr/arch/arch/arm/core/aarch32/cortex_m/CMakeFiles/arch__arm__core__aarch32__cortex_m.dir/irq_init.c.obj
    [104/199] Building C object zephyr/arch/arch/arm/core/aarch32/CMakeFiles/arch__arm__core__aarch32.dir/thread.c.obj
    [105/199] Building C object zephyr/arch/arch/arm/core/aarch32/cortex_m/CMakeFiles/arch__arm__core__aarch32__cortex_m.dir/scb.c.obj
    [106/199] Building ASM object zephyr/arch/arch/arm/core/aarch32/cortex_m/CMakeFiles/arch__arm__core__aarch32__cortex_m.dir/vector_table.S.obj
    [107/199] Building C object zephyr/arch/arch/arm/core/aarch32/mpu/CMakeFiles/arch__arm__core__aarch32__mpu.dir/arm_core_mpu.c.obj
    [108/199] Building C object zephyr/lib/libc/minimal/CMakeFiles/lib__libc__minimal.dir/source/stdlib/strtol.c.obj
    [109/199] Building C object zephyr/lib/libc/minimal/CMakeFiles/lib__libc__minimal.dir/source/stdlib/atoi.c.obj
    [110/199] Linking C static library zephyr\arch\common\libarch__common.a
    [111/199] Building C object zephyr/lib/libc/minimal/CMakeFiles/lib__libc__minimal.dir/source/stdlib/abort.c.obj
    [112/199] Building C object zephyr/arch/arch/arm/core/aarch32/mpu/CMakeFiles/arch__arm__core__aarch32__mpu.dir/arm_mpu.c.obj
    [113/199] Building C object zephyr/lib/libc/minimal/CMakeFiles/lib__libc__minimal.dir/source/stdlib/strtoll.c.obj
    [114/199] Linking C static library zephyr\arch\arch\arm\core\aarch32\libarch__arm__core__aarch32.a
    [115/199] Building C object zephyr/lib/libc/minimal/CMakeFiles/lib__libc__minimal.dir/source/stdlib/malloc.c.obj
    [116/199] Building C object zephyr/lib/libc/minimal/CMakeFiles/lib__libc__minimal.dir/source/stdlib/strtoull.c.obj
    [117/199] Linking C static library zephyr\arch\arch\arm\core\aarch32\cortex_m\libarch__arm__core__aarch32__cortex_m.a
    [118/199] Building C object zephyr/lib/libc/minimal/CMakeFiles/lib__libc__minimal.dir/source/stdlib/strtoul.c.obj
    [119/199] Building C object zephyr/lib/libc/minimal/CMakeFiles/lib__libc__minimal.dir/source/string/strncasecmp.c.obj
    [120/199] Building C object zephyr/lib/libc/minimal/CMakeFiles/lib__libc__minimal.dir/source/stdlib/bsearch.c.obj
    [121/199] Building C object zephyr/lib/libc/minimal/CMakeFiles/lib__libc__minimal.dir/source/stdlib/exit.c.obj
    [122/199] Linking C static library zephyr\arch\arch\arm\core\aarch32\mpu\libarch__arm__core__aarch32__mpu.a
    [123/199] Building C object zephyr/lib/libc/minimal/CMakeFiles/lib__libc__minimal.dir/source/string/strstr.c.obj
    [124/199] Building C object zephyr/lib/libc/minimal/CMakeFiles/lib__libc__minimal.dir/source/stdout/fprintf.c.obj
    [125/199] Building C object zephyr/lib/libc/minimal/CMakeFiles/lib__libc__minimal.dir/source/stdlib/qsort.c.obj
    [126/199] Building C object zephyr/lib/libc/minimal/CMakeFiles/lib__libc__minimal.dir/source/string/strspn.c.obj
    [127/199] Building C object zephyr/lib/libc/minimal/CMakeFiles/lib__libc__minimal.dir/source/time/gmtime.c.obj
    [128/199] Building C object zephyr/lib/libc/minimal/CMakeFiles/lib__libc__minimal.dir/source/string/string.c.obj
    [129/199] Building C object zephyr/lib/libc/minimal/CMakeFiles/lib__libc__minimal.dir/source/stdout/stdout_console.c.obj
    [130/199] Building C object zephyr/lib/posix/CMakeFiles/lib__posix.dir/nanosleep.c.obj
    [131/199] Building C object zephyr/lib/libc/minimal/CMakeFiles/lib__libc__minimal.dir/source/stdout/sprintf.c.obj
    [132/199] Building C object zephyr/soc/arm/common/cortex_m/CMakeFiles/soc__arm__common__cortex_m.dir/arm_mpu_regions.c.obj
    [133/199] Building C object zephyr/lib/posix/CMakeFiles/lib__posix.dir/pthread_common.c.obj
    [134/199] Building C object zephyr/soc/arm/nordic_nrf/nrf52/CMakeFiles/soc__arm__nordic_nrf__nrf52.dir/soc.c.obj
    [135/199] Building C object modules/nrf/lib/fatal_error/CMakeFiles/..__nrf__lib__fatal_error.dir/fatal_error.c.obj
    [136/199] Building C object zephyr/drivers/gpio/CMakeFiles/drivers__gpio.dir/gpio_nrfx.c.obj
    [137/199] Building C object zephyr/drivers/clock_control/CMakeFiles/drivers__clock_control.dir/clock_control_nrf.c.obj
    [138/199] Building C object zephyr/drivers/flash/CMakeFiles/drivers__flash.dir/flash_page_layout.c.obj
    [139/199] Building C object zephyr/drivers/timer/CMakeFiles/drivers__timer.dir/sys_clock_init.c.obj
    [140/199] Linking C static library zephyr\lib\posix\liblib__posix.a
    [141/199] Linking C static library zephyr\soc\arm\common\cortex_m\libsoc__arm__common__cortex_m.a
    [142/199] Building C object zephyr/drivers/flash/CMakeFiles/drivers__flash.dir/soc_flash_nrf.c.obj
    [143/199] Linking C static library modules\nrf\lib\fatal_error\lib..__nrf__lib__fatal_error.a
    [144/199] Linking C static library zephyr\lib\libc\minimal\liblib__libc__minimal.a
    [145/199] Linking C static library zephyr\soc\arm\nordic_nrf\nrf52\libsoc__arm__nordic_nrf__nrf52.a
    [146/199] Linking C static library zephyr\drivers\gpio\libdrivers__gpio.a
    [147/199] Linking C static library zephyr\drivers\clock_control\libdrivers__clock_control.a
    [148/199] Building C object zephyr/drivers/pinctrl/CMakeFiles/drivers__pinctrl.dir/pinctrl_nrf.c.obj
    [149/199] Building C object zephyr/drivers/serial/CMakeFiles/drivers__serial.dir/uart_nrfx_uarte.c.obj
    [150/199] Building C object zephyr/drivers/timer/CMakeFiles/drivers__timer.dir/nrf_rtc_timer.c.obj
    [151/199] Linking C static library zephyr\drivers\flash\libdrivers__flash.a
    [152/199] Building C object zephyr/drivers/pinctrl/CMakeFiles/drivers__pinctrl.dir/common.c.obj
    [153/199] Building C object modules/nrf/lib/fprotect/CMakeFiles/..__nrf__lib__fprotect.dir/fprotect_acl.c.obj
    [154/199] Building C object modules/hal_nordic/nrfx/CMakeFiles/modules__hal_nordic__nrfx.dir/C_/nordicsemi/v2.0.0/modules/hal/nordic/nrfx/mdk/system_nrf52840.c.obj
    [155/199] Building C object modules/nrf/drivers/hw_cc310/CMakeFiles/..__nrf__drivers__hw_cc310.dir/hw_cc310.c.obj
    [156/199] Linking C static library zephyr\drivers\serial\libdrivers__serial.a
    [157/199] Building C object modules/mcuboot/boot/bootutil/zephyr/CMakeFiles/mcuboot_util.dir/C_/nordicsemi/v2.0.0/bootloader/mcuboot/boot/bootutil/src/bootutil_public.c.obj
    [158/199] Linking C static library modules\nrf\lib\fprotect\lib..__nrf__lib__fprotect.a
    [159/199] Linking C static library zephyr\drivers\pinctrl\libdrivers__pinctrl.a
    [160/199] Building C object modules/hal_nordic/nrfx/CMakeFiles/modules__hal_nordic__nrfx.dir/nrfx_glue.c.obj
    [161/199] Linking C static library zephyr\drivers\timer\libdrivers__timer.a
    [162/199] Building C object modules/hal_nordic/nrfx/CMakeFiles/modules__hal_nordic__nrfx.dir/C_/nordicsemi/v2.0.0/modules/hal/nordic/nrfx/drivers/src/nrfx_nvmc.c.obj
    [163/199] Linking C static library modules\nrf\drivers\hw_cc310\lib..__nrf__drivers__hw_cc310.a
    [164/199] Building C object modules/hal_nordic/nrfx/CMakeFiles/modules__hal_nordic__nrfx.dir/C_/nordicsemi/v2.0.0/modules/hal/nordic/nrfx/drivers/src/nrfx_clock.c.obj
    [165/199] Linking C static library modules\mcuboot\boot\bootutil\zephyr\libmcuboot_util.a
    [166/199] Building C object modules/hal_nordic/nrfx/CMakeFiles/modules__hal_nordic__nrfx.dir/C_/nordicsemi/v2.0.0/modules/hal/nordic/nrfx/helpers/nrfx_flag32_allocator.c.obj
    [167/199] Building C object modules/hal_nordic/nrfx/CMakeFiles/modules__hal_nordic__nrfx.dir/C_/nordicsemi/v2.0.0/modules/hal/nordic/nrfx/drivers/src/nrfx_gpiote.c.obj
    [168/199] Building C object modules/hal_nordic/nrfx/CMakeFiles/modules__hal_nordic__nrfx.dir/C_/nordicsemi/v2.0.0/modules/hal/nordic/nrfx/drivers/src/nrfx_wdt.c.obj
    [169/199] Building C object modules/segger/CMakeFiles/modules__segger.dir/C_/nordicsemi/v2.0.0/modules/debug/segger/SEGGER/SEGGER_RTT.c.obj
    [170/199] Building C object modules/hal_nordic/nrfx/CMakeFiles/modules__hal_nordic__nrfx.dir/C_/nordicsemi/v2.0.0/modules/hal/nordic/nrfx/drivers/src/nrfx_ppi.c.obj
    [171/199] Building C object modules/segger/CMakeFiles/modules__segger.dir/SEGGER_RTT_zephyr.c.obj
    [172/199] Building C object zephyr/kernel/CMakeFiles/kernel.dir/main_weak.c.obj
    [173/199] Building C object zephyr/kernel/CMakeFiles/kernel.dir/device.c.obj
    [174/199] Building C object zephyr/kernel/CMakeFiles/kernel.dir/fatal.c.obj
    [175/199] Building C object zephyr/kernel/CMakeFiles/kernel.dir/banner.c.obj
    [176/199] Building C object zephyr/kernel/CMakeFiles/kernel.dir/version.c.obj
    [177/199] Building C object zephyr/kernel/CMakeFiles/kernel.dir/init.c.obj
    [178/199] Building C object zephyr/kernel/CMakeFiles/kernel.dir/errno.c.obj
    [179/199] Linking C static library modules\segger\libmodules__segger.a
    [180/199] Linking C static library modules\hal_nordic\nrfx\libmodules__hal_nordic__nrfx.a
    [181/199] Building C object zephyr/kernel/CMakeFiles/kernel.dir/xip.c.obj
    [182/199] Building C object zephyr/kernel/CMakeFiles/kernel.dir/thread.c.obj
    [183/199] Building C object zephyr/kernel/CMakeFiles/kernel.dir/mem_slab.c.obj
    [184/199] Building C object zephyr/kernel/CMakeFiles/kernel.dir/kheap.c.obj
    [185/199] Building C object zephyr/kernel/CMakeFiles/kernel.dir/timeout.c.obj
    [186/199] Building C object zephyr/kernel/CMakeFiles/kernel.dir/timer.c.obj
    [187/199] Building C object zephyr/kernel/CMakeFiles/kernel.dir/mempool.c.obj
    [188/199] Linking C static library zephyr\kernel\libkernel.a
    [189/199] Linking C executable zephyr\zephyr_pre0.elf
    
    [190/199] Generating dev_handles.c
    [191/199] Building C object zephyr/CMakeFiles/zephyr_pre1.dir/misc/empty_file.c.obj
    [192/199] Building C object zephyr/CMakeFiles/zephyr_pre1.dir/dev_handles.c.obj
    [193/199] Linking C executable zephyr\zephyr_pre1.elf
    
    [194/199] Generating linker.cmd
    [195/199] Generating isr_tables.c, isrList.bin
    [196/199] Building C object zephyr/CMakeFiles/zephyr_final.dir/misc/empty_file.c.obj
    [197/199] Building C object zephyr/CMakeFiles/zephyr_final.dir/dev_handles.c.obj
    [198/199] Building C object zephyr/CMakeFiles/zephyr_final.dir/isr_tables.c.obj
    [199/199] Linking C executable zephyr\zephyr.elf
    Memory region         Used Size  Region Size  %age Used
               FLASH:       37964 B        64 KB     57.93%
                SRAM:       21024 B       256 KB      8.02%
            IDT_LIST:          0 GB         2 KB      0.00%
    [167/188] Linking C executable zephyr\zephyr_pre0.elf
    
    [171/188] Linking C executable zephyr\zephyr_pre1.elf
    
    [177/188] Linking C executable zephyr\zephyr.elf
    Memory region         Used Size  Region Size  %age Used
               FLASH:       45668 B     982528 B      4.65%
                SRAM:       29344 B       256 KB     11.19%
            IDT_LIST:          0 GB         2 KB      0.00%
    [184/188] Generating ../../zephyr/app_moved_test_update.hex
    [186/188] No install step for 'mcuboot_subimage'
    [187/188] Completed 'mcuboot_subimage'
    [188/188] Generating zephyr/merged.hex
     *  Terminal will be reused by tasks, press any key to close it. 

    Flash the board and LED1 will flash once a second.

    Press Button 1 and reset to put the board into bootload mode. Bootload the board with mcumgr.

    Press the reset button and the LED should flash again indicating a successful bootload.

    If the code is built with the smaller array uint8_t largeArray[20480] the bootload will be successful. If the code is built with the larger array uint8_t largeArray[75776] the bootload will be unsuccessful.

    Encrypted bootloads appear to work when the file size is small and fail when the file size is larger. Any ideas why this might occur? There may be something we have missed in the configuration setup.

    Thanks,

    Ray

Related