参考链接:https://docs.zephyrproject.org/latest/application/index.html#custom-board-definition
自定义板子有两种方式,一种是放到 zephyr/boards/arch/<board>
路径下,一种是放到项目的路径下 <project path>/boards/arch/<board>
前者将自定义的板子加入了 zephyr
的 device tree
,直接通过 west build -b <board name>
命令,west
就能找到板子。
后者则需要指定板子定义的路径,但是可以避免污染原生环境:west build -b <board name> -- -DBOARD_ROOT=${PWD}