Add DFU support to your application

Add DFU support to your application

This guide is for an older version of the nRF Connect SDK. For a newer guide on Bootloaders and DFU, we recommend https://academy.nordicsemi.com/courses/nrf-connect-sdk-intermediate/

This guide will show you, step by step, how to add Device Firmware Update (DFU) support to your application using the nRF Connect SDK. First it will demonstrate how to add BLE DFU support to the Peripheral LBS sample and how to perform a DFU using the nRF Connect Device Manager app. The next section will show you how to add Serial DFU support to the Hello World sample and how to perform a DFU from a computer using mcumgr. The code snippets used in this guide are inspired by the SMP Server sample.

Check out the source code for the mcumgr management library for more information about the library and the underlying protocols. It contains a README explaining mcumgr and a README explaining the Simple Management Protocol (SMP).

Before starting, make sure you have installed the nRF Connect SDK and are familiar with nRF Connect for VS code. Check out the nRF Connect for VS Code series on YouTube for help with this. The west command is used to build and flash the samples, but if you're not familiar with the command line, you can build and flash the sample using nRF Connect for VS Code instead.

The samples in this guide are tested with nRF Connect SDK v1.8.0-rc1 and the nRF52840 DK

DFU over Bluetooth

Modify the Peripheral LBS sample

1. In nRF Connect for VS Code, create a new application from sample, like explained in nRF Connect for VS Code, 2: Create an application. Choose the peripheral_lbs sample and give it the name ble_dfu_peripheral_lbs.

In the above image, Linux is used. If you're using Windows, make sure the nRF Connect Toolchain points to the folder <ncs location>/<ncs version>/toolchain

2. Add the following lines to the prj.conf file

2a. If you are using NCS v2.5.0 or newer, adding FOTA update to your application is simplified. You only need to add these into prj.conf

#Enable MCUBOOT bootloader build in the application
CONFIG_BOOTLOADER_MCUBOOT=y
#Include MCUMGR and the dependencies in the build
CONFIG_NCS_SAMPLE_MCUMGR_BT_OTA_DFU=y

You can jump straight to Testing section

You can read more about CONFIG_NCS_SAMPLE_MCUMGR_BT_OTA_DFU here. The configuration basically add all you need for DFU over BLE, including adding FOTA service into your Bluetooth attribute table. 

2b. If you are using NCS v2.4.x or newer: add the following lines to the prj.conf file, found in ble_dfu_peripheral_lbs/prj.conf

# Enable mcumgr.
CONFIG_MCUMGR=y

# Enable most core commands.
CONFIG_MCUMGR_CMD_IMG_MGMT=y
CONFIG_MCUMGR_CMD_OS_MGMT=y

# Ensure an MCUboot-compatible binary is generated.
CONFIG_BOOTLOADER_MCUBOOT=y

The image management command handlers makes it possible to uploadlisttest and confirm the image(s), while the OS management command handlers makes it possible to reset the chip (and run the echo command). Since the DFU support is added to the application, the chip needs to be reset, to give control to MCUboot, which will validate the new uploaded image and swap it with the old image. 

3. Add the following lines to the prj.conf file as well

# Allow for large Bluetooth data packets.
CONFIG_BT_L2CAP_TX_MTU=252
CONFIG_BT_BUF_ACL_RX_SIZE=256

# Enable the Bluetooth (unauthenticated) and shell mcumgr transports.
CONFIG_MCUMGR_SMP_BT=y
CONFIG_MCUMGR_SMP_BT_AUTHEN=n

# Some command handlers require a large stack.
CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=4096

4. Add the lines below to the top of the main.c file, found in ble_dfu_peripheral_lbs/src/main.c

4a. If you use nRF Connect SDK v2.3 or newer: 

#include <zephyr/mgmt/mcumgr/transport/smp_bt.h>

4b. If you use nRF Connect SDK v2.0 to v2.2:

#include <zephyr/mgmt/mcumgr/smp_bt.h>
#include "os_mgmt/os_mgmt.h"
#include "img_mgmt/img_mgmt.h"

4c. If you use nRF Connect SDK v1.9 or earlier

#include <mgmt/mcumgr/smp_bt.h>
#include "os_mgmt/os_mgmt.h"
#include "img_mgmt/img_mgmt.h"

 5. Remove the LBS Service UUID from the scan response packet, and replace it with the SMP service UUID:

BT_DATA_BYTES(BT_DATA_UUID128_ALL,
		      0x84, 0xaa, 0x60, 0x74, 0x52, 0x8a, 0x8b, 0x86,
		      0xd3, 0x4c, 0xb7, 0x1d, 0x1d, 0xdc, 0x53, 0x8d),

This is to make the advertising visible for the nRF Connect Device Manager app. The app will filter out all the devices that don't advertise with the SMP service UUID.

6. Lastly, add these lines right before bt_conn_cb_register 

6a. If you use nRF Connect SDK v2.3 or newer: 

printk("build time: " __DATE__ " " __TIME__ "\n");

smp_bt_register();


6b. If you use nRF Connect SDK v2.2 or earlier: 

printk("build time: " __DATE__ " " __TIME__ "\n");
os_mgmt_register_group();
img_mgmt_register_group();
smp_bt_register();

Here, we register the OS and Image group and the SMP Bluetooth service. A printk() with the build date and time is added to make it easier to confirm that an update was successful.

If you've followed the above steps correctly, the sample should look like this: https://github.com/simon-iversen/sdk-nrf/tree/ble_dfu_peripheral_lbs/samples/bluetooth/peripheral_lbs 

Testing

1. Connect your board to the computer, then build ble_dfu_peripheral_lbs and flash it to the board

west build -b nrf52840dk_nrf52840 -p && west flash --erase

2. Open a serial terminal, reset the chip and check the date and time that is output. 

For example:

...
*** Booting Zephyr OS build v2.7.0-ncs1-rc1 ***
Starting Bluetooth Peripheral LBS example
build time: Nov 30 2021 17:14:25
...

3. Build the sample again, to create the file used for the DFU update

west build -b nrf52840dk_nrf52840 -p

Due to the printk statement with the build date and time, a new and different binary will be created

  • Transfer the generated file peripheral_lbs/build/zephyr/app_update.bin to your phone
  • Install the nRF Connect Device Manager app on your phone
  • If you open the app, the advertisement from the peripheral LBS sample should be found. Click on it

4. Next, click on the download button, then SELECT FILE and find the app_update.bin file you just transferred to the phone

5. Click on START, then select Test and Confirm and start the firmware update

       

The app will then transfer the image binary, and UPLOAD COMPLETE should be displayed when the whole binary is uploaded

       

The nRF Connect Device Manager app will reset the chip after completing the transfer. If the date and time output on the terminal is different from the one seen earlier, it means a different image is running, and the update was successful

For example:

...
*** Booting Zephyr OS build v2.7.0-ncs1-rc1 ***
Starting Bluetooth Peripheral LBS example
build time: Nov 30 2021 17:18:53
...

The new image will get confirmed from the app, so it should not revert back on the next reset.

Serial DFU

Modify the Hello World sample

1. In nRF Connect for VS Code, create a new application from sample, like explained in nRF Connect for VS Code, 2: Create an application. Choose the hello_world sample and give it the name serial_dfu_hello_world.

In the above image, Linux is used. If you're using Windows, make sure the nRF Connect Toolchain points to the folder <ncs location>/<ncs version>/toolchain

2. Add the following lines to the prj.conf file

2a. If you are using NCS v2.5.0 or newer, add the following configurations to prj.conf:

# Enable MCUBoot.
CONFIG_BOOTLOADER_MCUBOOT=y

# Enable flash operations.
CONFIG_FLASH=y

# Enable MCUmgr and dependencies.
CONFIG_MCUMGR=y
CONFIG_NET_BUF=y
CONFIG_ZCBOR=y
CONFIG_CRC=y
CONFIG_STREAM_FLASH=y
CONFIG_FLASH_MAP=y

# Enable most core commands.
CONFIG_IMG_MANAGER=y
CONFIG_MCUMGR_GRP_IMG=y
CONFIG_MCUMGR_GRP_OS=y

# Enable the serial mcumgr transport.
CONFIG_MCUMGR_TRANSPORT_UART=y
CONFIG_BASE64=y
CONFIG_CONSOLE=y

# Disable UART Console and enable the RTT console
CONFIG_UART_CONSOLE=n
CONFIG_RTT_CONSOLE=y
CONFIG_USE_SEGGER_RTT=y

# Some command handlers require a large stack.
CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=4096

That's all you need in your application if you are using NCS v2.5.0 and newer to support UART DFU, you now can jump to Testing section

2.b If you are using NCS earlier than v2.5.0

Add the following lines to the prj.conf file, found in serial_dfu_hello_world/prj.conf.

# Enable mcumgr.
CONFIG_MCUMGR=y

# Enable most core commands.
CONFIG_MCUMGR_CMD_IMG_MGMT=y
CONFIG_MCUMGR_CMD_OS_MGMT=y

# Ensure an MCUboot-compatible binary is generated.
CONFIG_BOOTLOADER_MCUBOOT=y

Check out step 2 in Modify the Peripheral LBS sample for an explanation of these configs.

3. Add the following lines to the prj.conf file as well.

# Enable the serial mcumgr transport.
CONFIG_MCUMGR_SMP_UART=y

# Disable UART Console and enable the RTT console
CONFIG_UART_CONSOLE=n
CONFIG_RTT_CONSOLE=y
CONFIG_USE_SEGGER_RTT=y

# Some command handlers require a large stack.
CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=4096

Next, we use RTT for logging instead of UART, so that it doesn't interfere with the transfer (see Nordic nRF5x Segger J-Link -> RTT Console). Another option is to use the configs from smp_svr/overlay-serial-console.config to enable the UART console with mcumgr pass through

4. Add the lines below to the top of the main.c file 

4a. If you use nRF Connect SDK v.2.2 or earlier:

#include "os_mgmt/os_mgmt.h"
#include "img_mgmt/img_mgmt.h"

4b. If you use nRF Connect SDK v.2.3 or newer, no lines are required.

5. Add the lines shown below to the start of the main() function.

5a. If you use nRF Connect SDK v2.3 or newer: 

printk("build time: " __DATE__ " " __TIME__ "\n");

5b. If you use nRF Connect SDK v2.2 or earlier: 

printk("build time: " __DATE__ " " __TIME__ "\n");
os_mgmt_register_group();
img_mgmt_register_group();

We don't need to run any functions related to the SMP serial transport. This is because smp_uart_init() will run before main() and set up an UART mcumgr ISR that handles the incoming mcumgr messages.

If you've followed the above steps correctly, the sample should look like this: https://github.com/simon-iversen/sdk-zephyr/tree/serial_dfu_hello_world/samples/hello_world 

Testing

Before testing the sample, make sure mass storage is disabled. If not, the upload command might stall at 0%

1. Follow the steps in Disabling the Mass Storage Device functionality to disable mass storage

2. Build serial_dfu_hello_world and flash it to your board

west build -b nrf52840dk_nrf52840 -p && west flash --erase

3. Disconnect and connect the micro USB from the computer.

Use the USB connector connected to the Interface MCU, not the USB connector connected to the USB peripheral. This is because UART 0 is used for mcumgr UART, which is by default connected to the Interface MCU for the nRF52840 DK in nRF Connect SDK.

4. Install and open a software that can display the RTT logs. You can check out Nordic nRF5x Segger J-Link --> RTT Console, or use the integrated RTT terminal that comes with nRF Connect for VS Code

5. When you've gotten the RTT logs working, check the date and time that is output

For example:

*** Booting Zephyr OS build v2.7.0-ncs1-rc1 ***
Hello World! nrf52840dk_nrf52840
build time: Nov 30 2021 17:39:13

6. Build the sample again to create the file used for the DFU update 

west build -b nrf52840dk_nrf52840 -p

7. Install mcumgr by following the instructions in the section MCUmgr -> Command-line Tool, and add it to the path

8. Get the development kit’s serial port name (for example, "/dev/ttyACM0"), by running nrfjprog --com

../home$ nrfjprog --com
683416774 /dev/ttyACM0 VCOM0

9. Open the command line and run the following command

mcumgr --conntype serial --connstring "/dev/ttyACM0,baud=115200" echo hello

The string "hello" should be returned, if not the communication is not working properly

10. Open a terminal in ../zephyr/samples/hello_world/build/zephyr (where the signed binary app_update.bin is located) and type in the following command to start the upload

mcumgr --conntype serial --connstring "/dev/ttyACM0,baud=115200" image upload -e app_update.bin

11. When the transfer has been completed run the following command:

mcumgr --conntype serial --connstring "/dev/ttyACM0,baud=115200" image list

This will list all the images located on the chip, and if the upload has been successful, you should see an image at slot 1, similar to the one below:

Images: 
image=0 slot=0
version: 0.0.0
bootable: true
flags: active confirmed
hash: f8ebf4778aa17de10c24ea1a8fd7b3877672a934448d5193b89a0a60c37699cd
image=0 slot=1
version: 0.0.0
bootable: true flags:
hash: 31cc459b1ec1ac8e19f092caa860db8e377a7ab66234012bdb6a1dd522807269
Split status: N/A (0)

12. In order for mcuboot to swap the images on reset, the flag of the image in slot-1 has to be "pending". This can be done by running the mcumgr test command, with the hash of slot-1 image. For example:

mcumgr --conntype serial --connstring "/dev/ttyACM0,baud=115200" image test 31cc459b1ec1ac8e19f092caa860db8e377a7ab66234012bdb6a1dd522807269

The image in slot-1 should now be in a "pending" state

13. For the swap to start, the chip needs to reset. This can be done remotely through mcumgr:

mcumgr --conntype serial --connstring "/dev/ttyACM0,baud=115200" reset

14. Check the log output, and if the date and time output is different from the one seen earlier, the update was successful

For example:

*** Booting Zephyr OS build v2.7.0-ncs1-rc1 ***
Hello World! nrf52840dk_nrf52840
build time: Nov 30 2021 17:42:56
  • To make the swap permanent, run the confirm command
mcumgr --conntype serial --connstring "/dev/ttyACM0,baud=115200" image confirm

Other DFU samples

Serial DFU using external flash

This sample is similar to the one in Serial DFU, just that the secondary slot is located at the nRF52840 DK's onboard flash instead of the internal flash

https://github.com/simon-iversen/sdk-zephyr/tree/serial_dfu_ext_flash_hello_world/samples/hello_world

HTTP DFU using external flash

This sample will download an app_update.bin file from a remote server and write it to the external flash. The nRF9160 DK needs to be used

https://github.com/simon-iversen/sdk-nrf/tree/ext_flash_mcuboot_91dk/samples/nrf9160/http_update/application_update

Bluetooth DFU from chip

With this sample you will be able to perform a DFU from one nRF52840DK to another nRF52840DK

https://github.com/simon-iversen/ncs_samples/tree/master/central_smp_client_dfu

Serial DFU of app core and net core on the nRF5340

This sample demonstrates how to perform DFU on the nRF5340, specifically app core updates (main application and mcubot) and network core updates

https://github.com/simon-iversen/ncs_samples/tree/master/update_mcuboot_app_and_netcore 

Parents
  • Hi,

    I followed your tutorial up to the point of modifying the Peripheral LBS sample. I tried to pristine build the modified Peripheral LBS sample in VS Code however it is failing to link?

    I'm using the BL653_DVK board from Laird, it is based on the nrf52833 SoC. I am also using nrf Connect SDK 1.8.0 

    I've been struggling with this for about a week now, and I can't figure out what is the problem. Please help!  Here's the error log:

    > Executing task: nRF Connect: Dynamic Build Task <
    
    Building peripheral_lbs
    west build --build-dir /home/wilfrid/Documents/nrf_projects/peripheral_lbs/build_1 /home/wilfrid/Documents/nrf_projects/peripheral_lbs --pristine --board bl653_dvk -- -DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=On -DNCS_TOOLCHAIN_VERSION:STRING="NONE" -DBOARD_ROOT:STRING="/home/wilfrid/Documents/nrf_projects/hello_world;/home/wilfrid/Documents/nrf_projects/blinky_pwm;/home/wilfrid/Documents/nrf_projects/peripheral_lbs;/home/wilfrid/Documents/nrf_projects/bootloader" -DCONF_FILE:STRING="/home/wilfrid/Documents/nrf_projects/peripheral_lbs/prj.conf"
    
    -- west build: generating a build system
    Including boilerplate (Zephyr base): /home/wilfrid/Documents/nRF/ncs/zephyr/cmake/app/boilerplate.cmake
    -- Application: /home/wilfrid/Documents/nrf_projects/peripheral_lbs
    -- Zephyr version: 2.7.0 (/home/wilfrid/Documents/nRF/ncs/zephyr), build: v2.7.0-ncs1
    -- Found Python3: /usr/bin/python3.8 (found suitable exact version "3.8.10") found components: Interpreter 
    -- Found west (found suitable version "0.12.0", minimum required is "0.7.1")
    -- Board: bl653_dvk
    -- Cache files will be written to: /home/wilfrid/.cache/zephyr
    -- Found dtc: /usr/bin/dtc (found suitable version "1.5.0", minimum required is "1.4.6")
    -- Found toolchain: gnuarmemb (/opt/gnuarmemb)
    -- Found BOARD.dts: /home/wilfrid/Documents/nRF/ncs/zephyr/boards/arm/bl653_dvk/bl653_dvk.dts
    -- Generated zephyr.dts: /home/wilfrid/Documents/nrf_projects/peripheral_lbs/build_1/zephyr/zephyr.dts
    -- Generated devicetree_unfixed.h: /home/wilfrid/Documents/nrf_projects/peripheral_lbs/build_1/zephyr/include/generated/devicetree_unfixed.h
    -- Generated device_extern.h: /home/wilfrid/Documents/nrf_projects/peripheral_lbs/build_1/zephyr/include/generated/device_extern.h
    -- Including generated dts.cmake file: /home/wilfrid/Documents/nrf_projects/peripheral_lbs/build_1/zephyr/dts.cmake
    Parsing /home/wilfrid/Documents/nrf_projects/peripheral_lbs/Kconfig
    Loaded configuration '/home/wilfrid/Documents/nRF/ncs/zephyr/boards/arm/bl653_dvk/bl653_dvk_defconfig'
    Merged configuration '/home/wilfrid/Documents/nrf_projects/peripheral_lbs/prj.conf'
    Configuration saved to '/home/wilfrid/Documents/nrf_projects/peripheral_lbs/build_1/zephyr/.config'
    Kconfig header saved to '/home/wilfrid/Documents/nrf_projects/peripheral_lbs/build_1/zephyr/include/generated/autoconf.h'
    -- The C compiler identification is GNU 9.2.1
    -- The CXX compiler identification is GNU 9.2.1
    -- The ASM compiler identification is GNU
    -- Found assembler: /opt/gnuarmemb/bin/arm-none-eabi-gcc
    
    === child image mcuboot -  begin ===
    Including boilerplate (Zephyr base): /home/wilfrid/Documents/nRF/ncs/zephyr/cmake/app/boilerplate.cmake
    -- Application: /home/wilfrid/Documents/nRF/ncs/bootloader/mcuboot/boot/zephyr
    -- Zephyr version: 2.7.0 (/home/wilfrid/Documents/nRF/ncs/zephyr), build: v2.7.0-ncs1
    -- Found Python3: /usr/bin/python3.8 (found suitable exact version "3.8.10") found components: Interpreter 
    -- Found west (found suitable version "0.12.0", minimum required is "0.7.1")
    -- Board: bl653_dvk
    -- Cache files will be written to: /home/wilfrid/.cache/zephyr
    -- Found dtc: /usr/bin/dtc (found suitable version "1.5.0", minimum required is "1.4.6")
    -- Found toolchain: gnuarmemb (/opt/gnuarmemb)
    -- Found BOARD.dts: /home/wilfrid/Documents/nRF/ncs/zephyr/boards/arm/bl653_dvk/bl653_dvk.dts
    -- Found devicetree overlay: /home/wilfrid/Documents/nRF/ncs/nrf/modules/mcuboot/usb.overlay
    -- Found devicetree overlay: /home/wilfrid/Documents/nRF/ncs/bootloader/mcuboot/boot/zephyr/dts.overlay
    -- Generated zephyr.dts: /home/wilfrid/Documents/nrf_projects/peripheral_lbs/build_1/mcuboot/zephyr/zephyr.dts
    -- Generated devicetree_unfixed.h: /home/wilfrid/Documents/nrf_projects/peripheral_lbs/build_1/mcuboot/zephyr/include/generated/devicetree_unfixed.h
    -- Generated device_extern.h: /home/wilfrid/Documents/nrf_projects/peripheral_lbs/build_1/mcuboot/zephyr/include/generated/device_extern.h
    -- Including generated dts.cmake file: /home/wilfrid/Documents/nrf_projects/peripheral_lbs/build_1/mcuboot/zephyr/dts.cmake
    Parsing /home/wilfrid/Documents/nRF/ncs/bootloader/mcuboot/boot/zephyr/Kconfig
    Loaded configuration '/home/wilfrid/Documents/nRF/ncs/zephyr/boards/arm/bl653_dvk/bl653_dvk_defconfig'
    Merged configuration '/home/wilfrid/Documents/nRF/ncs/bootloader/mcuboot/boot/zephyr/prj.conf'
    Merged configuration '/home/wilfrid/Documents/nRF/ncs/nrf/subsys/partition_manager/partition_manager_enabled.conf'
    Configuration saved to '/home/wilfrid/Documents/nrf_projects/peripheral_lbs/build_1/mcuboot/zephyr/.config'
    Kconfig header saved to '/home/wilfrid/Documents/nrf_projects/peripheral_lbs/build_1/mcuboot/zephyr/include/generated/autoconf.h'
    -- The C compiler identification is GNU 9.2.1
    -- The CXX compiler identification is GNU 9.2.1
    -- The ASM compiler identification is GNU
    -- Found assembler: /opt/gnuarmemb/bin/arm-none-eabi-gcc
    MCUBoot bootloader key file: /home/wilfrid/Documents/nRF/ncs/bootloader/mcuboot/root-rsa-2048.pem
    -- Configuring done
    -- Generating done
    -- Build files have been written to: /home/wilfrid/Documents/nrf_projects/peripheral_lbs/build_1/mcuboot
    === child image mcuboot -  end ===
    
    CMake Warning at /home/wilfrid/Documents/nRF/ncs/nrf/modules/mcuboot/CMakeLists.txt:255 (message):
      
    
            ---------------------------------------------------------
            --- WARNING: Using default MCUBoot key, it should not ---
            --- be used for production.                           ---
            ---------------------------------------------------------
            
    
    
    
    CMake Warning at /home/wilfrid/Documents/nRF/ncs/zephyr/CMakeLists.txt:1662 (message):
      __ASSERT() statements are globally ENABLED
    
    
    -- Configuring done
    -- Generating done
    -- Build files have been written to: /home/wilfrid/Documents/nrf_projects/peripheral_lbs/build_1
    -- west build: building application
    [1/262] Preparing syscall dependency handling
    
    [2/262] Creating directories for 'mcuboot_subimage'
    [3/262] No download step for 'mcuboot_subimage'
    [4/262] No update step for 'mcuboot_subimage'
    [5/262] No patch step for 'mcuboot_subimage'
    [6/262] No configure step for 'mcuboot_subimage'
    [6/262] Performing build step for 'mcuboot_subimage'
    [1/261] Preparing syscall dependency handling
    
    [2/261] Generating misc/generated/syscalls_subdirs.trigger
    [3/261] Generating misc/generated/syscalls.json, misc/generated/struct_tags.json
    [4/261] Generating include/generated/syscall_dispatch.c, include/generated/syscall_list.h
    [5/261] Generating include/generated/kobj-types-enum.h, include/generated/otype-to-str.h, include/generated/otype-to-size.h
    [6/261] Generating include/generated/driver-validation.h
    [7/261] Building C object zephyr/CMakeFiles/offsets.dir/arch/arm/core/offsets/offsets.c.obj
    [8/261] Generating include/generated/offsets.h
    [9/261] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/cbprintf.c.obj
    [10/261] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/cbprintf_packaged.c.obj
    [11/261] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/crc32c_sw.c.obj
    [12/261] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/crc32_sw.c.obj
    [13/261] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/crc16_sw.c.obj
    [14/261] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/crc8_sw.c.obj
    [15/261] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/crc7_sw.c.obj
    [16/261] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/dec.c.obj
    [17/261] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/fdtable.c.obj
    [18/261] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/hex.c.obj
    [19/261] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/notify.c.obj
    [20/261] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/printk.c.obj
    [21/261] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/onoff.c.obj
    [22/261] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/rb.c.obj
    [23/261] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/sem.c.obj
    [24/261] Generating zephyr/autogen-pubkey.c
    [25/261] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/thread_entry.c.obj
    [26/261] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/timeutil.c.obj
    [27/261] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/heap.c.obj
    [28/261] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/heap-validate.c.obj
    [29/261] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/bitarray.c.obj
    [30/261] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/reboot.c.obj
    [31/261] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/cbprintf_nano.c.obj
    [32/261] Building C object zephyr/CMakeFiles/zephyr.dir/misc/generated/configs.c.obj
    [33/261] Building ASM object zephyr/CMakeFiles/zephyr.dir/soc/arm/nordic_nrf/common/soc_nrf_common.S.obj
    [34/261] Building C object CMakeFiles/app.dir/main.c.obj
    [35/261] Building C object CMakeFiles/app.dir/flash_map_extended.c.obj
    [36/261] Building C object CMakeFiles/app.dir/os.c.obj
    [37/261] Building C object CMakeFiles/app.dir/keys.c.obj
    [38/261] Building C object CMakeFiles/app.dir/boot_serial_extensions.c.obj
    [39/261] Building C object CMakeFiles/app.dir/home/wilfrid/Documents/nRF/ncs/bootloader/mcuboot/boot/bootutil/src/image_validate.c.obj
    [40/261] Building C object CMakeFiles/app.dir/home/wilfrid/Documents/nRF/ncs/bootloader/mcuboot/boot/bootutil/src/tlv.c.obj
    [41/261] Building C object CMakeFiles/app.dir/home/wilfrid/Documents/nRF/ncs/bootloader/mcuboot/boot/bootutil/src/encrypted.c.obj
    [42/261] Building C object CMakeFiles/app.dir/home/wilfrid/Documents/nRF/ncs/bootloader/mcuboot/boot/bootutil/src/image_rsa.c.obj
    [43/261] Building C object CMakeFiles/app.dir/home/wilfrid/Documents/nRF/ncs/bootloader/mcuboot/boot/bootutil/src/image_ec256.c.obj
    [44/261] Building C object CMakeFiles/app.dir/home/wilfrid/Documents/nRF/ncs/bootloader/mcuboot/boot/bootutil/src/image_ed25519.c.obj
    [45/261] Building C object CMakeFiles/app.dir/home/wilfrid/Documents/nRF/ncs/bootloader/mcuboot/boot/bootutil/src/bootutil_misc.c.obj
    [46/261] Building C object CMakeFiles/app.dir/home/wilfrid/Documents/nRF/ncs/bootloader/mcuboot/boot/bootutil/src/fault_injection_hardening.c.obj
    [47/261] Building C object CMakeFiles/app.dir/home/wilfrid/Documents/nRF/ncs/bootloader/mcuboot/boot/bootutil/src/swap_misc.c.obj
    [48/261] Building C object CMakeFiles/app.dir/home/wilfrid/Documents/nRF/ncs/bootloader/mcuboot/boot/bootutil/src/loader.c.obj
    [49/261] Building C object CMakeFiles/app.dir/home/wilfrid/Documents/nRF/ncs/bootloader/mcuboot/boot/bootutil/src/swap_scratch.c.obj
    [50/261] Building C object CMakeFiles/app.dir/home/wilfrid/Documents/nRF/ncs/bootloader/mcuboot/boot/bootutil/src/swap_move.c.obj
    [51/261] Building C object CMakeFiles/app.dir/zephyr/autogen-pubkey.c.obj
    [52/261] Building C object CMakeFiles/app.dir/home/wilfrid/Documents/nRF/ncs/bootloader/mcuboot/boot/bootutil/src/caps.c.obj
    [53/261] Building C object CMakeFiles/app.dir/nrf_cleanup.c.obj
    [54/261] Building C object zephyr/CMakeFiles/zephyr.dir/soc/arm/nordic_nrf/validate_base_addresses.c.obj
    [55/261] Building C object zephyr/CMakeFiles/zephyr.dir/soc/arm/nordic_nrf/validate_enabled_instances.c.obj
    [56/261] Building C object zephyr/CMakeFiles/zephyr.dir/subsys/logging/log_minimal.c.obj
    [57/261] Building C object zephyr/CMakeFiles/zephyr.dir/subsys/storage/flash_map/flash_map.c.obj
    [58/261] Building C object zephyr/CMakeFiles/zephyr.dir/home/wilfrid/Documents/nRF/ncs/nrf/subsys/partition_manager/flash_map_partition_manager.c.obj
    [59/261] Building C object zephyr/CMakeFiles/zephyr.dir/subsys/tracing/tracing_none.c.obj
    [60/261] Building C object zephyr/arch/common/CMakeFiles/isr_tables.dir/isr_tables.c.obj
    [61/261] Building C object zephyr/arch/common/CMakeFiles/arch__common.dir/sw_isr_common.c.obj
    [62/261] Linking C static library app/libapp.a
    [63/261] Generating linker_zephyr_prebuilt.cmd
    [64/261] Building C object zephyr/arch/arch/arm/core/aarch32/CMakeFiles/arch__arm__core__aarch32.dir/fatal.c.obj
    [65/261] Building C object zephyr/arch/arch/arm/core/aarch32/CMakeFiles/arch__arm__core__aarch32.dir/irq_manage.c.obj
    [66/261] Building C object zephyr/arch/arch/arm/core/aarch32/CMakeFiles/arch__arm__core__aarch32.dir/nmi.c.obj
    [67/261] Building ASM object zephyr/arch/arch/arm/core/aarch32/CMakeFiles/arch__arm__core__aarch32.dir/nmi_on_reset.S.obj
    [68/261] Building ASM object zephyr/arch/arch/arm/core/aarch32/CMakeFiles/arch__arm__core__aarch32.dir/cpu_idle.S.obj
    [69/261] Linking C static library zephyr/libzephyr.a
    [70/261] Linking C static library zephyr/arch/common/libisr_tables.a
    [71/261] Building C object zephyr/arch/arch/arm/core/aarch32/CMakeFiles/arch__arm__core__aarch32.dir/prep_c.c.obj
    [72/261] Building C object zephyr/arch/arch/arm/core/aarch32/CMakeFiles/arch__arm__core__aarch32.dir/swap.c.obj
    [73/261] Building C object zephyr/CMakeFiles/zephyr_prebuilt.dir/misc/empty_file.c.obj
    [74/261] Building ASM object zephyr/arch/arch/arm/core/aarch32/CMakeFiles/arch__arm__core__aarch32.dir/swap_helper.S.obj
    [75/261] Building C object zephyr/arch/arch/arm/core/aarch32/CMakeFiles/arch__arm__core__aarch32.dir/thread.c.obj
    [76/261] Building ASM object zephyr/arch/arch/arm/core/aarch32/CMakeFiles/arch__arm__core__aarch32.dir/isr_wrapper.S.obj
    [77/261] Building ASM object zephyr/arch/arch/arm/core/aarch32/cortex_m/CMakeFiles/arch__arm__core__aarch32__cortex_m.dir/exc_exit.S.obj
    [78/261] Building C object zephyr/arch/arch/arm/core/aarch32/cortex_m/CMakeFiles/arch__arm__core__aarch32__cortex_m.dir/fault.c.obj
    [79/261] Building ASM object zephyr/arch/arch/arm/core/aarch32/cortex_m/CMakeFiles/arch__arm__core__aarch32__cortex_m.dir/fault_s.S.obj
    [80/261] Linking C static library zephyr/arch/common/libarch__common.a
    [81/261] Building C object zephyr/arch/arch/arm/core/aarch32/cortex_m/CMakeFiles/arch__arm__core__aarch32__cortex_m.dir/fpu.c.obj
    [82/261] Building C object zephyr/arch/arch/arm/core/aarch32/cortex_m/CMakeFiles/arch__arm__core__aarch32__cortex_m.dir/irq_init.c.obj
    [83/261] Building ASM object zephyr/arch/arch/arm/core/aarch32/cortex_m/CMakeFiles/arch__arm__core__aarch32__cortex_m.dir/reset.S.obj
    [84/261] Building C object zephyr/arch/arch/arm/core/aarch32/cortex_m/CMakeFiles/arch__arm__core__aarch32__cortex_m.dir/scb.c.obj
    [85/261] Building C object zephyr/arch/arch/arm/core/aarch32/cortex_m/CMakeFiles/arch__arm__core__aarch32__cortex_m.dir/thread_abort.c.obj
    [86/261] Linking C static library zephyr/arch/arch/arm/core/aarch32/libarch__arm__core__aarch32.a
    [87/261] Building ASM object zephyr/arch/arch/arm/core/aarch32/cortex_m/CMakeFiles/arch__arm__core__aarch32__cortex_m.dir/vector_table.S.obj
    [88/261] Building C object zephyr/arch/arch/arm/core/aarch32/mpu/CMakeFiles/arch__arm__core__aarch32__mpu.dir/arm_core_mpu.c.obj
    [89/261] Building C object zephyr/arch/arch/arm/core/aarch32/mpu/CMakeFiles/arch__arm__core__aarch32__mpu.dir/arm_mpu.c.obj
    [90/261] Building C object zephyr/lib/libc/minimal/CMakeFiles/lib__libc__minimal.dir/source/stdlib/abort.c.obj
    [91/261] Building C object zephyr/lib/libc/minimal/CMakeFiles/lib__libc__minimal.dir/source/stdlib/atoi.c.obj
    [92/261] Building C object zephyr/lib/libc/minimal/CMakeFiles/lib__libc__minimal.dir/source/stdlib/strtol.c.obj
    [93/261] Building C object zephyr/lib/libc/minimal/CMakeFiles/lib__libc__minimal.dir/source/stdlib/strtoul.c.obj
    [94/261] Building C object zephyr/lib/libc/minimal/CMakeFiles/lib__libc__minimal.dir/source/stdlib/malloc.c.obj
    [95/261] Building C object zephyr/lib/libc/minimal/CMakeFiles/lib__libc__minimal.dir/source/stdlib/bsearch.c.obj
    [96/261] Building C object zephyr/lib/libc/minimal/CMakeFiles/lib__libc__minimal.dir/source/stdlib/exit.c.obj
    [97/261] Building C object zephyr/lib/libc/minimal/CMakeFiles/lib__libc__minimal.dir/source/string/strncasecmp.c.obj
    [98/261] Building C object zephyr/lib/libc/minimal/CMakeFiles/lib__libc__minimal.dir/source/string/strstr.c.obj
    [99/261] Linking C static library zephyr/arch/arch/arm/core/aarch32/cortex_m/libarch__arm__core__aarch32__cortex_m.a
    [100/261] Linking C static library zephyr/arch/arch/arm/core/aarch32/mpu/libarch__arm__core__aarch32__mpu.a
    [101/261] Building C object zephyr/lib/libc/minimal/CMakeFiles/lib__libc__minimal.dir/source/string/string.c.obj
    [102/261] Building C object zephyr/lib/libc/minimal/CMakeFiles/lib__libc__minimal.dir/source/string/strspn.c.obj
    [103/261] Building C object zephyr/lib/libc/minimal/CMakeFiles/lib__libc__minimal.dir/source/stdout/stdout_console.c.obj
    [104/261] Building C object zephyr/lib/libc/minimal/CMakeFiles/lib__libc__minimal.dir/source/stdout/sprintf.c.obj
    [105/261] Building C object zephyr/lib/libc/minimal/CMakeFiles/lib__libc__minimal.dir/source/stdout/fprintf.c.obj
    [106/261] Building C object zephyr/lib/libc/minimal/CMakeFiles/lib__libc__minimal.dir/source/time/gmtime.c.obj
    [107/261] Building C object zephyr/lib/posix/CMakeFiles/lib__posix.dir/pthread_common.c.obj
    [108/261] Building C object zephyr/lib/posix/CMakeFiles/lib__posix.dir/nanosleep.c.obj
    [109/261] Building C object zephyr/soc/arm/common/cortex_m/CMakeFiles/soc__arm__common__cortex_m.dir/arm_mpu_regions.c.obj
    [110/261] Building C object zephyr/soc/arm/nordic_nrf/nrf52/CMakeFiles/soc__arm__nordic_nrf__nrf52.dir/soc.c.obj
    [111/261] Building C object zephyr/drivers/clock_control/CMakeFiles/drivers__clock_control.dir/clock_control_nrf.c.obj
    [112/261] Building C object zephyr/drivers/clock_control/CMakeFiles/drivers__clock_control.dir/nrf_clock_calibration.c.obj
    [113/261] Building C object zephyr/drivers/console/CMakeFiles/drivers__console.dir/uart_console.c.obj
    [114/261] Building C object zephyr/drivers/gpio/CMakeFiles/drivers__gpio.dir/gpio_nrfx.c.obj
    [115/261] Building C object zephyr/drivers/sensor/nrf5/CMakeFiles/drivers__sensor__nrf5.dir/temp_nrf5.c.obj
    [116/261] Linking C static library zephyr/lib/libc/minimal/liblib__libc__minimal.a
    [117/261] Building C object zephyr/drivers/flash/CMakeFiles/drivers__flash.dir/soc_flash_nrf.c.obj
    [118/261] Linking C static library zephyr/lib/posix/liblib__posix.a
    [119/261] Linking C static library zephyr/soc/arm/common/cortex_m/libsoc__arm__common__cortex_m.a
    [120/261] Linking C static library zephyr/soc/arm/nordic_nrf/nrf52/libsoc__arm__nordic_nrf__nrf52.a
    [121/261] Building C object zephyr/drivers/flash/CMakeFiles/drivers__flash.dir/flash_page_layout.c.obj
    [122/261] Linking C static library zephyr/drivers/clock_control/libdrivers__clock_control.a
    [123/261] Linking C static library zephyr/drivers/console/libdrivers__console.a
    [124/261] Linking C static library zephyr/drivers/gpio/libdrivers__gpio.a
    [125/261] Linking C static library zephyr/drivers/sensor/nrf5/libdrivers__sensor__nrf5.a
    [126/261] Building C object zephyr/drivers/serial/CMakeFiles/drivers__serial.dir/uart_nrfx_uart.c.obj
    [127/261] Building C object zephyr/drivers/timer/CMakeFiles/drivers__timer.dir/sys_clock_init.c.obj
    [128/261] Building C object zephyr/drivers/timer/CMakeFiles/drivers__timer.dir/nrf_rtc_timer.c.obj
    [129/261] Building C object modules/nrf/lib/fprotect/CMakeFiles/..__nrf__lib__fprotect.dir/fprotect_acl.c.obj
    [130/261] Building C object modules/nrf/lib/fatal_error/CMakeFiles/..__nrf__lib__fatal_error.dir/fatal_error.c.obj
    [131/261] Building C object modules/mcuboot/boot/bootutil/zephyr/CMakeFiles/mcuboot_util.dir/home/wilfrid/Documents/nRF/ncs/bootloader/mcuboot/boot/bootutil/src/bootutil_public.c.obj
    [132/261] Building C object modules/hal_nordic/nrfx/CMakeFiles/modules__hal_nordic__nrfx.dir/home/wilfrid/Documents/nRF/ncs/modules/hal/nordic/nrfx/mdk/system_nrf52833.c.obj
    [133/261] Building C object modules/hal_nordic/nrfx/CMakeFiles/modules__hal_nordic__nrfx.dir/nrfx_glue.c.obj
    [134/261] Building C object modules/hal_nordic/nrfx/CMakeFiles/modules__hal_nordic__nrfx.dir/home/wilfrid/Documents/nRF/ncs/modules/hal/nordic/nrfx/drivers/src/nrfx_clock.c.obj
    [135/261] Building C object modules/hal_nordic/nrfx/CMakeFiles/modules__hal_nordic__nrfx.dir/home/wilfrid/Documents/nRF/ncs/modules/hal/nordic/nrfx/drivers/src/nrfx_gpiote.c.obj
    [136/261] Linking C static library zephyr/drivers/serial/libdrivers__serial.a
    [137/261] Linking C static library zephyr/drivers/timer/libdrivers__timer.a
    [138/261] Building C object modules/hal_nordic/nrfx/CMakeFiles/modules__hal_nordic__nrfx.dir/home/wilfrid/Documents/nRF/ncs/modules/hal/nordic/nrfx/drivers/src/nrfx_nvmc.c.obj
    [139/261] Linking C static library zephyr/drivers/flash/libdrivers__flash.a
    [140/261] Linking C static library modules/nrf/lib/fatal_error/lib..__nrf__lib__fatal_error.a
    [141/261] Building C object modules/hal_nordic/nrfx/CMakeFiles/modules__hal_nordic__nrfx.dir/home/wilfrid/Documents/nRF/ncs/modules/hal/nordic/nrfx/drivers/src/nrfx_wdt.c.obj
    [142/261] Building C object modules/mbedtls/CMakeFiles/modules__mbedtls.dir/home/wilfrid/Documents/nRF/ncs/modules/crypto/mbedtls/mbedtls/library/aesni.c.obj
    [143/261] Linking C static library modules/nrf/lib/fprotect/lib..__nrf__lib__fprotect.a
    [144/261] Linking C static library modules/mcuboot/boot/bootutil/zephyr/libmcuboot_util.a
    [145/261] Building C object modules/mbedtls/CMakeFiles/modules__mbedtls.dir/zephyr_init.c.obj
    [146/261] Building C object modules/mbedtls/CMakeFiles/modules__mbedtls.dir/home/wilfrid/Documents/nRF/ncs/modules/crypto/mbedtls/mbedtls/library/aes.c.obj
    [147/261] Building C object modules/mbedtls/CMakeFiles/modules__mbedtls.dir/home/wilfrid/Documents/nRF/ncs/modules/crypto/mbedtls/mbedtls/library/arc4.c.obj
    [148/261] Building C object modules/mbedtls/CMakeFiles/modules__mbedtls.dir/home/wilfrid/Documents/nRF/ncs/modules/crypto/mbedtls/mbedtls/library/aria.c.obj
    [149/261] Building C object modules/mbedtls/CMakeFiles/modules__mbedtls.dir/home/wilfrid/Documents/nRF/ncs/modules/crypto/mbedtls/mbedtls/library/asn1parse.c.obj
    [150/261] Building C object modules/mbedtls/CMakeFiles/modules__mbedtls.dir/home/wilfrid/Documents/nRF/ncs/modules/crypto/mbedtls/mbedtls/library/asn1write.c.obj
    [151/261] Building C object modules/mbedtls/CMakeFiles/modules__mbedtls.dir/home/wilfrid/Documents/nRF/ncs/modules/crypto/mbedtls/mbedtls/library/base64.c.obj
    [152/261] Building C object modules/mbedtls/CMakeFiles/modules__mbedtls.dir/home/wilfrid/Documents/nRF/ncs/modules/crypto/mbedtls/mbedtls/library/bignum.c.obj
    [153/261] Building C object modules/mbedtls/CMakeFiles/modules__mbedtls.dir/home/wilfrid/Documents/nRF/ncs/modules/crypto/mbedtls/mbedtls/library/blowfish.c.obj
    [154/261] Building C object modules/mbedtls/CMakeFiles/modules__mbedtls.dir/home/wilfrid/Documents/nRF/ncs/modules/crypto/mbedtls/mbedtls/library/camellia.c.obj
    [155/261] Building C object modules/mbedtls/CMakeFiles/modules__mbedtls.dir/home/wilfrid/Documents/nRF/ncs/modules/crypto/mbedtls/mbedtls/library/ccm.c.obj
    [156/261] Linking C static library modules/hal_nordic/nrfx/libmodules__hal_nordic__nrfx.a
    [157/261] Building C object modules/mbedtls/CMakeFiles/modules__mbedtls.dir/home/wilfrid/Documents/nRF/ncs/modules/crypto/mbedtls/mbedtls/library/certs.c.obj
    [158/261] Building C object modules/mbedtls/CMakeFiles/modules__mbedtls.dir/home/wilfrid/Documents/nRF/ncs/modules/crypto/mbedtls/mbedtls/library/chacha20.c.obj
    [159/261] Building C object modules/mbedtls/CMakeFiles/modules__mbedtls.dir/home/wilfrid/Documents/nRF/ncs/modules/crypto/mbedtls/mbedtls/library/chachapoly.c.obj
    [160/261] Building C object modules/mbedtls/CMakeFiles/modules__mbedtls.dir/home/wilfrid/Documents/nRF/ncs/modules/crypto/mbedtls/mbedtls/library/cipher.c.obj
    [161/261] Building C object modules/mbedtls/CMakeFiles/modules__mbedtls.dir/home/wilfrid/Documents/nRF/ncs/modules/crypto/mbedtls/mbedtls/library/cipher_wrap.c.obj
    [162/261] Building C object modules/mbedtls/CMakeFiles/modules__mbedtls.dir/home/wilfrid/Documents/nRF/ncs/modules/crypto/mbedtls/mbedtls/library/cmac.c.obj
    [163/261] Building C object modules/mbedtls/CMakeFiles/modules__mbedtls.dir/home/wilfrid/Documents/nRF/ncs/modules/crypto/mbedtls/mbedtls/library/ctr_drbg.c.obj
    [164/261] Building C object modules/mbedtls/CMakeFiles/modules__mbedtls.dir/home/wilfrid/Documents/nRF/ncs/modules/crypto/mbedtls/mbedtls/library/debug.c.obj
    [165/261] Building C object modules/mbedtls/CMakeFiles/modules__mbedtls.dir/home/wilfrid/Documents/nRF/ncs/modules/crypto/mbedtls/mbedtls/library/des.c.obj
    [166/261] Building C object modules/mbedtls/CMakeFiles/modules__mbedtls.dir/home/wilfrid/Documents/nRF/ncs/modules/crypto/mbedtls/mbedtls/library/dhm.c.obj
    [167/261] Building C object modules/mbedtls/CMakeFiles/modules__mbedtls.dir/home/wilfrid/Documents/nRF/ncs/modules/crypto/mbedtls/mbedtls/library/ecdh.c.obj
    [168/261] Building C object modules/mbedtls/CMakeFiles/modules__mbedtls.dir/home/wilfrid/Documents/nRF/ncs/modules/crypto/mbedtls/mbedtls/library/ecdsa.c.obj
    [169/261] Building C object modules/mbedtls/CMakeFiles/modules__mbedtls.dir/home/wilfrid/Documents/nRF/ncs/modules/crypto/mbedtls/mbedtls/library/ecjpake.c.obj
    [170/261] Building C object modules/mbedtls/CMakeFiles/modules__mbedtls.dir/home/wilfrid/Documents/nRF/ncs/modules/crypto/mbedtls/mbedtls/library/ecp.c.obj
    [171/261] Building C object modules/mbedtls/CMakeFiles/modules__mbedtls.dir/home/wilfrid/Documents/nRF/ncs/modules/crypto/mbedtls/mbedtls/library/ecp_curves.c.obj
    [172/261] Building C object modules/mbedtls/CMakeFiles/modules__mbedtls.dir/home/wilfrid/Documents/nRF/ncs/modules/crypto/mbedtls/mbedtls/library/entropy.c.obj
    [173/261] Building C object modules/mbedtls/CMakeFiles/modules__mbedtls.dir/home/wilfrid/Documents/nRF/ncs/modules/crypto/mbedtls/mbedtls/library/error.c.obj
    [174/261] Building C object modules/mbedtls/CMakeFiles/modules__mbedtls.dir/home/wilfrid/Documents/nRF/ncs/modules/crypto/mbedtls/mbedtls/library/entropy_poll.c.obj
    [175/261] Building C object modules/mbedtls/CMakeFiles/modules__mbedtls.dir/home/wilfrid/Documents/nRF/ncs/modules/crypto/mbedtls/mbedtls/library/gcm.c.obj
    [176/261] Building C object modules/mbedtls/CMakeFiles/modules__mbedtls.dir/home/wilfrid/Documents/nRF/ncs/modules/crypto/mbedtls/mbedtls/library/havege.c.obj
    [177/261] Building C object modules/mbedtls/CMakeFiles/modules__mbedtls.dir/home/wilfrid/Documents/nRF/ncs/modules/crypto/mbedtls/mbedtls/library/hkdf.c.obj
    [178/261] Building C object modules/mbedtls/CMakeFiles/modules__mbedtls.dir/home/wilfrid/Documents/nRF/ncs/modules/crypto/mbedtls/mbedtls/library/hmac_drbg.c.obj
    [179/261] Building C object modules/mbedtls/CMakeFiles/modules__mbedtls.dir/home/wilfrid/Documents/nRF/ncs/modules/crypto/mbedtls/mbedtls/library/md2.c.obj
    [180/261] Building C object modules/mbedtls/CMakeFiles/modules__mbedtls.dir/home/wilfrid/Documents/nRF/ncs/modules/crypto/mbedtls/mbedtls/library/md.c.obj
    [181/261] Building C object modules/mbedtls/CMakeFiles/modules__mbedtls.dir/home/wilfrid/Documents/nRF/ncs/modules/crypto/mbedtls/mbedtls/library/md4.c.obj
    [182/261] Building C object modules/mbedtls/CMakeFiles/modules__mbedtls.dir/home/wilfrid/Documents/nRF/ncs/modules/crypto/mbedtls/mbedtls/library/md5.c.obj
    [183/261] Building C object modules/mbedtls/CMakeFiles/modules__mbedtls.dir/home/wilfrid/Documents/nRF/ncs/modules/crypto/mbedtls/mbedtls/library/memory_buffer_alloc.c.obj
    [184/261] Building C object modules/mbedtls/CMakeFiles/modules__mbedtls.dir/home/wilfrid/Documents/nRF/ncs/modules/crypto/mbedtls/mbedtls/library/net_sockets.c.obj
    [185/261] Building C object modules/mbedtls/CMakeFiles/modules__mbedtls.dir/home/wilfrid/Documents/nRF/ncs/modules/crypto/mbedtls/mbedtls/library/nist_kw.c.obj
    [186/261] Building C object modules/mbedtls/CMakeFiles/modules__mbedtls.dir/home/wilfrid/Documents/nRF/ncs/modules/crypto/mbedtls/mbedtls/library/pem.c.obj
    [187/261] Building C object modules/mbedtls/CMakeFiles/modules__mbedtls.dir/home/wilfrid/Documents/nRF/ncs/modules/crypto/mbedtls/mbedtls/library/oid.c.obj
    [188/261] Building C object modules/mbedtls/CMakeFiles/modules__mbedtls.dir/home/wilfrid/Documents/nRF/ncs/modules/crypto/mbedtls/mbedtls/library/padlock.c.obj
    [189/261] Building C object modules/mbedtls/CMakeFiles/modules__mbedtls.dir/home/wilfrid/Documents/nRF/ncs/modules/crypto/mbedtls/mbedtls/library/pk.c.obj
    [190/261] Building C object modules/mbedtls/CMakeFiles/modules__mbedtls.dir/home/wilfrid/Documents/nRF/ncs/modules/crypto/mbedtls/mbedtls/library/pk_wrap.c.obj
    [191/261] Building C object modules/mbedtls/CMakeFiles/modules__mbedtls.dir/home/wilfrid/Documents/nRF/ncs/modules/crypto/mbedtls/mbedtls/library/pkcs11.c.obj
    [192/261] Building C object modules/mbedtls/CMakeFiles/modules__mbedtls.dir/home/wilfrid/Documents/nRF/ncs/modules/crypto/mbedtls/mbedtls/library/pkcs12.c.obj
    [193/261] Building C object modules/mbedtls/CMakeFiles/modules__mbedtls.dir/home/wilfrid/Documents/nRF/ncs/modules/crypto/mbedtls/mbedtls/library/pkcs5.c.obj
    [194/261] Building C object modules/mbedtls/CMakeFiles/modules__mbedtls.dir/home/wilfrid/Documents/nRF/ncs/modules/crypto/mbedtls/mbedtls/library/pkparse.c.obj
    [195/261] Building C object modules/mbedtls/CMakeFiles/modules__mbedtls.dir/home/wilfrid/Documents/nRF/ncs/modules/crypto/mbedtls/mbedtls/library/pkwrite.c.obj
    [196/261] Building C object modules/mbedtls/CMakeFiles/modules__mbedtls.dir/home/wilfrid/Documents/nRF/ncs/modules/crypto/mbedtls/mbedtls/library/platform.c.obj
    [197/261] Building C object modules/mbedtls/CMakeFiles/modules__mbedtls.dir/home/wilfrid/Documents/nRF/ncs/modules/crypto/mbedtls/mbedtls/library/platform_util.c.obj
    [198/261] Building C object modules/mbedtls/CMakeFiles/modules__mbedtls.dir/home/wilfrid/Documents/nRF/ncs/modules/crypto/mbedtls/mbedtls/library/poly1305.c.obj
    [199/261] Building C object modules/mbedtls/CMakeFiles/modules__mbedtls.dir/home/wilfrid/Documents/nRF/ncs/modules/crypto/mbedtls/mbedtls/library/psa_crypto.c.obj
    [200/261] Building C object modules/mbedtls/CMakeFiles/modules__mbedtls.dir/home/wilfrid/Documents/nRF/ncs/modules/crypto/mbedtls/mbedtls/library/psa_crypto_client.c.obj
    [201/261] Building C object modules/mbedtls/CMakeFiles/modules__mbedtls.dir/home/wilfrid/Documents/nRF/ncs/modules/crypto/mbedtls/mbedtls/library/psa_crypto_driver_wrappers.c.obj
    [202/261] Building C object modules/mbedtls/CMakeFiles/modules__mbedtls.dir/home/wilfrid/Documents/nRF/ncs/modules/crypto/mbedtls/mbedtls/library/psa_crypto_ecp.c.obj
    [203/261] Building C object modules/mbedtls/CMakeFiles/modules__mbedtls.dir/home/wilfrid/Documents/nRF/ncs/modules/crypto/mbedtls/mbedtls/library/psa_crypto_rsa.c.obj
    [204/261] Building C object modules/mbedtls/CMakeFiles/modules__mbedtls.dir/home/wilfrid/Documents/nRF/ncs/modules/crypto/mbedtls/mbedtls/library/psa_crypto_se.c.obj
    [205/261] Building C object modules/mbedtls/CMakeFiles/modules__mbedtls.dir/home/wilfrid/Documents/nRF/ncs/modules/crypto/mbedtls/mbedtls/library/psa_crypto_slot_management.c.obj
    [206/261] Building C object modules/mbedtls/CMakeFiles/modules__mbedtls.dir/home/wilfrid/Documents/nRF/ncs/modules/crypto/mbedtls/mbedtls/library/psa_crypto_storage.c.obj
    [207/261] Building C object modules/mbedtls/CMakeFiles/modules__mbedtls.dir/home/wilfrid/Documents/nRF/ncs/modules/crypto/mbedtls/mbedtls/library/psa_its_file.c.obj
    [208/261] Building C object modules/mbedtls/CMakeFiles/modules__mbedtls.dir/home/wilfrid/Documents/nRF/ncs/modules/crypto/mbedtls/mbedtls/library/ripemd160.c.obj
    [209/261] Building C object modules/mbedtls/CMakeFiles/modules__mbedtls.dir/home/wilfrid/Documents/nRF/ncs/modules/crypto/mbedtls/mbedtls/library/rsa.c.obj
    [210/261] Building C object modules/mbedtls/CMakeFiles/modules__mbedtls.dir/home/wilfrid/Documents/nRF/ncs/modules/crypto/mbedtls/mbedtls/library/rsa_internal.c.obj
    [211/261] Building C object modules/mbedtls/CMakeFiles/modules__mbedtls.dir/home/wilfrid/Documents/nRF/ncs/modules/crypto/mbedtls/mbedtls/library/sha1.c.obj
    [212/261] Building C object modules/mbedtls/CMakeFiles/modules__mbedtls.dir/home/wilfrid/Documents/nRF/ncs/modules/crypto/mbedtls/mbedtls/library/sha256.c.obj
    [213/261] Building C object modules/mbedtls/CMakeFiles/modules__mbedtls.dir/home/wilfrid/Documents/nRF/ncs/modules/crypto/mbedtls/mbedtls/library/sha512.c.obj
    [214/261] Building C object modules/mbedtls/CMakeFiles/modules__mbedtls.dir/home/wilfrid/Documents/nRF/ncs/modules/crypto/mbedtls/mbedtls/library/ssl_cache.c.obj
    [215/261] Building C object modules/mbedtls/CMakeFiles/modules__mbedtls.dir/home/wilfrid/Documents/nRF/ncs/modules/crypto/mbedtls/mbedtls/library/ssl_ciphersuites.c.obj
    [216/261] Building C object modules/mbedtls/CMakeFiles/modules__mbedtls.dir/home/wilfrid/Documents/nRF/ncs/modules/crypto/mbedtls/mbedtls/library/ssl_cli.c.obj
    [217/261] Building C object modules/mbedtls/CMakeFiles/modules__mbedtls.dir/home/wilfrid/Documents/nRF/ncs/modules/crypto/mbedtls/mbedtls/library/ssl_cookie.c.obj
    [218/261] Building C object modules/mbedtls/CMakeFiles/modules__mbedtls.dir/home/wilfrid/Documents/nRF/ncs/modules/crypto/mbedtls/mbedtls/library/ssl_msg.c.obj
    [219/261] Building C object modules/mbedtls/CMakeFiles/modules__mbedtls.dir/home/wilfrid/Documents/nRF/ncs/modules/crypto/mbedtls/mbedtls/library/ssl_srv.c.obj
    [220/261] Building C object modules/mbedtls/CMakeFiles/modules__mbedtls.dir/home/wilfrid/Documents/nRF/ncs/modules/crypto/mbedtls/mbedtls/library/ssl_ticket.c.obj
    [221/261] Building C object modules/mbedtls/CMakeFiles/modules__mbedtls.dir/home/wilfrid/Documents/nRF/ncs/modules/crypto/mbedtls/mbedtls/library/ssl_tls.c.obj
    [222/261] Building C object modules/mbedtls/CMakeFiles/modules__mbedtls.dir/home/wilfrid/Documents/nRF/ncs/modules/crypto/mbedtls/mbedtls/library/ssl_tls13_keys.c.obj
    [223/261] Building C object modules/mbedtls/CMakeFiles/modules__mbedtls.dir/home/wilfrid/Documents/nRF/ncs/modules/crypto/mbedtls/mbedtls/library/threading.c.obj
    [224/261] Building C object modules/mbedtls/CMakeFiles/modules__mbedtls.dir/home/wilfrid/Documents/nRF/ncs/modules/crypto/mbedtls/mbedtls/library/timing.c.obj
    [225/261] Building C object modules/mbedtls/CMakeFiles/modules__mbedtls.dir/home/wilfrid/Documents/nRF/ncs/modules/crypto/mbedtls/mbedtls/library/version.c.obj
    [226/261] Building C object modules/mbedtls/CMakeFiles/modules__mbedtls.dir/home/wilfrid/Documents/nRF/ncs/modules/crypto/mbedtls/mbedtls/library/version_features.c.obj
    [227/261] Building C object modules/mbedtls/CMakeFiles/modules__mbedtls.dir/home/wilfrid/Documents/nRF/ncs/modules/crypto/mbedtls/mbedtls/library/x509.c.obj
    [228/261] Building C object modules/mbedtls/CMakeFiles/modules__mbedtls.dir/home/wilfrid/Documents/nRF/ncs/modules/crypto/mbedtls/mbedtls/library/x509_create.c.obj
    [229/261] Building C object modules/mbedtls/CMakeFiles/modules__mbedtls.dir/home/wilfrid/Documents/nRF/ncs/modules/crypto/mbedtls/mbedtls/library/x509_crl.c.obj
    [230/261] Building C object modules/mbedtls/CMakeFiles/modules__mbedtls.dir/home/wilfrid/Documents/nRF/ncs/modules/crypto/mbedtls/mbedtls/library/x509_crt.c.obj
    [231/261] Building C object modules/mbedtls/CMakeFiles/modules__mbedtls.dir/home/wilfrid/Documents/nRF/ncs/modules/crypto/mbedtls/mbedtls/library/x509_csr.c.obj
    [232/261] Building C object modules/mbedtls/CMakeFiles/modules__mbedtls.dir/home/wilfrid/Documents/nRF/ncs/modules/crypto/mbedtls/mbedtls/library/x509write_crt.c.obj
    [233/261] Building C object modules/mbedtls/CMakeFiles/modules__mbedtls.dir/home/wilfrid/Documents/nRF/ncs/modules/crypto/mbedtls/mbedtls/library/x509write_csr.c.obj
    [234/261] Building C object modules/mbedtls/CMakeFiles/modules__mbedtls.dir/home/wilfrid/Documents/nRF/ncs/modules/crypto/mbedtls/mbedtls/library/xtea.c.obj
    [235/261] Building C object modules/segger/CMakeFiles/modules__segger.dir/home/wilfrid/Documents/nRF/ncs/modules/debug/segger/SEGGER/SEGGER_RTT.c.obj
    [236/261] Building C object modules/segger/CMakeFiles/modules__segger.dir/SEGGER_RTT_zephyr.c.obj
    [237/261] Building C object zephyr/kernel/CMakeFiles/kernel.dir/main_weak.c.obj
    [238/261] Building C object zephyr/kernel/CMakeFiles/kernel.dir/banner.c.obj
    [239/261] Building C object zephyr/kernel/CMakeFiles/kernel.dir/device.c.obj
    [240/261] Building C object zephyr/kernel/CMakeFiles/kernel.dir/errno.c.obj
    [241/261] Building C object zephyr/kernel/CMakeFiles/kernel.dir/fatal.c.obj
    [242/261] Building C object zephyr/kernel/CMakeFiles/kernel.dir/init.c.obj
    [243/261] Building C object zephyr/kernel/CMakeFiles/kernel.dir/kheap.c.obj
    [244/261] Building C object zephyr/kernel/CMakeFiles/kernel.dir/mem_slab.c.obj
    [245/261] Linking C static library modules/segger/libmodules__segger.a
    [246/261] Building C object zephyr/kernel/CMakeFiles/kernel.dir/thread.c.obj
    [247/261] Building C object zephyr/kernel/CMakeFiles/kernel.dir/version.c.obj
    [248/261] Building C object zephyr/kernel/CMakeFiles/kernel.dir/xip.c.obj
    [249/261] Linking C static library modules/mbedtls/libmodules__mbedtls.a
    [250/261] Building C object zephyr/kernel/CMakeFiles/kernel.dir/timer.c.obj
    [251/261] Building C object zephyr/kernel/CMakeFiles/kernel.dir/mempool.c.obj
    [252/261] Building C object zephyr/kernel/CMakeFiles/kernel.dir/timeout.c.obj
    [253/261] Linking C static library zephyr/kernel/libkernel.a
    [254/261] Linking C executable zephyr/zephyr_prebuilt.elf
    FAILED: zephyr/zephyr_prebuilt.elf zephyr/zephyr_prebuilt.map 
    : && ccache /opt/gnuarmemb/bin/arm-none-eabi-gcc   zephyr/CMakeFiles/zephyr_prebuilt.dir/misc/empty_file.c.obj -o zephyr/zephyr_prebuilt.elf  -fuse-ld=bfd  -Wl,-T  zephyr/linker_zephyr_prebuilt.cmd  -Wl,-Map=/home/wilfrid/Documents/nrf_projects/peripheral_lbs/build_1/mcuboot/zephyr/zephyr_prebuilt.map  -Wl,--whole-archive  app/libapp.a  zephyr/libzephyr.a  zephyr/arch/common/libarch__common.a  zephyr/arch/arch/arm/core/aarch32/libarch__arm__core__aarch32.a  zephyr/arch/arch/arm/core/aarch32/cortex_m/libarch__arm__core__aarch32__cortex_m.a  zephyr/arch/arch/arm/core/aarch32/mpu/libarch__arm__core__aarch32__mpu.a  zephyr/lib/libc/minimal/liblib__libc__minimal.a  zephyr/lib/posix/liblib__posix.a  zephyr/soc/arm/common/cortex_m/libsoc__arm__common__cortex_m.a  zephyr/soc/arm/nordic_nrf/nrf52/libsoc__arm__nordic_nrf__nrf52.a  zephyr/drivers/clock_control/libdrivers__clock_control.a  zephyr/drivers/console/libdrivers__console.a  zephyr/drivers/gpio/libdrivers__gpio.a  zephyr/drivers/sensor/nrf5/libdrivers__sensor__nrf5.a  zephyr/drivers/flash/libdrivers__flash.a  zephyr/drivers/serial/libdrivers__serial.a  zephyr/drivers/timer/libdrivers__timer.a  modules/nrf/lib/fprotect/lib..__nrf__lib__fprotect.a  modules/nrf/lib/fatal_error/lib..__nrf__lib__fatal_error.a  modules/mcuboot/boot/bootutil/zephyr/libmcuboot_util.a  modules/hal_nordic/nrfx/libmodules__hal_nordic__nrfx.a  modules/mbedtls/libmodules__mbedtls.a  modules/segger/libmodules__segger.a  -Wl,--no-whole-archive  zephyr/kernel/libkernel.a  zephyr/CMakeFiles/offsets.dir/./arch/arm/core/offsets/offsets.c.obj  -L"/opt/gnuarmemb/bin/../lib/gcc/arm-none-eabi/9.2.1/thumb/v7e-m/nofp"  -L/home/wilfrid/Documents/nrf_projects/peripheral_lbs/build_1/mcuboot/zephyr  -lgcc  zephyr/arch/common/libisr_tables.a  -mcpu=cortex-m4  -mthumb  -mabi=aapcs  -mfp16-format=ieee  -Wl,--gc-sections  -Wl,--build-id=none  -Wl,--sort-common=descending  -Wl,--sort-section=alignment  -Wl,-u,_OffsetAbsSyms  -Wl,-u,_ConfigAbsSyms  -nostdlib  -static  -no-pie  -Wl,-X  -Wl,-N  -Wl,--orphan-handling=warn && cd /home/wilfrid/Documents/nrf_projects/peripheral_lbs/build_1/mcuboot/zephyr && /home/wilfrid/cmake/cmake-3.20.5-linux-x86_64/bin/cmake -E echo
    /opt/gnuarmemb/bin/../lib/gcc/arm-none-eabi/9.2.1/../../../../arm-none-eabi/bin/ld.bfd: zephyr/drivers/sensor/nrf5/libdrivers__sensor__nrf5.a(temp_nrf5.c.obj): in function `k_sem_give':
    /home/wilfrid/Documents/nrf_projects/peripheral_lbs/build_1/mcuboot/zephyr/include/generated/syscalls/kernel.h:953: undefined reference to `z_impl_k_sem_give'
    /opt/gnuarmemb/bin/../lib/gcc/arm-none-eabi/9.2.1/../../../../arm-none-eabi/bin/ld.bfd: zephyr/drivers/sensor/nrf5/libdrivers__sensor__nrf5.a(temp_nrf5.c.obj): in function `k_sem_init':
    /home/wilfrid/Documents/nrf_projects/peripheral_lbs/build_1/mcuboot/zephyr/include/generated/syscalls/kernel.h:918: undefined reference to `z_impl_k_sem_init'
    /opt/gnuarmemb/bin/../lib/gcc/arm-none-eabi/9.2.1/../../../../arm-none-eabi/bin/ld.bfd: zephyr/drivers/sensor/nrf5/libdrivers__sensor__nrf5.a(temp_nrf5.c.obj): in function `k_mutex_init':
    /home/wilfrid/Documents/nrf_projects/peripheral_lbs/build_1/mcuboot/zephyr/include/generated/syscalls/kernel.h:802: undefined reference to `z_impl_k_mutex_init'
    /opt/gnuarmemb/bin/../lib/gcc/arm-none-eabi/9.2.1/../../../../arm-none-eabi/bin/ld.bfd: zephyr/drivers/sensor/nrf5/libdrivers__sensor__nrf5.a(temp_nrf5.c.obj): in function `k_mutex_lock':
    /home/wilfrid/Documents/nrf_projects/peripheral_lbs/build_1/mcuboot/zephyr/include/generated/syscalls/kernel.h:820: undefined reference to `z_impl_k_mutex_lock'
    /opt/gnuarmemb/bin/../lib/gcc/arm-none-eabi/9.2.1/../../../../arm-none-eabi/bin/ld.bfd: zephyr/drivers/sensor/nrf5/libdrivers__sensor__nrf5.a(temp_nrf5.c.obj): in function `k_sem_take':
    /home/wilfrid/Documents/nrf_projects/peripheral_lbs/build_1/mcuboot/zephyr/include/generated/syscalls/kernel.h:936: undefined reference to `z_impl_k_sem_take'
    /opt/gnuarmemb/bin/../lib/gcc/arm-none-eabi/9.2.1/../../../../arm-none-eabi/bin/ld.bfd: zephyr/drivers/sensor/nrf5/libdrivers__sensor__nrf5.a(temp_nrf5.c.obj): in function `k_mutex_unlock':
    /home/wilfrid/Documents/nrf_projects/peripheral_lbs/build_1/mcuboot/zephyr/include/generated/syscalls/kernel.h:836: undefined reference to `z_impl_k_mutex_unlock'
    collect2: error: ld returned 1 exit status
    ninja: build stopped: subcommand failed.
    [243/262] Linking C static library zephyr/kernel/libkernel.a
    FAILED: modules/mcuboot/mcuboot_subimage-prefix/src/mcuboot_subimage-stamp/mcuboot_subimage-build mcuboot/zephyr/zephyr.hex mcuboot/zephyr/zephyr.elf 
    cd /home/wilfrid/Documents/nrf_projects/peripheral_lbs/build_1/mcuboot && /home/wilfrid/cmake/cmake-3.20.5-linux-x86_64/bin/cmake --build . --
    [245/262] Linking C executable zephyr/zephyr_prebuilt.elf
    
    ninja: build stopped: subcommand failed.
    FATAL ERROR: command exited with status 1: /home/wilfrid/cmake/cmake-3.20.5-linux-x86_64/bin/cmake --build /home/wilfrid/Documents/nrf_projects/peripheral_lbs/build_1
    The terminal process terminated with exit code: 1.
    
    Terminal will be reused by tasks, press any key to close it.


    I noticed the project builds fine without "CONFIG_BOOTLOADER_MCUBOOT=y" configured in prj.conf. Please let me know what I can try.

    Thanks,

    Wilfrid

  • helped me with this issue. It looks like adding the following to CMake arguments before building an application project helped me get around the linking issue for when CONFIG_BOOTLOADER_MCUBOOT is enabled in the prj.conf on the BL653_DVK board (nrf52833 SoC):

    -Dmcuboot_CONFIG_CLOCK_CONTROL_NRF_CALIBRATION_MAX_SKIP=0


Comment Children
No Data