Custom boards - BOARD_ROOT contains two paths


Hi,


I have a question about creating a custom board. I am following the tutorial here: youtube


I am trying to make a custom board for nRF54L15 using the board wizard (GUI) in VSCode. Then I used the Visual Editor to add some LEDs, a button, and a PWM.
I saved my board in C:\nRF_Ropixon_Boards\boards.

After that, I created a new build configuration in my existing project (originally for nRF52811) with my custom board.
But now I am stuck. Even the command with --cmake-only does not work and I get an error.
Is there any good step-by-step tutorial for this process?

In the generated CMakeCache.txt, I see this line:

//Sysbuild adjusted BOARD_ROOT
BOARD_ROOT:PATH=C:/Work/99_Witc/ZG_Repo/ZoneGuard;C:/nRF_Ropixon_Boards

Why are there two paths in BOARD_ROOT? The first path is my current project, not a board directory.
Is this correct or is it a mistake?
Any ideas how to fix this?

I added path to my custom board - hope correctly:


I set board like that:

Errors:

Building ZoneGuard
C:\WINDOWS\system32\cmd.exe /d /s /c "west build --build-dir .../build ... --pristine --board ... -- -DDTC_OVERLAY_FILE=..._overlay -DBOARD_ROOT=...;..."

-- west build: generating a build system
Loading Zephyr module(s) (Zephyr base): sysbuild_default
-- Found Python3: .../python.exe (found suitable version "3.12.4", minimum required is "3.10") found components: Interpreter
-- Cache files will be written to: .../.cache
-- Found west (found suitable version "1.2.0", minimum required is "0.14.0")
CMake Warning at .../zephyr/cmake/modules/boards.cmake:136 (message):
BOARD_ROOT element without a 'boards' subdirectory:

.../ZoneGuard

Hints:

- if your board directory is '/foo/bar/boards/my_board' then add '/foo/bar' to BOARD_ROOT, not the entire board directory
- if in doubt, use absolute paths
Call Stack (most recent call first):
.../cmake/modules/sysbuild_default.cmake:15 (include)
.../zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:75 (include)
.../zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:92 (include_boilerplate)
.../zephyr/share/sysbuild-package/cmake/SysbuildConfig.cmake:8 (include)
template/CMakeLists.txt:10 (find_package)


-- Board: ..., qualifiers: ...
Parsing .../Kconfig
Loaded configuration '.../empty.conf'
Merged configuration '.../empty.conf'
Configuration saved to '.../.config'
Kconfig header saved to '.../autoconf.h'
--
*******************************
* Running CMake for ZoneGuard *
*******************************

Loading Zephyr default modules (Zephyr base).
-- Application: ...
-- CMake version: 3.21.0
-- Found Python3: .../python.exe (found suitable version "3.12.4", minimum required is "3.10") found components: Interpreter
-- Cache files will be written to: .../.cache
-- Zephyr version: 4.0.99 (...)
-- Found west (found suitable version "1.2.0", minimum required is "0.14.0")
CMake Warning at .../zephyr/cmake/modules/boards.cmake:136 (message):
BOARD_ROOT element without a 'boards' subdirectory:

.../ZoneGuard

Hints:

- if your board directory is '/foo/bar/boards/my_board' then add '/foo/bar' to BOARD_ROOT, not the entire board directory
- if in doubt, use absolute paths
Call Stack (most recent call first):
.../zephyr/cmake/modules/zephyr_default.cmake:133 (include)
.../zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:66 (include)
.../zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:92 (include_boilerplate)
CMakeLists.txt:4 (find_package)


-- Board: ..., qualifiers: ...
-- Found host-tools: zephyr 0.17.0 (...)
-- Found toolchain: zephyr 0.17.0 (...)
-- Found Dtc: .../dtc.exe (found suitable version "1.4.7", minimum required is "1.4.6")
-- Found BOARD.dts: .../ZoneGuard_HW_v2_0_nrf54l15_cpuapp.dts
-- Found devicetree overlay: ..._cpuapp.overlay
devicetree error: missing data after phandle in <Property 'pwms' at '/pwm_ctrl/beep' in '.../empty_file.c'>
CMake Error at .../zephyr/cmake/modules/dts.cmake:305 (execute_process):
execute_process failed command indexes:

1: "Child return code: 1"

Call Stack (most recent call first):
.../zephyr/cmake/modules/zephyr_default.cmake:133 (include)
.../zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:66 (include)
.../zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:92 (include_boilerplate)
CMakeLists.txt:4 (find_package)


-- Configuring incomplete, errors occurred!
CMake Error at .../cmake/modules/sysbuild_extensions.cmake:514 (message):
CMake configure failed for Zephyr project: ZoneGuard

Location: ...
Call Stack (most recent call first):
.../cmake/modules/sysbuild_images.cmake:43 (ExternalZephyrProject_Cmake)
.../cmake/modules/sysbuild_default.cmake:21 (include)
.../zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:75 (include)
.../zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:92 (include_boilerplate)
.../zephyr/share/sysbuild-package/cmake/SysbuildConfig.cmake:8 (include)
template/CMakeLists.txt:10 (find_package)


-- Configuring incomplete, errors occurred!
See also ".../build/CMakeFiles/CMakeOutput.log".
FATAL ERROR: command exited with status 1: '.../cmake.EXE' -DWEST_PYTHON=.../python.exe '-B...' -GNinja -DBOARD=... -DDTC_OVERLAY_FILE=..._overlay '-DBOARD_ROOT=...;...' '-S...' '-DAPP_DIR:PATH=...'

* The terminal process terminated with exit code: 1.
* Terminal will be reused by tasks, press any key to close it.



Thanks for any advice. Jan,

Related