Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cpu: efm32_common + ef32mg1p: replace with generalized efm32 cpu
- Loading branch information
Showing
80 changed files
with
265 additions
and
150 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,6 @@ | ||
# define the module that is build | ||
MODULE = efm32_common | ||
MODULE = cpu | ||
|
||
# add a list of subdirectories, that should also be build | ||
DIRS = periph | ||
DIRS = periph families/$(EFM32_FAMILY) $(RIOTCPU)/cortexm_common | ||
|
||
include $(RIOTBASE)/Makefile.base |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
ifneq (,$(filter periph_rtc,$(USEMODULE))) | ||
USEMODULE += periph_rtc_series$(CPU_SERIES) | ||
USEMODULE += periph_rtc_series$(EFM32_SERIES) | ||
endif | ||
|
||
ifneq (,$(filter periph_rtt,$(USEMODULE))) | ||
USEMODULE += periph_rtt_series$(CPU_SERIES) | ||
USEMODULE += periph_rtt_series$(EFM32_SERIES) | ||
endif |
4 changes: 4 additions & 0 deletions
4
cpu/efm32_common/Makefile.features → cpu/efm32/Makefile.features
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,7 @@ | ||
FEATURES_PROVIDED += periph_cpuid | ||
FEATURES_PROVIDED += periph_flashpage | ||
FEATURES_PROVIDED += periph_pm | ||
|
||
ifeq (1,$(EFM32_TNRG)) | ||
FEATURES_PROVIDED += periph_hwrng | ||
endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
include $(RIOTCPU)/efm32/efm32-info.mk | ||
|
||
export CPU_ARCH = $(EFM32_ARCHITECTURE) | ||
export CPU_FAM = $(EFM32_FAMILY) | ||
|
||
# the em_device.h header requires a global define with the cpu model | ||
export CFLAGS += -D$(shell echo $(CPU_MODEL) | tr 'a-z' 'A-Z') | ||
|
||
# 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 | ||
endif | ||
|
||
# include common periph module | ||
USEMODULE += periph_common | ||
|
||
# include layered power management | ||
USEMODULE += pm_layered | ||
|
||
# include vendor device headers | ||
INCLUDES += -I$(RIOTCPU)/efm32/families/$(EFM32_FAMILY)/include/vendor | ||
|
||
# include cortexm_common | ||
LINKER_SCRIPT = cortexm.ld | ||
|
||
ROM_START_ADDR = $(EFM32_FLASH_START) | ||
ROM_LEN = $(EFM32_FLASH_SIZE) | ||
RAM_START_ADDR = $(EFM32_SRAM_START) | ||
RAM_LEN = $(EFM32_SRAM_SIZE) | ||
|
||
include $(RIOTMAKE)/arch/cortexm.inc.mk |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,7 +7,7 @@ | |
*/ | ||
|
||
/** | ||
* @ingroup cpu_efm32_common | ||
* @ingroup cpu_efm32 | ||
* @{ | ||
* | ||
* @file | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
/** | ||
* @defgroup cpu_efm32 Silicon Labs EFM32/EFR32/EZR32 | ||
* @ingroup cpu | ||
* @brief Implementation of Silicon Labs's EFM32/EFR32/EZR32 MCUs | ||
* | ||
* This module contains all code and definitions for the Silicon Labs | ||
* EFM32/EFR32/EZR32 MCUs. It uses the Gecko SDK (vendor library) for the | ||
* peripheral drivers. | ||
* | ||
* | ||
* Supported Peripherals | ||
* ===================== | ||
* | ||
* The following peripherals are supported (depends on microcontroller): | ||
* - ADC | ||
* - CPUID | ||
* - DAC | ||
* - Flash page | ||
* - GPIO | ||
* - HW RNG | ||
* - I2C | ||
* - Power Management | ||
* - PWM | ||
* - RTC | ||
* - RTT | ||
* - SPI | ||
* - Timer | ||
* - UART (including low-power) | ||
* | ||
* | ||
* Clock Configuration | ||
* =================== | ||
* | ||
* By default the microcontroller will run on the internal RC-oscillator. If | ||
* an external crystal is available, you can configure it to use by setting | ||
* `CLOCK_HF=cmuSelect_HFXO`. The same applies for `CLOCK_LFA`, `CLOCK_LFB` and | ||
* `CLOCK_LFE` using `cmuSelect_LFXO`. | ||
* | ||
* If the internal RC-oscillator is not used, it will be disabled. | ||
* | ||
* Refer to the reference manual of the specific microcontroller for the | ||
* specifics. | ||
* | ||
* | ||
* EMU and CMU Configuration | ||
* ========================= | ||
* | ||
* The Energy Management Unit (EMU) and Clock Management Unit (CMU) are | ||
* initialized using default values provided by the Gecko SDK. You can override | ||
* any of the following defaults to use other values: | ||
* | ||
* - `CMU_HFXOINIT` | ||
* - `CMU_LFXOINIT` | ||
* - `EMU_DCDCINIT` | ||
* - `EMU_EM23INIT` | ||
* - `EMU_EM4INIT` | ||
* | ||
* Refer to the Gecko SDK for more information about these values. | ||
* | ||
* | ||
* Low-power Configuration | ||
* ======================= | ||
* | ||
* The EFM32/EFR32/EZR32 MCUs have support for low-power peripherals. Support | ||
* is enabled by default, but can be disabled by setting LOW_POWER_ENABLED=0. | ||
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# 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) | ||
|
||
ifeq (,$(EFM32_INFO)) | ||
$(error Unable to read CPU information for $(CPU_MODEL)) | ||
endif | ||
|
||
# Export variables to use in this build. | ||
export EFM32_FAMILY = $(word 2, $(EFM32_INFO)) | ||
export EFM32_SERIES = $(word 3, $(EFM32_INFO)) | ||
export EFM32_ARCHITECTURE = $(word 4, $(EFM32_INFO)) | ||
|
||
export EFM32_FLASH_START = $(word 5, $(EFM32_INFO)) | ||
export EFM32_FLASH_SIZE = $(word 6, $(EFM32_INFO)) | ||
export EFM32_SRAM_START = $(word 7, $(EFM32_INFO)) | ||
export EFM32_SRAM_SIZE = $(word 8, $(EFM32_INFO)) | ||
|
||
export EFM32_CRYPTO = $(word 9, $(EFM32_INFO)) | ||
export EFM32_TRNG = $(word 10, $(EFM32_INFO)) | ||
export EFM32_RADIO = $(word 11, $(EFM32_INFO)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
MODULE = cpu | ||
|
||
# (file triggers compiler bug. see #5775) | ||
SRC_NOLTO += vectors.c | ||
|
||
include $(RIOTBASE)/Makefile.base |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# This file is automatically generated, and should not be changed. There is | ||
# propbably little reason to edit this file anyway, since it should already | ||
# contain all information for the EFR32MG1P family of CPUs. | ||
|
||
# The intended usage is to grep for the exact model name, and split by spaces | ||
# to get the required information. | ||
|
||
# CPU - Family - Series - Architecture - Flash base - Flash size - SRAM base - SRAM size - Crypto? - TRNG? - Radio? | ||
efr32mg1p632f256gm32 efr32mg1p 1 cortex-m4f 0x00000000 0x00040000 0x20000000 0x00007c00 1 0 1 | ||
efr32mg1p132f256gm48 efr32mg1p 1 cortex-m4f 0x00000000 0x00040000 0x20000000 0x00007c00 1 0 1 | ||
efr32mg1p233f256gm48 efr32mg1p 1 cortex-m4f 0x00000000 0x00040000 0x20000000 0x00007c00 1 0 1 | ||
efr32mg1p132f256im32 efr32mg1p 1 cortex-m4f 0x00000000 0x00040000 0x20000000 0x00007c00 1 0 1 | ||
efr32mg1p232f256im32 efr32mg1p 1 cortex-m4f 0x00000000 0x00040000 0x20000000 0x00007c00 1 0 1 | ||
efr32mg1p133f256gm48 efr32mg1p 1 cortex-m4f 0x00000000 0x00040000 0x20000000 0x00007c00 1 0 1 | ||
efr32mg1p232f256gm48 efr32mg1p 1 cortex-m4f 0x00000000 0x00040000 0x20000000 0x00007c00 1 0 1 | ||
efr32mg1p732f256im32 efr32mg1p 1 cortex-m4f 0x00000000 0x00040000 0x20000000 0x00007c00 1 0 1 | ||
efr32mg1p232f256gj43 efr32mg1p 1 cortex-m4f 0x00000000 0x00040000 0x20000000 0x00007c00 1 0 1 | ||
efr32mg1p232f256gm32 efr32mg1p 1 cortex-m4f 0x00000000 0x00040000 0x20000000 0x00007c00 1 0 1 | ||
efr32mg1p231f256gm48 efr32mg1p 1 cortex-m4f 0x00000000 0x00040000 0x20000000 0x00007c00 1 0 1 | ||
efr32mg1p732f256gm32 efr32mg1p 1 cortex-m4f 0x00000000 0x00040000 0x20000000 0x00007c00 1 0 1 | ||
efr32mg1p232f256im48 efr32mg1p 1 cortex-m4f 0x00000000 0x00040000 0x20000000 0x00007c00 1 0 1 | ||
efr32mg1p132f256im48 efr32mg1p 1 cortex-m4f 0x00000000 0x00040000 0x20000000 0x00007c00 1 0 1 | ||
efr32mg1p632f256im32 efr32mg1p 1 cortex-m4f 0x00000000 0x00040000 0x20000000 0x00007c00 1 0 1 | ||
efr32mg1p131f256gm48 efr32mg1p 1 cortex-m4f 0x00000000 0x00040000 0x20000000 0x00007c00 1 0 1 | ||
efr32mg1p132f256gm32 efr32mg1p 1 cortex-m4f 0x00000000 0x00040000 0x20000000 0x00007c00 1 0 1 | ||
efr32mg1p233f256im48 efr32mg1p 1 cortex-m4f 0x00000000 0x00040000 0x20000000 0x00007c00 1 0 1 | ||
efr32mg1p132f256gj43 efr32mg1p 1 cortex-m4f 0x00000000 0x00040000 0x20000000 0x00007c00 1 0 1 |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,7 +7,7 @@ | |
*/ | ||
|
||
/** | ||
* @ingroup cpu_efm32_common | ||
* @ingroup cpu_efm32 | ||
* @{ | ||
* | ||
* @file | ||
|
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,7 +7,7 @@ | |
*/ | ||
|
||
/** | ||
* @ingroup cpu_efm32_common | ||
* @ingroup cpu_efm32 | ||
* @ingroup drivers_periph_adc | ||
* @{ | ||
* | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,7 +7,7 @@ | |
*/ | ||
|
||
/** | ||
* @ingroup cpu_efm32_common | ||
* @ingroup cpu_efm32 | ||
* @ingroup drivers_periph_cpuid | ||
* @{ | ||
* | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,7 +7,7 @@ | |
*/ | ||
|
||
/** | ||
* @ingroup cpu_efm32_common | ||
* @ingroup cpu_efm32 | ||
* @ingroup drivers_periph_dac | ||
* @{ | ||
* | ||
|
Oops, something went wrong.