I’m working on adding ST Nucleo-F767zi board support to the zephyr training.
So far I made the changes to the sdk and the zephyr-training repos so that I can build the examples/apps (02, 03 and 04) successfully.
I can also run examples/apps on my board without modifying any app code,
except the 05_golioth app, it seems that the build system doesn’t take into account my boards/nucleof767_stm32f767.conf file and when I try to force it using the -DCONF_FILE=“boards/nucleof767_stm32f767.conf” in the west commands it overrides the prj.conf and I get a build error.
The 05_golioth app only worked when I moved my board specific configs inside the prj.conf file
Here is my environment:
Zephy SDK and dependencies setup according to official docs
Windows 11
PowerShell 7
Python virtual environment to run west
and here the changes on my GitHub forks for the zephyr-training and Golioth SDK where you can find the changes I made to add my STM32 board:
Please note that I’m new to west and zephyr build system and even though I can build and run the examples, I’m not really sure if I made the correct changes or if there is a better way to handle this.
If I add these configs inside the app\05_golioth\prj.conf and build with the following command everything works fine. west build -b nucleo_f767zi -- -DDTC_OVERLAY_FILE="boards/nucleof767_stm32f767.overlay"
However I want to add those configs in app\05_golioth\boards\nucleof767_stm32f767.conf and when I do that those configs are not taken into consideration when building.
I also tried to force it using the west command like the following, but then the prj.conf file is not taken into consideration when building.
west build -b nucleo_f767zi -- -DDTC_OVERLAY_FILE="boards/nucleof767_stm32f767.overlay" -DCONF_FILE="boards/nucleof767_stm32f767.conf"
I’m not sure how to tell the build system to use both the prj.conf and the boards/nucleof767_stm32f767.conf
West will automatically pick up board overlay and board config files based on the name of the board. If you put the overlay at boards/nucleo_f767zi.overlay and the config file at boards/nucleo_f767zi.conf then you can build with west build -b nucleo_f767zi. Just make sure the file names match the board name you pass to west.