mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
periph_common: add as dependency to periph drivers
Rational: the periph_common module is required by (most) other periph drivers and also during startup of the CPU/MCU to run periph_init. The latter is only required if other periph drivers are used, hence periph_common should be a depency of periph_* modules and *not* of the CPU/MCU. This PR fixes that by making periph_common a depency of periph_* and removing the explicit include in the CPU/MCU implementation.
This commit is contained in:
parent
2ba303bc84
commit
2de4b3011b
@ -877,6 +877,11 @@ USEMODULE += $(filter periph_%,$(FEATURES_USED))
|
||||
# select cpu_check_address pseudomodule if the corresponding feature is used
|
||||
USEMODULE += $(filter cpu_check_address, $(FEATURES_USED))
|
||||
|
||||
# include periph_common if any periph_* driver is used
|
||||
ifneq (,$(filter periph_%, $(USEMODULE)))
|
||||
USEMODULE += periph_common
|
||||
endif
|
||||
|
||||
# recursively catch transitive dependencies
|
||||
USEMODULE := $(sort $(USEMODULE))
|
||||
USEPKG := $(sort $(USEPKG))
|
||||
|
@ -1,6 +1,3 @@
|
||||
export CPU_ARCH := cortex-m3
|
||||
|
||||
# include common SPI functions
|
||||
USEMODULE += periph_common
|
||||
|
||||
include $(RIOTMAKE)/arch/cortexm.inc.mk
|
||||
|
@ -1,5 +1,3 @@
|
||||
export CPU_ARCH := cortex-m3
|
||||
|
||||
USEMODULE += periph_common
|
||||
|
||||
include $(RIOTMAKE)/arch/cortexm.inc.mk
|
||||
|
@ -1,3 +1,3 @@
|
||||
include $(RIOTCPU)/msp430_common/Makefile.include
|
||||
|
||||
export USEMODULE += periph periph_common
|
||||
export USEMODULE += periph
|
||||
|
@ -20,9 +20,6 @@ USEMODULE += cpu_$(EFM32_FAMILY)
|
||||
# vectors.o is provided by 'cpu_$(EFM32_FAMILY)' and not by 'cpu'
|
||||
VECTORS_O := $(BINDIR)/cpu_$(EFM32_FAMILY)/vectors.o
|
||||
|
||||
# include common periph module
|
||||
USEMODULE += periph_common
|
||||
|
||||
# include layered power management
|
||||
USEMODULE += pm_layered
|
||||
|
||||
|
@ -69,7 +69,6 @@ USEMODULE += log
|
||||
USEMODULE += newlib_syscalls_default
|
||||
USEMODULE += periph
|
||||
USEMODULE += periph_adc_ctrl
|
||||
USEMODULE += periph_common
|
||||
USEMODULE += periph_hwrng
|
||||
USEMODULE += periph_flash
|
||||
USEMODULE += periph_rtc
|
||||
|
@ -56,7 +56,6 @@ PSEUDOMODULES += esp_spiffs
|
||||
USEMODULE += esp
|
||||
USEMODULE += mtd
|
||||
USEMODULE += periph
|
||||
USEMODULE += periph_common
|
||||
USEMODULE += ps
|
||||
USEMODULE += random
|
||||
USEMODULE += sdk
|
||||
|
@ -5,7 +5,6 @@ USEMODULE += newlib_syscalls_fe310
|
||||
USEMODULE += sifive_drivers_fe310
|
||||
|
||||
USEMODULE += periph
|
||||
USEMODULE += periph_common
|
||||
USEMODULE += periph_pm
|
||||
|
||||
CFLAGS += -Wno-pedantic
|
||||
|
@ -36,9 +36,6 @@ LINKFLAGS += $(LINKFLAGPREFIX)--defsym=_ram_length=$(RAM_LEN)
|
||||
# add the CPU specific flash configuration field for the linker
|
||||
export UNDEF += $(BINDIR)/cpu/fcfield.o
|
||||
|
||||
# include common periph drivers
|
||||
USEMODULE += periph_common
|
||||
|
||||
# select kinetis periph drivers
|
||||
ifeq (EA,$(KINETIS_SERIES))
|
||||
USEMODULE += periph_ics
|
||||
|
@ -2,7 +2,4 @@ export CPU_ARCH = cortex-m4f
|
||||
|
||||
include $(RIOTMAKE)/arch/cortexm.inc.mk
|
||||
|
||||
# use common periph functions
|
||||
USEMODULE += periph_common
|
||||
|
||||
include $(RIOTCPU)/stellaris_common/Makefile.include
|
||||
|
@ -1,3 +1,3 @@
|
||||
include $(RIOTCPU)/arm7_common/Makefile.include
|
||||
|
||||
USEMODULE += arm7_common periph periph_common bitfield newlib
|
||||
USEMODULE += arm7_common periph bitfield newlib
|
||||
|
@ -2,7 +2,6 @@ export INCLUDES += -I$(RIOTCPU)/mips32r2_common/include
|
||||
|
||||
export USEMODULE += mips32r2_common
|
||||
export USEMODULE += mips32r2_common_periph
|
||||
export USEMODULE += periph_common
|
||||
export USEMODULE += newlib
|
||||
|
||||
# mips32 needs periph_timer for its gettimeofday() implementation
|
||||
|
@ -4,5 +4,3 @@ export INCLUDES += -I$(RIOTCPU)/mips_pic32_common/include
|
||||
|
||||
USEMODULE += mips_pic32_common
|
||||
USEMODULE += mips_pic32_common_periph
|
||||
|
||||
USEMODULE += periph_common
|
||||
|
@ -7,7 +7,7 @@ MODEL = $(shell echo $(CPU_MODEL) | tr 'a-z' 'A-Z')
|
||||
export CFLAGS += -DCPU_MODEL_$(MODEL)
|
||||
|
||||
export UNDEF += $(BINDIR)/msp430_common/startup.o
|
||||
export USEMODULE += msp430_common msp430_common_periph msp430_malloc periph_common
|
||||
export USEMODULE += msp430_common msp430_common_periph msp430_malloc
|
||||
|
||||
DEFAULT_MODULE += oneway_malloc
|
||||
|
||||
|
@ -1,3 +1,3 @@
|
||||
include $(RIOTCPU)/msp430_common/Makefile.include
|
||||
|
||||
export USEMODULE += periph periph_common stdio_uart
|
||||
export USEMODULE += periph stdio_uart
|
||||
|
@ -8,7 +8,4 @@ endif
|
||||
USEMODULE += periph
|
||||
USEMODULE += periph_uart
|
||||
|
||||
# include common peripheral initialization
|
||||
USEMODULE += periph_common
|
||||
|
||||
TOOLCHAINS_SUPPORTED = gnu llvm
|
||||
|
@ -2,9 +2,6 @@
|
||||
FAM = $(shell echo $(CPU_FAM) | tr 'a-z-' 'A-Z_')
|
||||
export CFLAGS += -DCPU_FAM_$(FAM)
|
||||
|
||||
# use common periph functions
|
||||
USEMODULE += periph_common
|
||||
|
||||
# include nrf5x common periph drivers
|
||||
USEMODULE += nrf5x_common_periph
|
||||
|
||||
|
@ -22,9 +22,6 @@ export CFLAGS += -DDONT_USE_PREDEFINED_PERIPHERALS_HANDLERS
|
||||
# For Cortex-M cpu we use the common cortexm.ld linker script
|
||||
LINKER_SCRIPT ?= cortexm.ld
|
||||
|
||||
# use common periph functions
|
||||
USEMODULE += periph_common
|
||||
|
||||
# include sam0 common periph drivers
|
||||
USEMODULE += sam0_common_periph
|
||||
|
||||
|
@ -1,8 +1,5 @@
|
||||
export CPU_ARCH = cortex-m3
|
||||
export CPU_FAM = sam3
|
||||
|
||||
# include common SPI functions
|
||||
USEMODULE += periph_common
|
||||
|
||||
include $(RIOTCPU)/sam_common/Makefile.include
|
||||
include $(RIOTMAKE)/arch/cortexm.inc.mk
|
||||
|
@ -2,9 +2,6 @@
|
||||
FAM = $(shell echo $(CPU_FAM) | tr 'a-z-' 'A-Z_')
|
||||
export CFLAGS += -DCPU_FAM_$(FAM)
|
||||
|
||||
# include common periph module
|
||||
USEMODULE += periph_common
|
||||
|
||||
# All stm32 families provide pm support
|
||||
USEMODULE += pm_layered
|
||||
|
||||
|
@ -16,7 +16,6 @@ USEMODULE += atmega_common
|
||||
|
||||
# export the peripheral drivers to be linked into the final binary
|
||||
USEMODULE += atmega_common_periph
|
||||
USEMODULE += periph_common
|
||||
|
||||
# Export the peripheral drivers to be linked into the final binary, for now
|
||||
# only atmega126rfr2 has periph drivers
|
||||
|
@ -34,7 +34,6 @@ export USEMODULE += cortexm_common
|
||||
# Export the peripheral drivers to be linked into the final binary:
|
||||
export USEMODULE += periph
|
||||
# include common periph code
|
||||
export USEMODULE += periph_common
|
||||
export USEMODULE += cortexm_common_periph
|
||||
|
||||
# all cortex MCU's use newlib as libc
|
||||
|
Loading…
Reference in New Issue
Block a user