I'm using the nRF Connect SDK v2.5.1
I copied the the sample "nrf/samples/bluetooth/peripheral_lbs" from the 2.5.1 SDK and created a build configuration using the board "nrf5340dk_nrf5340_cpuapp_ns" and no other changes to the build configuration.
I did a pristine build and flashed it to a nRF5340-DK board (PCA10095 2.0.1) and it responds as expected
*** Booting nRF Connect SDK v2.5.1 *** Starting Bluetooth Peripheral LBS example I: 2 Sectors of 4096 bytes I: alloc wra: 0, fd0 I: data wra: 0, 1c I: HW Platform: Nordic Semiconductor (0x0002) I: HW Variant: nRF53x (0x0003) I: Firmware: Standard Bluetooth controller (0x00) Version 197.47763 Build 2370639017 I: No ID address. App must call settings_load() Bluetooth initialized I: Identity: E0:F4:2C:C1:70:D4 (random) I: HCI: version 5.4 (0x0d) revision 0x2102, manufacturer 0x0059 I: LMP: version 5.4 (0x0d) subver 0x2102 Advertising successfully started
I can connect to the board, read the button and turn on and off the LED.
I then started to follow the instructions from https://developer.nordicsemi.com/nRF_Connect_SDK/doc/2.5.1/nrf/config_and_build/bootloaders_and_dfu/bootloader_adding.html (which appear to be the same as https://docs.nordicsemi.com/bundle/ncs-latest/page/nrf/config_and_build/bootloaders/bootloader_adding.html
The only change I made was to the prj.conf file added one line:
CONFIG_SECURE_BOOT=y
and then I perform a pristine build. When I flash this build I get:
*** Booting nRF Connect SDK v2.5.1 *** Attempting to boot slot 0. No fw_info struct found. Attempting to boot slot 1. No fw_info struct found. No bootable image found. Aborting boot.
If I redo all of the above but change the board to nrf5340dk_nrf5340_cpuapp when I flash I get:
*** Booting nRF Connect SDK v2.5.1 *** Attempting to boot slot 0. Attempting to boot from address 0x8000. Verifying signature against key 0. Hash: 0xfc...73 Firmware signature verified. Firmware version 1 Setting monotonic counter (version: 1, slot: 0) *** Booting nRF Connect SDK v2.5.1 *** Starting Bluetooth Peripheral LBS example I: 2 Sectors of 4096 bytes I: alloc wra: 0, fe8 I: data wra: 0, 0 I: HW Platform: Nordic Semiconductor (0x0002) I: HW Variant: nRF53x (0x0003) I: Firmware: Standard Bluetooth controller (0x00) Version 197.47763 Build 2370639017 I: No ID address. App must call settings_load() Bluetooth initialized I: Identity: E0:F4:2C:C1:70:D4 (random) I: HCI: version 5.4 (0x0d) revision 0x2102, manufacturer 0x0059 I: LMP: version 5.4 (0x0d) subver 0x2102 Advertising successfully started
And I can connect and the application works.
So does the nRF Secure Immutable Bootloader not work with the TFM code and the ARM trustzone?
Thanks!