diff --git a/boards/common/nucleo64/Makefile.dep b/boards/common/nucleo64/Makefile.dep index 6a372b4aa1..2435e45afc 100644 --- a/boards/common/nucleo64/Makefile.dep +++ b/boards/common/nucleo64/Makefile.dep @@ -2,13 +2,16 @@ include $(RIOTMAKE)/utils/ansi.mk include $(RIOTMAKE)/color.inc.mk -ifneq (,$(filter periph_spi,$(USEMODULE))) - # The LED pin is also used for SPI, disable the LED0 module (once) - ifeq (,$(filter periph_init_led0,$(DISABLE_MODULE))) - DISABLE_MODULE += periph_init_led0 +# Don't show warnings for info and generate targets +ifeq (,$(filter info-% generate-%,$(MAKECMDGOALS))) + ifneq (,$(filter periph_spi,$(USEMODULE))) + # The LED pin is also used for SPI, disable the LED0 module (once) + ifeq (,$(filter periph_init_led0,$(DISABLE_MODULE))) + DISABLE_MODULE += periph_init_led0 - MSG="Warning: Using periph_spi on Nucleo64 boards will disable LED0 due to pin conflicts." - $(shell $(COLOR_ECHO) "$(COLOR_RED)$(MSG)$(COLOR_RESET)" 1>&2) + MSG="Warning: Using periph_spi on Nucleo64 boards will disable LED0 due to pin conflicts." + $(shell $(COLOR_ECHO) "$(COLOR_YELLOW)$(MSG)$(COLOR_RESET)" 1>&2) + endif endif endif diff --git a/boards/seeedstudio-xiao-esp32c3/Makefile.dep b/boards/seeedstudio-xiao-esp32c3/Makefile.dep index 8899361edd..39faed3b24 100644 --- a/boards/seeedstudio-xiao-esp32c3/Makefile.dep +++ b/boards/seeedstudio-xiao-esp32c3/Makefile.dep @@ -1,13 +1,16 @@ -ifneq (,$(filter periph_spi, $(USEMODULE))) - ifeq (,$(filter periph_init_buttons, $(DISABLE_MODULE))) - DISABLE_MODULE += periph_init_buttons +# Don't show warnings for info and generate targets +ifeq (,$(filter info-% generate-%,$(MAKECMDGOALS))) + ifneq (,$(filter periph_spi, $(USEMODULE))) + ifeq (,$(filter periph_init_buttons, $(DISABLE_MODULE))) + DISABLE_MODULE += periph_init_buttons - MSG="Warning: Using periph_spi on Seeed Studio Xiao ESP32C3 board will disable BUTTON0 due to pin conflict." - $(shell $(COLOR_ECHO) "$(COLOR_YELLOW)$(MSG)$(COLOR_RESET)" 1>&2) + MSG="Warning: Using periph_spi on Seeed Studio Xiao ESP32C3 board will disable BUTTON0 due to pin conflict." + $(shell $(COLOR_ECHO) "$(COLOR_YELLOW)$(MSG)$(COLOR_RESET)" 1>&2) + endif + else ifneq (,$(filter saul_default,$(USEMODULE))) + # The button is the only SAUL device. Enable it only when SPI is not enabled. + USEMODULE += saul_gpio endif -else ifneq (,$(filter saul_default,$(USEMODULE))) - # The button is the only SAUL device. Enable it only when SPI is not enabled. - USEMODULE += saul_gpio endif ifeq (,$(filter stdio_% slipdev_stdio,$(USEMODULE)))