mirror of
https://github.com/gosticks/RIOT.git
synced 2026-10-04 06:47:06 +00:00
Merge pull request #12898 from aabadie/pr/cpu/dependencies_cleanup
cpu: move cpu level dependencies in dedicated Makefile.dep files
This commit is contained in:
@@ -0,0 +1,4 @@
|
||||
# use common ARM7 periph code
|
||||
USEMODULE += arm7_common_periph
|
||||
# use the nano-specs of Newlib when available
|
||||
USEMODULE += newlib_nano
|
||||
@@ -3,11 +3,6 @@ export TARGET_ARCH ?= arm-none-eabi
|
||||
|
||||
INCLUDES += -I$(RIOTBASE)/cpu/arm7_common/include/
|
||||
|
||||
# use common ARM7 periph code
|
||||
USEMODULE += arm7_common_periph
|
||||
# use the nano-specs of Newlib when available
|
||||
USEMODULE += newlib_nano
|
||||
|
||||
# currently only arm7tdmi-s is supported by RIOT, but allow overriding MCPU
|
||||
# if someone wants to add support for other ARM7 CPUs
|
||||
MCPU ?= arm7tdmi-s
|
||||
|
||||
@@ -1,6 +1,15 @@
|
||||
# avr libc needs some RIOT-specific support code
|
||||
USEMODULE += avr_libc_extra
|
||||
|
||||
# tell the build system to build the atmega common files
|
||||
USEMODULE += atmega_common
|
||||
|
||||
# peripheral drivers are linked into the final binary
|
||||
USEMODULE += atmega_common_periph
|
||||
|
||||
# the atmel port uses stdio_uart
|
||||
USEMODULE += stdio_uart
|
||||
|
||||
# expand atmega_pcint module
|
||||
ifneq (,$(filter atmega_pcint,$(USEMODULE)))
|
||||
USEMODULE += atmega_pcint0
|
||||
|
||||
@@ -3,9 +3,6 @@ INCLUDES += -I$(RIOTCPU)/atmega_common/include \
|
||||
-isystem$(RIOTCPU)/atmega_common/avr_libc_extra/include \
|
||||
-isystem$(RIOTCPU)/atmega_common/avr_libc_extra/include/vendor
|
||||
|
||||
# avr libc needs some RIOT-specific support code
|
||||
USEMODULE += avr_libc_extra
|
||||
|
||||
PSEUDOMODULES += atmega_pcint
|
||||
PSEUDOMODULES += atmega_pcint%
|
||||
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
include ${RIOTCPU}/cc26xx_cc13xx/Makefile.dep
|
||||
@@ -0,0 +1 @@
|
||||
include ${RIOTCPU}/cc26xx_cc13xx/Makefile.dep
|
||||
@@ -0,0 +1 @@
|
||||
USEMODULE += periph_common cc26xx_cc13xx_periph
|
||||
@@ -1,5 +1,4 @@
|
||||
VARIANT = $(shell echo $(CPU_VARIANT) | tr 'a-z-' 'A-Z_')
|
||||
CFLAGS += -DCPU_VARIANT_$(VARIANT)
|
||||
|
||||
USEMODULE += periph_common cc26xx_cc13xx_periph
|
||||
INCLUDES += -I${RIOTCPU}/cc26xx_cc13xx/include
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
USEMODULE += periph
|
||||
|
||||
include $(RIOTCPU)/msp430_common/Makefile.dep
|
||||
@@ -1,3 +1 @@
|
||||
include $(RIOTCPU)/msp430_common/Makefile.include
|
||||
|
||||
export USEMODULE += periph
|
||||
|
||||
@@ -5,3 +5,9 @@ endif
|
||||
ifneq (,$(filter periph_rtt,$(USEMODULE)))
|
||||
USEMODULE += periph_rtt_series$(EFM32_SERIES)
|
||||
endif
|
||||
|
||||
# include Gecko SDK package
|
||||
USEPKG += gecko_sdk
|
||||
|
||||
# include layered power management
|
||||
USEMODULE += pm_layered
|
||||
|
||||
@@ -9,9 +9,6 @@ RIOTBOOT_LEN ?= 0x2000
|
||||
# the em_device.h header requires a global define with the cpu model
|
||||
CFLAGS += -D$(call uppercase_and_underscore,$(CPU_MODEL))
|
||||
|
||||
# include Gecko SDK package
|
||||
USEPKG += gecko_sdk
|
||||
|
||||
# CMSIS-DSP is needed for arm_math.h on Cortex-M0+ architectures
|
||||
ifeq ($(CPU_ARCH),cortex-m0plus)
|
||||
USEPKG += cmsis-dsp
|
||||
@@ -23,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 layered power management
|
||||
USEMODULE += pm_layered
|
||||
|
||||
# include vendor device headers
|
||||
INCLUDES += -I$(RIOTCPU)/efm32/families/$(EFM32_FAMILY)/include/vendor
|
||||
|
||||
|
||||
@@ -1,3 +1,11 @@
|
||||
USEMODULE += newlib_nano
|
||||
|
||||
USEMODULE += newlib_syscalls_fe310
|
||||
USEMODULE += sifive_drivers_fe310
|
||||
|
||||
USEMODULE += periph
|
||||
USEMODULE += periph_pm
|
||||
|
||||
ifneq (,$(filter periph_rtc,$(USEMODULE)))
|
||||
FEATURES_REQUIRED += periph_rtt
|
||||
endif
|
||||
|
||||
@@ -1,12 +1,3 @@
|
||||
|
||||
USEMODULE += newlib_nano
|
||||
|
||||
USEMODULE += newlib_syscalls_fe310
|
||||
USEMODULE += sifive_drivers_fe310
|
||||
|
||||
USEMODULE += periph
|
||||
USEMODULE += periph_pm
|
||||
|
||||
CFLAGS += -Wno-pedantic
|
||||
|
||||
include $(RIOTMAKE)/arch/riscv.inc.mk
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
USEMODULE += pm_layered
|
||||
@@ -1,5 +1,3 @@
|
||||
CPU_ARCH = cortex-m3
|
||||
|
||||
USEMODULE += pm_layered
|
||||
|
||||
include $(RIOTMAKE)/arch/cortexm.inc.mk
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
USEMODULE += arm7_common
|
||||
USEMODULE += bitfield
|
||||
USEMODULE += newlib
|
||||
USEMODULE += periph
|
||||
USEMODULE += pm_layered
|
||||
|
||||
include $(RIOTCPU)/arm7_common/Makefile.dep
|
||||
@@ -1,4 +1 @@
|
||||
include $(RIOTCPU)/arm7_common/Makefile.include
|
||||
|
||||
USEMODULE += arm7_common periph bitfield newlib
|
||||
USEMODULE += pm_layered
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
USEMODULE += mips32r2_common
|
||||
USEMODULE += mips32r2_common_periph
|
||||
USEMODULE += newlib
|
||||
|
||||
# mips32 needs periph_timer for its gettimeofday() implementation
|
||||
FEATURES_REQUIRED += periph_timer
|
||||
|
||||
ifeq ($(USE_UHI_SYSCALLS),1)
|
||||
#Use UHI to handle syscalls
|
||||
USEMODULE += newlib_syscalls_mips_uhi
|
||||
else
|
||||
#Use RIOT to handle syscalls (default)
|
||||
USEMODULE += newlib_syscalls_default
|
||||
endif
|
||||
@@ -1,18 +1,7 @@
|
||||
INCLUDES += -I$(RIOTCPU)/mips32r2_common/include
|
||||
|
||||
export USEMODULE += mips32r2_common
|
||||
export USEMODULE += mips32r2_common_periph
|
||||
export USEMODULE += newlib
|
||||
|
||||
# mips32 needs periph_timer for its gettimeofday() implementation
|
||||
export USEMODULE += periph_timer
|
||||
|
||||
ifeq ($(USE_UHI_SYSCALLS),1)
|
||||
#Use UHI to handle syscalls
|
||||
LINKFLAGS += -luhi
|
||||
export USEMODULE += newlib_syscalls_mips_uhi
|
||||
CFLAGS += -DHAVE_HEAP_STATS
|
||||
else
|
||||
#Use RIOT to handle syscalls (default)
|
||||
export USEMODULE += newlib_syscalls_default
|
||||
endif
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
USEMODULE += mips_pic32_common
|
||||
USEMODULE += mips_pic32_common_periph
|
||||
|
||||
include $(RIOTCPU)/mips32r2_common/Makefile.dep
|
||||
@@ -1,6 +1,3 @@
|
||||
include $(RIOTCPU)/mips32r2_common/Makefile.include
|
||||
|
||||
INCLUDES += -I$(RIOTCPU)/mips_pic32_common/include
|
||||
|
||||
USEMODULE += mips_pic32_common
|
||||
USEMODULE += mips_pic32_common_periph
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
include $(RIOTCPU)/mips_pic32_common/Makefile.dep
|
||||
@@ -0,0 +1 @@
|
||||
include $(RIOTCPU)/mips_pic32_common/Makefile.dep
|
||||
@@ -0,0 +1,3 @@
|
||||
USEMODULE += msp430_common msp430_common_periph msp430_malloc
|
||||
|
||||
DEFAULT_MODULE += oneway_malloc
|
||||
@@ -5,9 +5,6 @@ INCLUDES += -I$(RIOTCPU)/msp430_common/include/
|
||||
CFLAGS += -DCPU_MODEL_$(call uppercase_and_underscore,$(CPU_MODEL))
|
||||
|
||||
export UNDEF += $(BINDIR)/msp430_common/startup.o
|
||||
export USEMODULE += msp430_common msp430_common_periph msp430_malloc
|
||||
|
||||
DEFAULT_MODULE += oneway_malloc
|
||||
|
||||
# include the msp430 common Makefile
|
||||
include $(RIOTMAKE)/arch/msp430.inc.mk
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
USEMODULE += periph stdio_uart
|
||||
|
||||
include $(RIOTCPU)/msp430_common/Makefile.dep
|
||||
@@ -1,3 +1 @@
|
||||
include $(RIOTCPU)/msp430_common/Makefile.include
|
||||
|
||||
export USEMODULE += periph stdio_uart
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
include $(RIOTCPU)/nrf5x_common/Makefile.dep
|
||||
@@ -4,3 +4,5 @@ ifneq (,$(filter nrf802154,$(USEMODULE)))
|
||||
USEMODULE += luid
|
||||
USEMODULE += netdev_ieee802154
|
||||
endif
|
||||
|
||||
include $(RIOTCPU)/nrf5x_common/Makefile.dep
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
# include nrf5x common periph drivers
|
||||
USEMODULE += nrf5x_common_periph
|
||||
|
||||
# link common cpu code
|
||||
USEMODULE += cpu_common
|
||||
@@ -1,9 +1,3 @@
|
||||
CFLAGS += -DCPU_FAM_$(call uppercase_and_underscore,$(CPU_FAM))
|
||||
|
||||
# include nrf5x common periph drivers
|
||||
USEMODULE += nrf5x_common_periph
|
||||
|
||||
# link common cpu code
|
||||
USEMODULE += cpu_common
|
||||
|
||||
INCLUDES += -I$(RIOTCPU)/nrf5x_common/include
|
||||
|
||||
@@ -1,3 +1,9 @@
|
||||
ifneq (,$(filter periph_uart_nonblocking,$(USEMODULE)))
|
||||
USEMODULE += tsrb
|
||||
endif
|
||||
|
||||
# All SAM0 based CPUs provide PM
|
||||
USEMODULE += pm_layered
|
||||
|
||||
# include sam0 common periph drivers
|
||||
USEMODULE += sam0_common_periph
|
||||
|
||||
@@ -31,7 +31,4 @@ LINKER_SCRIPT ?= cortexm.ld
|
||||
# define sam0 specific pseudomodules
|
||||
PSEUDOMODULES += sam0_periph_uart_hw_fc
|
||||
|
||||
# include sam0 common periph drivers
|
||||
USEMODULE += sam0_common_periph
|
||||
|
||||
INCLUDES += -I$(RIOTCPU)/sam0_common/include
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
CPU_ARCH = cortex-m0plus
|
||||
CPU_FAM = samd21
|
||||
|
||||
USEMODULE += pm_layered
|
||||
|
||||
include $(RIOTCPU)/sam0_common/Makefile.include
|
||||
include $(RIOTMAKE)/arch/cortexm.inc.mk
|
||||
|
||||
@@ -6,8 +6,6 @@ CPU_FAM = samd5x
|
||||
# flash cannot be divided by two slots while staying FLASHPAGE_SIZE aligned.
|
||||
RIOTBOOT_LEN ?= 0x4000
|
||||
|
||||
USEMODULE += pm_layered
|
||||
|
||||
BACKUP_RAM_ADDR = 0x47000000
|
||||
BACKUP_RAM_LEN = 0x2000
|
||||
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
CPU_ARCH = cortex-m23
|
||||
|
||||
USEMODULE += pm_layered
|
||||
|
||||
include $(RIOTCPU)/sam0_common/Makefile.include
|
||||
include $(RIOTMAKE)/arch/cortexm.inc.mk
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
CPU_ARCH = cortex-m0plus
|
||||
CPU_FAM = saml21
|
||||
|
||||
USEMODULE += pm_layered
|
||||
|
||||
ifneq (,$(filter saml21j18b saml21j18a samr30g18a samr34j18b,$(CPU_MODEL)))
|
||||
BACKUP_RAM_ADDR = 0x30000000
|
||||
BACKUP_RAM_LEN = 0x2000
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
# All stm32 families provide pm support
|
||||
USEMODULE += pm_layered
|
||||
|
||||
# include stm32 common functions and stm32 common periph drivers
|
||||
USEMODULE += stm32_common stm32_common_periph
|
||||
@@ -1,11 +1,5 @@
|
||||
CFLAGS += -DCPU_FAM_$(call uppercase_and_underscore,$(CPU_FAM))
|
||||
|
||||
# All stm32 families provide pm support
|
||||
USEMODULE += pm_layered
|
||||
|
||||
# include stm32 common functions and stm32 common periph drivers
|
||||
USEMODULE += stm32_common stm32_common_periph
|
||||
|
||||
# For stm32 cpu's we use the stm32_common.ld linker script
|
||||
LINKFLAGS += -L$(RIOTCPU)/stm32_common/ldscripts
|
||||
LINKER_SCRIPT ?= stm32_common.ld
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
include $(RIOTCPU)/stm32_common/Makefile.dep
|
||||
@@ -0,0 +1 @@
|
||||
include $(RIOTCPU)/stm32_common/Makefile.dep
|
||||
@@ -0,0 +1 @@
|
||||
include $(RIOTCPU)/stm32_common/Makefile.dep
|
||||
@@ -0,0 +1 @@
|
||||
include $(RIOTCPU)/stm32_common/Makefile.dep
|
||||
@@ -0,0 +1 @@
|
||||
include $(RIOTCPU)/stm32_common/Makefile.dep
|
||||
@@ -0,0 +1 @@
|
||||
include $(RIOTCPU)/stm32_common/Makefile.dep
|
||||
@@ -0,0 +1 @@
|
||||
include $(RIOTCPU)/stm32_common/Makefile.dep
|
||||
@@ -0,0 +1 @@
|
||||
include $(RIOTCPU)/stm32_common/Makefile.dep
|
||||
@@ -0,0 +1 @@
|
||||
include $(RIOTCPU)/stm32_common/Makefile.dep
|
||||
@@ -11,15 +11,6 @@ ASFLAGS += $(CFLAGS_CPU) $(CFLAGS_DBG)
|
||||
LINKFLAGS += $(CFLAGS_CPU) $(CFLAGS_DBG) $(CFLAGS_OPT) -static -lgcc -e reset_handler -Wl,--gc-sections
|
||||
OFLAGS += -j .text -j .data
|
||||
|
||||
# Tell the build system that the CPU depends on the atmega common files:
|
||||
USEMODULE += atmega_common
|
||||
|
||||
# export the peripheral drivers to be linked into the final binary
|
||||
USEMODULE += atmega_common_periph
|
||||
|
||||
# the atmel port uses stdio_uart
|
||||
USEMODULE += stdio_uart
|
||||
|
||||
# explicitly tell the linker to link the syscalls and startup code.
|
||||
# without this the interrupt vectors will not be linked correctly!
|
||||
UNDEF += $(BINDIR)/atmega_common/startup.o
|
||||
|
||||
Reference in New Issue
Block a user