From 638373eec59968c35eb9ca56b53a669d3bb90b98 Mon Sep 17 00:00:00 2001 From: Francisco Molina Date: Tue, 9 Nov 2021 10:33:14 +0100 Subject: [PATCH] sys/ztimer: add ztimer_periph_rtt module conflict warning --- sys/ztimer/Makefile.include | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/sys/ztimer/Makefile.include b/sys/ztimer/Makefile.include index dc4f5f3b85..a6e0153de2 100644 --- a/sys/ztimer/Makefile.include +++ b/sys/ztimer/Makefile.include @@ -4,6 +4,8 @@ ifneq (,$(filter ztimer_xtimer_compat,$(USEMODULE))) PSEUDOMODULES += xtimer endif +MODULES_ZTIMER_ON_RTT_CONFLICT = rtt_rtc gnrc_lwmac gnrc_gomach + # By defaul use highest possible RTT_FREQUENCY for platforms that allow it. This # might not be the most optimized for conversion guarantees that ztimer_periph_rtt # will have a capable backend. @@ -12,4 +14,10 @@ ifneq (,$(filter ztimer_periph_rtt,$(USEMODULE))) RTT_FREQUENCY ?= RTT_MAX_FREQUENCY CFLAGS += -DRTT_FREQUENCY=$(RTT_FREQUENCY) endif + + MODULES_ZTIMER_ON_RTT_CONFLICTING = $(filter $(MODULES_ZTIMER_ON_RTT_CONFLICT),$(USEMODULE)) + ifneq (0,$(words $(MODULES_ZTIMER_ON_RTT_CONFLICTING))) + $(info $(COLOR_YELLOW)WARNING! The following modules conflict with 'ztimer_periph_rtt': '$(MODULES_ZTIMER_ON_RTT_CONFLICTING)') + $(info To disable ztimer periph_rtt auto-inclusion add 'ztimer_no_periph_rtt' to 'USEMODULE'$(COLOR_RESET)) + endif endif