nrf5340 custom board build issue: ninja.build not found

Hello everyone,

i am developing code (VS Code, Toolchain/SDK: 2.3.0)  for a custom board based on nrf5340. I have been able to build a simple hello_world + Serial DFU example based on this guide that i found on DevZone faking my custom board as a nrf5340DK. When i say "faking my board" i mean that i successfully built the code for nrf5340DK and flashed it to my CUSTOM BOARD (Segger J-Link connected to my custom board through SWD programming port). Now that i'm sure that my board can be programmed correctly, i'm trying to create my specific board in the "boards" folder. To get started, i used the VS code menu "Create a new board" and followed the procedure. The procedure created the correct folder with the needed files inside (my_board.dts, *defconfig, etc.). Unfortunately, when i tried to build the code for this board, the process fails with an error regarding missing info about sram0_shared. Analyzing the content of the nrf5340dk boards folder i found and added the following code to my_board.dts file:

reserved-memory {
		#address-cells = <1>;
		#size-cells = <1>;
		ranges;

		sram0_shared: memory@20070000 {
			/* SRAM allocated to shared memory */
			reg = <0x20070000 0x10000>;
		};
	};

After this i have been able to solve the sram0_shared issue. Unfortunately, this didn't happen to be enough to compile successfully. Now i'm stuck getting this error:

No fprotect backend selected

I tried looking again into "nrf5340dk" board directory, but i didn't find anything that gave me an hint.

I'm suspicious about my kconfig settings. Changing them a bit sometimes changes the error. Here you go the "my_board_defconfig":

# Copyright (c) 2023 Nordic Semiconductor ASA
# SPDX-License-Identifier: Apache-2.0

CONFIG_SOC_SERIES_NRF53X=y
CONFIG_SOC_NRF5340_CPUAPP_QKAA=y
CONFIG_BOARD_MY_BOARD=y

# Enable MPU
CONFIG_ARM_MPU=y

# Enable hardware stack protection
CONFIG_HW_STACK_PROTECTION=y

# Enable TrustZone-M
CONFIG_ARM_TRUSTZONE_M=y

# Enable console
CONFIG_CONSOLE=y

And my proj.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

# 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

Any idea?

Thank you for your time

Edit: typos and more info about my Kconfig settings

Parents Reply Children
No Data
Related