cpu/efm32: add families/%/Makefile.include
Move INCLUDES and VECTORS_O to Makefile.include duplicate EFM32_HEADER while cpu.txt is not migrated.
This commit is contained in:
parent
5715f13323
commit
a0462488e8
@ -1,17 +1,21 @@
|
||||
include $(RIOTCPU)/efm32/efm32-info.mk
|
||||
|
||||
# HACK: here we would want to look into USEMODULE to include Makefile.include
|
||||
# but since Makefile.dep is still resolved after Makefile.include we can't do
|
||||
# something like `$(filter cpu_efm32%,$(USEMODULE))`. This is why we use
|
||||
# `cpu_$(CPU_FAM)` for something that is MODULE related.
|
||||
include $(RIOTCPU)/efm32/families/$(CPU_FAM)/Makefile.include
|
||||
|
||||
ifeq (,$(EFM32_HEADER))
|
||||
$(error Header file for $(CPU_MODEL) is missing)
|
||||
endif
|
||||
|
||||
# the size of riotboot on the EFM32 exceeds the default value
|
||||
RIOTBOOT_LEN ?= 0x2000
|
||||
|
||||
# the em_device.h header requires a global define with the cpu model
|
||||
CFLAGS += -D$(call uppercase_and_underscore,$(CPU_MODEL))
|
||||
|
||||
# vectors.o is provided by 'cpu_$(EFM32_FAMILY)' and not by 'cpu'
|
||||
VECTORS_O := $(BINDIR)/cpu_$(EFM32_FAMILY)/vectors.o
|
||||
|
||||
# include vendor device headers
|
||||
INCLUDES += -I$(RIOTCPU)/efm32/families/$(EFM32_FAMILY)/include/vendor
|
||||
|
||||
# include cortexm_common
|
||||
LINKER_SCRIPT = cortexm.ld
|
||||
|
||||
|
||||
@ -1,10 +1,6 @@
|
||||
# Find the header file that should exist if the CPU is supported.
|
||||
EFM32_HEADER = $(wildcard $(RIOTCPU)/efm32/families/*/include/vendor/$(CPU_MODEL).h)
|
||||
|
||||
ifeq (,$(EFM32_HEADER))
|
||||
$(error Header file for $(CPU_MODEL) is missing)
|
||||
endif
|
||||
|
||||
# Lookup up CPU information using grep.
|
||||
EFM32_INFO = $(shell grep $(CPU_MODEL) $(shell dirname $(EFM32_HEADER))/../../cpus.txt)
|
||||
|
||||
|
||||
10
cpu/efm32/families/efm32gg/Makefile.include
Normal file
10
cpu/efm32/families/efm32gg/Makefile.include
Normal file
@ -0,0 +1,10 @@
|
||||
# Find the header file that should exist if the CPU is supported. Only headers
|
||||
# for supported boards are included, but to support another CPU, it should be
|
||||
# as easy as adding the header file only.
|
||||
EFM32_HEADER = $(wildcard $(RIOTCPU)/efm32/families/efm32gg/include/vendor/$(CPU_MODEL).h)
|
||||
|
||||
# vectors.o is provided by 'cpu_$(CPU_FAM)' module and not by 'cpu'
|
||||
VECTORS_O = $(BINDIR)/cpu_efm32gg/vectors.o
|
||||
|
||||
# include vendor device headers
|
||||
INCLUDES += -I$(RIOTCPU)/efm32/families/efm32gg/include/vendor
|
||||
10
cpu/efm32/families/efm32lg/Makefile.include
Normal file
10
cpu/efm32/families/efm32lg/Makefile.include
Normal file
@ -0,0 +1,10 @@
|
||||
# Find the header file that should exist if the CPU is supported. Only headers
|
||||
# for supported boards are included, but to support another CPU, it should be
|
||||
# as easy as adding the header file only.
|
||||
EFM32_HEADER = $(wildcard $(RIOTCPU)/efm32/families/efm32lg/include/vendor/$(CPU_MODEL).h)
|
||||
|
||||
# vectors.o is provided by 'cpu_$(CPU_FAM)' module and not by 'cpu'
|
||||
VECTORS_O = $(BINDIR)/cpu_efm32lg/vectors.o
|
||||
|
||||
# include vendor device headers
|
||||
INCLUDES += -I$(RIOTCPU)/efm32/families/efm32lg/include/vendor
|
||||
10
cpu/efm32/families/efm32pg12b/Makefile.include
Normal file
10
cpu/efm32/families/efm32pg12b/Makefile.include
Normal file
@ -0,0 +1,10 @@
|
||||
# Find the header file that should exist if the CPU is supported. Only headers
|
||||
# for supported boards are included, but to support another CPU, it should be
|
||||
# as easy as adding the header file only.
|
||||
EFM32_HEADER = $(wildcard $(RIOTCPU)/efm32/families/efm32pg12b/include/vendor/$(CPU_MODEL).h)
|
||||
|
||||
# vectors.o is provided by 'cpu_$(CPU_FAM)' module and not by 'cpu'
|
||||
VECTORS_O = $(BINDIR)/cpu_efm32pg12b/vectors.o
|
||||
|
||||
# include vendor device headers
|
||||
INCLUDES += -I$(RIOTCPU)/efm32/families/efm32pg12b/include/vendor
|
||||
10
cpu/efm32/families/efm32pg1b/Makefile.include
Normal file
10
cpu/efm32/families/efm32pg1b/Makefile.include
Normal file
@ -0,0 +1,10 @@
|
||||
# Find the header file that should exist if the CPU is supported. Only headers
|
||||
# for supported boards are included, but to support another CPU, it should be
|
||||
# as easy as adding the header file only.
|
||||
EFM32_HEADER = $(wildcard $(RIOTCPU)/efm32/families/efm32pg1b/include/vendor/$(CPU_MODEL).h)
|
||||
|
||||
# vectors.o is provided by 'cpu_$(CPU_FAM)' module and not by 'cpu'
|
||||
VECTORS_O = $(BINDIR)/cpu_efm32pg1b/vectors.o
|
||||
|
||||
# include vendor device headers
|
||||
INCLUDES += -I$(RIOTCPU)/efm32/families/efm32pg1b/include/vendor
|
||||
10
cpu/efm32/families/efr32mg12p/Makefile.include
Normal file
10
cpu/efm32/families/efr32mg12p/Makefile.include
Normal file
@ -0,0 +1,10 @@
|
||||
# Find the header file that should exist if the CPU is supported. Only headers
|
||||
# for supported boards are included, but to support another CPU, it should be
|
||||
# as easy as adding the header file only.
|
||||
EFM32_HEADER = $(wildcard $(RIOTCPU)/efm32/families/efr32mg12p/include/vendor/$(CPU_MODEL).h)
|
||||
|
||||
# vectors.o is provided by 'cpu_$(CPU_FAM)' module and not by 'cpu'
|
||||
VECTORS_O = $(BINDIR)/cpu_efr32mg12p/vectors.o
|
||||
|
||||
# include vendor device headers
|
||||
INCLUDES += -I$(RIOTCPU)/efm32/families/efr32mg12p/include/vendor
|
||||
10
cpu/efm32/families/efr32mg1p/Makefile.include
Normal file
10
cpu/efm32/families/efr32mg1p/Makefile.include
Normal file
@ -0,0 +1,10 @@
|
||||
# Find the header file that should exist if the CPU is supported. Only headers
|
||||
# for supported boards are included, but to support another CPU, it should be
|
||||
# as easy as adding the header file only.
|
||||
EFM32_HEADER = $(wildcard $(RIOTCPU)/efm32/families/efr32mg1p/include/vendor/$(CPU_MODEL).h)
|
||||
|
||||
# vectors.o is provided by 'cpu_$(CPU_FAM)' module and not by 'cpu'
|
||||
VECTORS_O = $(BINDIR)/cpu_efr32mg1p/vectors.o
|
||||
|
||||
# include vendor device headers
|
||||
INCLUDES += -I$(RIOTCPU)/efm32/families/efr32mg1p/include/vendor
|
||||
Loading…
x
Reference in New Issue
Block a user