From 600acb756cf18a57ad88b4dd93e8fe9247f151be Mon Sep 17 00:00:00 2001 From: Francisco Molina Date: Tue, 14 Dec 2021 23:45:54 +0100 Subject: [PATCH] tests/periph_pm: select ztimer_no_periph_rtt for sam0 boards For sam0 there is a conflict between rtt and rtc, make resolves this based on feature conflicts and the feature to be included depends on dependency resolution. Kconfig can't rely on order of inclusion therefore ztimer_no_periph_rtt is implied to aboid ztimer_msec selecting rtt (its the case for BOARDs using stdio_rtt --- tests/periph_pm/Kconfig | 1 + tests/periph_pm/Makefile.board.dep | 8 ++++++++ 2 files changed, 9 insertions(+) create mode 100644 tests/periph_pm/Makefile.board.dep diff --git a/tests/periph_pm/Kconfig b/tests/periph_pm/Kconfig index 021a1e6040..7a0f8866e2 100644 --- a/tests/periph_pm/Kconfig +++ b/tests/periph_pm/Kconfig @@ -11,4 +11,5 @@ config APPLICATION imply MODULE_PERIPH_RTC imply MODULE_PERIPH_GPIO imply MODULE_PERIPH_GPIO_IRQ + imply MODULE_ZTIMER_NO_PERIPH_RTT if CPU_COMMON_SAM0 depends on TEST_KCONFIG diff --git a/tests/periph_pm/Makefile.board.dep b/tests/periph_pm/Makefile.board.dep new file mode 100644 index 0000000000..8427e579d4 --- /dev/null +++ b/tests/periph_pm/Makefile.board.dep @@ -0,0 +1,8 @@ +# For sam0 rtt conflicts with rtc, make will select only rtc because of +# order of inclusion, but to resolve in the same way as Kconfig this also +# selects ztimer_no_periph_rtt to select the same modules in Kconfig and make +ifneq (,$(filter-out sam3,$(filter sam%,$(CPU)))) + ifneq (,$(filter ztimer%,$(USEMODULE))) + USEMODULE += ztimer_no_periph_rtt + endif +endif