1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-12-16 18:13:49 +01:00

boards: don't show pin conflict warnings for info and generate targets

This commit is contained in:
crasbe 2025-11-06 16:45:26 +01:00
parent a8f0171bc1
commit f366153e0b
2 changed files with 20 additions and 14 deletions

View File

@ -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

View File

@ -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)))