From 4bf7ab5dd0be4e33e6bfa063016e172da57ef6c0 Mon Sep 17 00:00:00 2001 From: cladmi Date: Wed, 26 Sep 2018 19:32:55 +0200 Subject: [PATCH 1/2] cpu/fe310: rtc depend on the rtt feature It is the role of boards based on 'cpu/fe310' to give the configuration for the rtc/rtt. The fe310/periph/rtc implementation depends on having periph/rtt configured by the board so depends on the board 'providing' the periph_rtt feature and declaring the required macros. It should not simply depend of the 'periph_rtt' module as this does not enforce having a configuration for the module in the board. In practice, when compiling, it would result in undefined 'RTT' symbols, instead of the build system detecting it. --- cpu/fe310/Makefile.dep | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cpu/fe310/Makefile.dep b/cpu/fe310/Makefile.dep index 2728a327db..725d8c9daf 100644 --- a/cpu/fe310/Makefile.dep +++ b/cpu/fe310/Makefile.dep @@ -1,3 +1,3 @@ ifneq (,$(filter periph_rtc,$(USEMODULE))) - USEMODULE += periph_rtt + FEATURES_REQUIRED += periph_rtt endif From 635691199a9cb9eb87a95f1e62a730987aff2eda Mon Sep 17 00:00:00 2001 From: cladmi Date: Wed, 26 Sep 2018 19:42:51 +0200 Subject: [PATCH 2/2] boards/hifive1: remove erroneous features parsing Remove duplicate handling of `periph_rtc` dependency to `periph_rtt` now declared in the cpu. Also the makefiles should not parse FEATURES_REQUIRED as it does not guarantee anything as features could also be requested by FEATURES_OPTIONAL. In practice it should parse it using `USEMODULE`. --- boards/hifive1/Makefile.features | 4 ---- 1 file changed, 4 deletions(-) diff --git a/boards/hifive1/Makefile.features b/boards/hifive1/Makefile.features index 3920db6791..2b38693af9 100644 --- a/boards/hifive1/Makefile.features +++ b/boards/hifive1/Makefile.features @@ -8,9 +8,5 @@ FEATURES_PROVIDED += periph_rtt FEATURES_PROVIDED += periph_timer FEATURES_PROVIDED += periph_uart -ifneq (,$(filter periph_rtc,$(FEATURES_REQUIRED))) - FEATURES_REQUIRED += periph_rtt -endif - # The board MPU family (used for grouping by the CI system) FEATURES_MCU_GROUP = risc_v