Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

periph_common: add as dependency to periph drivers #9906

Merged
merged 1 commit into from Jun 3, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 5 additions & 0 deletions Makefile.dep
Expand Up @@ -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))
Expand Down
3 changes: 0 additions & 3 deletions cpu/cc2538/Makefile.include
@@ -1,6 +1,3 @@
export CPU_ARCH := cortex-m3

# include common SPI functions
USEMODULE += periph_common

include $(RIOTMAKE)/arch/cortexm.inc.mk
2 changes: 0 additions & 2 deletions cpu/cc26x0/Makefile.include
@@ -1,5 +1,3 @@
export CPU_ARCH := cortex-m3

USEMODULE += periph_common

include $(RIOTMAKE)/arch/cortexm.inc.mk
2 changes: 1 addition & 1 deletion cpu/cc430/Makefile.include
@@ -1,3 +1,3 @@
include $(RIOTCPU)/msp430_common/Makefile.include

export USEMODULE += periph periph_common
export USEMODULE += periph
3 changes: 0 additions & 3 deletions cpu/efm32/Makefile.include
Expand Up @@ -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

Expand Down
1 change: 0 additions & 1 deletion cpu/esp32/Makefile.include
Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion cpu/esp8266/Makefile.include
Expand Up @@ -56,7 +56,6 @@ PSEUDOMODULES += esp_spiffs
USEMODULE += esp
USEMODULE += mtd
USEMODULE += periph
USEMODULE += periph_common
USEMODULE += ps
USEMODULE += random
USEMODULE += sdk
Expand Down
1 change: 0 additions & 1 deletion cpu/fe310/Makefile.include
Expand Up @@ -5,7 +5,6 @@ USEMODULE += newlib_syscalls_fe310
USEMODULE += sifive_drivers_fe310

USEMODULE += periph
USEMODULE += periph_common
USEMODULE += periph_pm

CFLAGS += -Wno-pedantic
Expand Down
3 changes: 0 additions & 3 deletions cpu/kinetis/Makefile.include
Expand Up @@ -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
Expand Down
3 changes: 0 additions & 3 deletions cpu/lm4f120/Makefile.include
Expand Up @@ -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
2 changes: 1 addition & 1 deletion cpu/lpc2387/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
1 change: 0 additions & 1 deletion cpu/mips32r2_common/Makefile.include
Expand Up @@ -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
Expand Down
2 changes: 0 additions & 2 deletions cpu/mips_pic32_common/Makefile.include
Expand Up @@ -4,5 +4,3 @@ export INCLUDES += -I$(RIOTCPU)/mips_pic32_common/include

USEMODULE += mips_pic32_common
USEMODULE += mips_pic32_common_periph

USEMODULE += periph_common
2 changes: 1 addition & 1 deletion cpu/msp430_common/Makefile.include
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion cpu/msp430fxyz/Makefile.include
@@ -1,3 +1,3 @@
include $(RIOTCPU)/msp430_common/Makefile.include

export USEMODULE += periph periph_common stdio_uart
export USEMODULE += periph stdio_uart
3 changes: 0 additions & 3 deletions cpu/native/Makefile.include
Expand Up @@ -8,7 +8,4 @@ endif
USEMODULE += periph
USEMODULE += periph_uart

# include common peripheral initialization
USEMODULE += periph_common

TOOLCHAINS_SUPPORTED = gnu llvm
3 changes: 0 additions & 3 deletions cpu/nrf5x_common/Makefile.include
Expand Up @@ -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

Expand Down
3 changes: 0 additions & 3 deletions cpu/sam0_common/Makefile.include
Expand Up @@ -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

Expand Down
3 changes: 0 additions & 3 deletions cpu/sam3/Makefile.include
@@ -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
3 changes: 0 additions & 3 deletions cpu/stm32_common/Makefile.include
Expand Up @@ -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

Expand Down
1 change: 0 additions & 1 deletion makefiles/arch/atmega.inc.mk
Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion makefiles/arch/cortexm.inc.mk
Expand Up @@ -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
Expand Down