I'm running into issues when specifying non-secure for the build target, even for the basic Blinky sample. I created a build configuration with the nRF Connect SDK v3.4.0 and nRF Connect SDK Toolchain v3.4.0. The board target I'm trying to use is nrf7002dk/nrf5340/cpuapp/ns. I've left all the other options blank/default. I don't see any issues in the build output or flashing step that would indicate that the sample app would fail. Instead of a blinking LED, I only see the status LED lit up next to the IMCU.
Notably, flashing the exact same application as a secure app (nrf7002dk/nrf5340/cpuapp) works perfectly fine on this board, and I'm able to see the LED blink.
VS Code and the related SDKs and utilities are installed in a Ubuntu 22.04 distrobox while the host OS is Fedora Silverblue. I've also tested in a devcontainer with the same build configuration, toolchain, and SDK and ran into the same issue with non-secure apps.
Build output:
* Executing task: nRF Connect: Build configuration blinky/build for nrf7002dk/nrf5340/cpuapp/ns
Building blinky
west build --build-dir /var/home/cameronshaw/code/test-nrf/blinky/build /var/home/cameronshaw/code/test-nrf/blinky --pristine --board nrf7002dk/nrf5340/cpuapp/ns -- -DCONFIG_DEBUG_OPTIMIZATIONS=y -DCONFIG_DEBUG_THREAD_INFO=y
-- west build: generating a build system
Loading Zephyr module(s) (Zephyr base): sysbuild_default
-- Found Python3: /var/home/cameronshaw/ncs/toolchains/fbf7391cab/usr/local/bin/python3.12 (found suitable version "3.12.4", minimum required is "3.12") found components: Interpreter
-- Cache files will be written to: /var/home/cameronshaw/.cache/zephyr
-- Found west (found suitable version "1.5.0", minimum required is "0.14.0")
-- Board: nrf7002dk, qualifiers: nrf5340/cpuapp/ns
Parsing /var/home/cameronshaw/ncs/v3.4.0/zephyr/share/sysbuild/Kconfig
Loaded configuration '/var/home/cameronshaw/code/test-nrf/blinky/build/_sysbuild/empty.conf'
Merged configuration '/var/home/cameronshaw/code/test-nrf/blinky/build/_sysbuild/empty.conf'
Configuration saved to '/var/home/cameronshaw/code/test-nrf/blinky/build/zephyr/.config'
Kconfig header saved to '/var/home/cameronshaw/code/test-nrf/blinky/build/_sysbuild/autoconf.h'
--
****************************
* Running CMake for blinky *
****************************
Loading Zephyr default modules (Zephyr base).
-- Application: /var/home/cameronshaw/code/test-nrf/blinky
-- CMake version: 4.2.1
-- Found Python3: /var/home/cameronshaw/ncs/toolchains/fbf7391cab/usr/local/bin/python3.12 (found suitable version "3.12.4", minimum required is "3.12") found components: Interpreter
-- Cache files will be written to: /var/home/cameronshaw/.cache/zephyr
-- Zephyr version: 4.4.0 (/var/home/cameronshaw/ncs/v3.4.0/zephyr)
-- Found west (found suitable version "1.5.0", minimum required is "0.14.0")
-- Board: nrf7002dk, qualifiers: nrf5340/cpuapp/ns
-- Found host-tools: zephyr 1.0.1 (/var/home/cameronshaw/ncs/toolchains/fbf7391cab/opt/zephyr-sdk)
-- Found toolchain: zephyr 1.0.1 (/var/home/cameronshaw/ncs/toolchains/fbf7391cab/opt/zephyr-sdk)
-- Found Dtc: /var/home/cameronshaw/ncs/toolchains/fbf7391cab/usr/bin/dtc (found suitable version "1.5.0", minimum required is "1.4.6")
-- Found BOARD.dts: /var/home/cameronshaw/ncs/v3.4.0/zephyr/boards/nordic/nrf7002dk/nrf7002dk_nrf5340_cpuapp_ns.dts
-- Generated zephyr.dts: /var/home/cameronshaw/code/test-nrf/blinky/build/blinky/zephyr/zephyr.dts
-- Generated pickled edt: /var/home/cameronshaw/code/test-nrf/blinky/build/blinky/zephyr/edt.pickle
-- Generated devicetree_generated.h: /var/home/cameronshaw/code/test-nrf/blinky/build/blinky/zephyr/include/generated/zephyr/devicetree_generated.h
warning: Experimental symbol TFM_EXPERIMENTAL is enabled.
Parsing /var/home/cameronshaw/ncs/v3.4.0/zephyr/Kconfig
Loaded configuration '/var/home/cameronshaw/ncs/v3.4.0/zephyr/boards/nordic/nrf7002dk/nrf7002dk_nrf5340_cpuapp_ns_defconfig'
Merged configuration '/var/home/cameronshaw/code/test-nrf/blinky/prj.conf'
Merged configuration '/var/home/cameronshaw/code/test-nrf/blinky/build/blinky/zephyr/misc/generated/extra_kconfig_options.conf'
Merged configuration '/var/home/cameronshaw/code/test-nrf/blinky/build/blinky/zephyr/.config.sysbuild'
Configuration saved to '/var/home/cameronshaw/code/test-nrf/blinky/build/blinky/zephyr/.config'
Kconfig header saved to '/var/home/cameronshaw/code/test-nrf/blinky/build/blinky/zephyr/include/generated/zephyr/autoconf.h'
-- Found GnuLd: /var/home/cameronshaw/ncs/toolchains/fbf7391cab/opt/zephyr-sdk/gnu/arm-zephyr-eabi/arm-zephyr-eabi/bin/ld.bfd (found version "2.43.1")
-- The C compiler identification is GNU 14.3.0
-- The CXX compiler identification is GNU 14.3.0
-- The ASM compiler identification is GNU
-- Found assembler: /var/home/cameronshaw/ncs/toolchains/fbf7391cab/opt/zephyr-sdk/gnu/arm-zephyr-eabi/bin/arm-zephyr-eabi-gcc
-- Found Python3: /var/home/cameronshaw/ncs/toolchains/fbf7391cab/usr/local/bin/python3.12 (found version "3.12.4") found components: Interpreter
-- Could NOT find Threads (missing: Threads_FOUND)
-- Performing Test C_COMPILER_SUPPORTS_WFORMAT_SIGNEDNESS
-- Performing Test C_COMPILER_SUPPORTS_WFORMAT_SIGNEDNESS - Success
-- Using ccache: /var/home/cameronshaw/ncs/toolchains/fbf7391cab/usr/bin/ccache
-- Found gen_kobject_list: /var/home/cameronshaw/ncs/v3.4.0/zephyr/scripts/build/gen_kobject_list.py
-- Configuring done (6.4s)
-- Generating done (0.3s)
-- Build files have been written to: /var/home/cameronshaw/code/test-nrf/blinky/build/blinky
-- Configuring done (9.4s)
-- Generating done (0.0s)
-- Build files have been written to: /var/home/cameronshaw/code/test-nrf/blinky/build
-- west build: building application
[1/263] Preparing syscall dependency handling
[5/263] Generating include/generated/zephyr/version.h
-- Zephyr version: 4.4.0 (/var/home/cameronshaw/ncs/v3.4.0/zephyr), build: ncs-v3.4.0
[7/263] Generating ../../tfm/CMakeCache.txt
-- Found Git: /var/home/cameronshaw/ncs/toolchains/fbf7391cab/usr/local/bin/git (found version "2.52.0")
-- The C compiler identification is GNU 14.3.0
-- The CXX compiler identification is GNU 14.3.0
-- The ASM compiler identification is GNU
-- Found assembler: /var/home/cameronshaw/ncs/toolchains/fbf7391cab/opt/zephyr-sdk/gnu/arm-zephyr-eabi/bin/arm-zephyr-eabi-gcc
-- Found Python3: /var/home/cameronshaw/ncs/toolchains/fbf7391cab/usr/local/bin/python3.12 (found version "3.12.4") found components: Interpreter
-- Found Python3: /var/home/cameronshaw/ncs/toolchains/fbf7391cab/usr/local/bin/python3.12 (found suitable version "3.12.4", minimum required is "3.12") found components: Interpreter
-- Cache files will be written to: /var/home/cameronshaw/.cache/zephyr
-- Found Python3: /var/home/cameronshaw/ncs/toolchains/fbf7391cab/usr/local/bin/python3.12 (found version "3.12.4") found components: Interpreter
CMake Warning (dev) at /var/home/cameronshaw/ncs/v3.4.0/nrf/modules/trusted-firmware-m/tfm_boards/nrf5340_cpuapp/CMakeLists.txt:21 (install):
Policy CMP0177 is not set: install() DESTINATION paths are normalized. Run
"cmake --help-policy CMP0177" for policy details. Use the cmake_policy
command to set the policy and suppress this warning.
This warning is for project developers. Use -Wno-dev to suppress it.
-- Configuring done (0.7s)
-- Generating done (0.1s)
CMake Warning:
Manually-specified variables were not used by the project:
QCBOR_PATH
TFM_CREATE_SIGNING_LAYOUT_OBJECTS
T_COSE_PATH
-- Build files have been written to: /var/home/cameronshaw/code/test-nrf/blinky/build/blinky/tfm
[193/195] Linking C executable bin/tfm_s.axf
Memory region Used Size Region Size %age Used
FLASH: 130540 B 256 KB 49.80%
RAM: 50088 B 256 KB 19.11%
[19/263] Performing install step for 'tfm'
-- Install configuration: "Debug"
----- Installing platform NS -----
[263/263] Linking C executable zephyr/zephyr.elf
Memory region Used Size Region Size %age Used
FLASH: 31276 B 192 KB 15.91%
RAM: 4776 B 192 KB 2.43%
IDT_LIST: 0 B 32 KB 0.00%
Generating files from /var/home/cameronshaw/code/test-nrf/blinky/build/blinky/zephyr/zephyr.elf for board: nrf7002dk/nrf5340/cpuapp/ns
[8/8] Completed 'blinky'
Flash output:
* Executing task: nRF Connect: Flash: blinky/build
Flashing build to nRF7002 DK
west flash -d /var/home/cameronshaw/code/test-nrf/blinky/build --dev-id 001050700558
-- west flash: rebuilding
[0/3] Performing build step for 'blinky'
[0/16] Performing build step for 'tfm'
ninja: no work to do.
[2/3] Performing install step for 'tfm'
-- Install configuration: "Debug"
----- Installing platform NS -----
[3/3] Completed 'tfm'
[2/3] No install step for 'blinky'
[3/3] Completed 'blinky'
-- west flash: using runner nrfutil
-- runners.nrfutil: reset after flashing requested
-- runners.nrfutil: Flashing file: /var/home/cameronshaw/code/test-nrf/blinky/build/blinky/zephyr/tfm_merged.hex
-- runners.nrfutil: Connecting to probe
-- runners.nrfutil: Erasing address ranges touched by firmware
-- runners.nrfutil: Programming image
-- runners.nrfutil: Verifying image
-- runners.nrfutil: Reset
-- runners.nrfutil: Board(s) with serial number(s) 1050700558 flashed successfully.
* Terminal will be reused by tasks, press any key to close it.