zephyrproject-rtos / zephyr

Primary Git Repository for the Zephyr Project. Zephyr is a new generation, scalable, optimized, secure RTOS for multiple hardware architectures.
https://docs.zephyrproject.org
Apache License 2.0
10.78k stars 6.58k forks source link

unable to build my custom board #80602

Open akifejaz opened 2 hours ago

akifejaz commented 2 hours ago

Describe the bug

I've followed steps board_porting to add new board as vp but while build it says Error finding board: vp

Please also mention any information which could help others to understand the problem you're facing:

To Reproduce

Steps to reproduce the behavior:

  1. add new board at boards/riscv/vp with below directory structure. image

  2. Files content:

CmakeLists.txt

Kconfig

config BOARD_VP_RISCV64
    select VP_TARGET

Kconfig.defconfig

if BOARD_VP_RISCV64
    config BUILD_OUTPUT_HEX
        default y

    config BOARD
        default "vp_riscv64" if BOARD_VP_RISCV64

endif 

Kconfig.vp

config BOARD_VP_RISCV64
    select SOC_VP_VIRT_RISCV64

board.cmake

set(SUPPORTED_EMU_PLATFORMS qemu)

set(QEMU_binary_suffix riscv64)
set(QEMU_CPU_TYPE_${ARCH} riscv64)

set(QEMU_FLAGS_${ARCH}
  -nographic
  -machine virt
  -bios none
  -m 256
  )
board_set_debugger_ifnset(qemu)

board.yml `board: name: vp full_name: VP ISA Simulator for RISCV64 vendor: xcelerium socs:

vp.dts `

device tree of my custom riscv proc

` vp.yml

vp_defconfig

CONFIG_PRIVILEGED_STACK_SIZE=2048*4
CONFIG_CONSOLE=n
CONFIG_SERIAL=n
CONFIG_UART_CONSOLE=n
CONFIG_STACK_SENTINEL=n
CONFIG_XIP=n
CONFIG_RISCV_PMP=n
# riscv-privileged
  1. cd zephyrproject/zephyr; west build -p always -b vp samples/hello_world --build-dir vp_build/

Expected behavior

Build test as per my custom board configurations.

Logs and console output After following the above steps i'm getting.

-- west build: making build dir /home/t_aejaz/Zephyr/zephyrproject/zephyr/vp_build pristine
-- west build: generating a build system
Loading Zephyr default modules (Zephyr base).
-- Application: /home/t_aejaz/Zephyr/zephyrproject/zephyr/samples/hello_world
-- CMake version: 3.30.2
-- Found Python3: /home/t_aejaz/Zephyr/zephyrproject/.venv/bin/python3 (found suitable version "3.10.12", minimum required is "3.10") found components: Interpreter
-- Cache files will be written to: /home/t_aejaz/.cache/zephyr
-- Zephyr version: 4.0.0-rc1 (/home/t_aejaz/Zephyr/zephyrproject/zephyr)
-- Found west (found suitable version "1.3.0", minimum required is "0.14.0")
CMake Error at /home/t_aejaz/Zephyr/zephyrproject/zephyr/cmake/modules/boards.cmake:196 (message):
  Error finding board: vp

  Error message: ERROR: SoC 'riscv-privileged' is not found, please ensure
  that the SoC exists and that soc-root containing 'riscv-privileged' has
  been correctly defined.

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

-- Configuring incomplete, errors occurred!
FATAL ERROR: command exited with status 1: /usr/bin/cmake -DWEST_PYTHON=/home/t_aejaz/Zephyr/zephyrproject/.venv/bin/python3 -B/home/t_aejaz/Zephyr/zephyrproject/zephyr/vp_build -GNinja -DBOARD=vp -S/home/t_aejaz/Zephyr/zephyrproject/zephyr/samples/hello_world

Environment (please complete the following information):

would really appreciate your help, Thanks!

github-actions[bot] commented 1 hour ago

Hi @akifejaz! We appreciate you submitting your first issue for our open-source project. 🌟

Even though I'm a bot, I can assure you that the whole community is genuinely grateful for your time and effort. 🤖💙