Skip to content

"west boards" command can not list the boards, which I created . #98699

@eason-lin-walking

Description

@eason-lin-walking

Describe the bug

I have a STM32F103ZET6 Board. I wanted to create a boards in the zephyr SDK. When I created the board in the boards/arm/ folder, Then I used "west boards", there is none boards, which I create show in the terminal. So I also can not build the project.

Regression

  • This is a regression.

Steps to reproduce

I have tested over windows11 and Macbook M1 pro.

  1. cd zephyrproject\zephyr\boards\arm
  2. Create "my_stm32f103zet6" folder.
  3. cd "stm32f103ze_custom"
  4. Create "board.cmake", "Kconfig.board ", "Kconfig.defconfig", "stm32f103ze_custom.dts" and "stm32f103ze_custom.yaml".
  5. board.cmake
# boards/arm/my_stm32f103zet6/board.cmake board_runner_args(st-flash "--reset") include(${ZEPHYR_BASE}/boards/common/stm32f1.dts.cmake) include(${ZEPHYR_BASE}/boards/common/stm32_flash.cmake) include(${ZEPHYR_BASE}/boards/common/stm32_gdb.cmake)
  1. Kconfig.board
# boards/arm/my_stm32f103zet6/Kconfig.board config BOARD_MY_STM32F103ZET6 bool "My STM32F103ZET6 Board"
  1. Kconfig.defconfig
# boards/arm/my_stm32f103zet6/Kconfig.defconfig if BOARD_MY_STM32F103ZET6 config BOARD default "my_stm32f103zet6" config SOC_SERIES_STM32F1X default y config SOC_STM32F103XE default y endif
  1. stm32f103ze_custom.dts
/dts-v1/; #include <st/stm32f103xe.dtsi> / { model = "My STM32F103ZET6 Board"; compatible = "st,stm32f103ze", "st,stm32f1"; chosen { zephyr,console = &usart1; zephyr,shell-uart = &usart1; }; leds { compatible = "gpio-leds"; led0: led_0 { gpios = <&gpioc 13 GPIO_ACTIVE_LOW>; label = "LED0"; }; }; }; &usart1 { status = "okay"; current-speed = <115200>; pinctrl-0 = <&usart1_tx_pa9 &usart1_rx_pa10>; pinctrl-names = "default"; }; &flash0 { reg = <0x08000000 0x80000>; }; &sram0 { reg = <0x20000000 0x10000>; };
  1. stm32f103ze_custom.yaml
identifier: my_stm32f103zet6 name: My STM32F103ZET6 Board type: mcu arch: arm toolchain: - zephyr - gccarmemb ram: 64 flash: 512 supported: - gpio - uart - pwm - i2c - spi soc: stm32f103xe

Relevant log output

1. Run "west boards", I can not find the boards in the log. 2. Run "west build -b my_stm32f103zet6 .\samples\hello_world\", the log  (.venv) PS D:\Project\zephyrproject\zephyr> west build -b my_stm32f103zet6 --cmake-only .\samples\hello_world\ -- west build: generating a build system Loading Zephyr default modules (Zephyr base (cached)). -- Application: D:/Project/zephyrproject/zephyr/samples/hello_world -- CMake version: 4.1.2 -- Cache files will be written to: D:/Project/zephyrproject/zephyr/.cache -- Zephyr version: 4.3.0-rc1 (D:/Project/zephyrproject/zephyr) -- Found west (found suitable version "1.5.0", minimum required is "0.14.0") No board named 'stm32f103ze_custom' found. Did you mean:  stm32f103_mini stm32f723e_disco stm32f413h_disco  Run 'west boards' for the full list. CMake Error at D:/Project/zephyrproject/zephyr/cmake/modules/boards.cmake:225 (message):  Invalid BOARD; see above. Call Stack (most recent call first):  D:/Project/zephyrproject/zephyr/cmake/modules/zephyr_default.cmake:131 (include)  D:/Project/zephyrproject/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:66 (include)  D:/Project/zephyrproject/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:97 (include_boilerplate)  CMakeLists.txt:5 (find_package)   -- Configuring incomplete, errors occurred! FATAL ERROR: command exited with status 1: 'C:\Program Files\CMake\bin\cmake.EXE' -DWEST_PYTHON=D:/Project/zephyrproject/.venv/Scripts/python.exe '-BD:\Project\zephyrproject\zephyr\build' -GNinja -DBOARD=stm32f103ze_custom '-SD:\Project\zephyrproject\zephyr\samples\hello_world'

Impact

Annoyance – Minor irritation; no significant impact on usability or functionality.

Environment

  • OS: Macbook M1 Pro and Windows11

Additional Context

CMakeLists.txt

my_stm32f103zet6.yaml

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugThe issue is a bug, or the PR is fixing a bug

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions