Hi I'm trying to build a project with an out-of-tree driver along with the custom board. I used the example app repo to prepare this directory sturcture:
.
├── app
│ ├── CMakeLists.txt
│ ├── CMakeLists.txt.bkp
│ ├── Kconfig
│ ├── my_custom_board.overlay
│ ├── prj.conf
│ └── src
│ └── main.c
├── boards
│ └── others
│ └── my_custom_board
│ ├── board.cmake
│ ├── board.yml
│ ├── Kconfig
│ ├── Kconfig.my_custom_board
│ ├── my_custom_board_defconfig
│ ├── my_custom_board.dts
│ ├── my_custom_board-pinctrl.dtsi
│ └── my_custom_board.yaml
├── CMakeLists.txt
├── drivers
│ └── sensor
│ ├── CMakeLists.txt
│ ├── Kconfig
│ ├── lsm6dsl.c
│ ├── lsm6dsl.h
│ ├── lsm6dsl_shub.c
│ ├── lsm6dsl_spi.c
│ └── lsm6dsl_trigger.c
├── dts
│ └── bindings
│ ├── st,mylsm6dsl-common.yaml
│ └── st,mylsm6dsl-spi.yaml
├── include
│ └── app
│ └── drivers
│ └── lsm6dsl.h
├── Kconfig
├── west.yml
└── zephyr
└── module.yml
The contents of Kconfig, CMakeLists.txt, zephyr/module.yml, app/CMakeLists.txt are as per the provided example.
I can see that zephyr/module.yml declares the location of the custom board and bindings:
build:
# Path to the Kconfig file that will be sourced into Zephyr Kconfig tree under
# Zephyr > Modules > example-application. Path is relative from root of this
# repository.
kconfig: Kconfig
# Path to the folder that contains the CMakeLists.txt file to be included by
# Zephyr build system. The `.` is the root of this repository.
cmake: .
settings:
# Additional roots for boards and DTS files. Zephyr will use the
# `<board_root>/boards` for additional boards. The `.` is the root of this
# repository.
board_root: .
# Zephyr will use the `<dts_root>/dts` for additional dts files and
# `<dts_root>/dts/bindings` for additional dts binding files. The `.` is
# the root of this repository.
dts_root: .
And Kconfig declares the custom driver location:
rsource "driver/sensor/Kconfig"
When I run west build -b my_custom_board app I get Invalid BOARD error. I see that the instructions say to initialise with west update, but I already have the zephyr codebase as below structure and I don't want to download the entire thing.
zephyrproject
|
├── zephyr
│
└── application
│
└── my_example_application
How can I get the custom board, bindings and the driver recognised? Thank you.