mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
cpu/stm32l0: add stm32l010xx family
This adds support for members of the stm32l010xx family. Co-authored-by: William MARTIN <wysman@gmail.com>
This commit is contained in:
parent
a88306088d
commit
1d54137295
@ -192,7 +192,14 @@ ifeq ($(STM32_TYPE), F)
|
||||
endif
|
||||
else ifeq ($(STM32_TYPE), L)
|
||||
ifeq ($(STM32_FAMILY), 0)
|
||||
ifneq (, $(filter $(STM32_MODEL2), 1 2))
|
||||
ifeq ($(STM32_MODEL2), 1)
|
||||
RAM_LEN = 2K
|
||||
ifeq ($(STM32_MODEL3), 0)
|
||||
ifeq ($(STM32_ROMSIZE), 6)
|
||||
RAM_LEN = 8K
|
||||
endif
|
||||
endif
|
||||
else ifneq (, $(filter $(STM32_MODEL2), 2))
|
||||
RAM_LEN = 2K
|
||||
else ifneq (, $(filter $(STM32_MODEL2), 3 4 5 6))
|
||||
RAM_LEN = 8K
|
||||
|
@ -72,6 +72,7 @@ typedef struct {
|
||||
|
||||
/**
|
||||
* @name EEPROM configuration
|
||||
* https://www.st.com/en/microcontrollers-microprocessors/stm32l0-series.html#products
|
||||
* @{
|
||||
*/
|
||||
#define EEPROM_START_ADDR (0x08080000)
|
||||
@ -81,6 +82,12 @@ typedef struct {
|
||||
#define EEPROM_SIZE (2048U) /* 2kB */
|
||||
#elif defined(CPU_LINE_STM32L031xx)
|
||||
#define EEPROM_SIZE (1024U) /* 1kB */
|
||||
#elif defined(CPU_LINE_STM32L010xB) || defined(CPU_LINE_STM32L011x3) || defined(CPU_LINE_STM32L011x4) || defined(CPU_LINE_STM32L021x4)
|
||||
#define EEPROM_SIZE (512U) /* 512B */
|
||||
#elif defined(CPU_LINE_STM32L010x6) || defined(CPU_LINE_STM32L010x8)
|
||||
#define EEPROM_SIZE (256U) /* 256B */
|
||||
#elif defined(CPU_LINE_STM32L010x4)
|
||||
#define EEPROM_SIZE (128U) /* 128B */
|
||||
#endif
|
||||
/** @} */
|
||||
|
||||
|
5799
cpu/stm32l0/include/vendor/stm32l010x4.h
vendored
Normal file
5799
cpu/stm32l0/include/vendor/stm32l010x4.h
vendored
Normal file
File diff suppressed because it is too large
Load Diff
5856
cpu/stm32l0/include/vendor/stm32l010x6.h
vendored
Normal file
5856
cpu/stm32l0/include/vendor/stm32l010x6.h
vendored
Normal file
File diff suppressed because it is too large
Load Diff
5852
cpu/stm32l0/include/vendor/stm32l010x8.h
vendored
Normal file
5852
cpu/stm32l0/include/vendor/stm32l010x8.h
vendored
Normal file
File diff suppressed because it is too large
Load Diff
5928
cpu/stm32l0/include/vendor/stm32l010xb.h
vendored
Normal file
5928
cpu/stm32l0/include/vendor/stm32l010xb.h
vendored
Normal file
File diff suppressed because it is too large
Load Diff
10
cpu/stm32l0/include/vendor/stm32l0xx.h
vendored
10
cpu/stm32l0/include/vendor/stm32l0xx.h
vendored
@ -132,7 +132,15 @@
|
||||
/** @addtogroup Device_Included
|
||||
* @{
|
||||
*/
|
||||
#if defined(STM32L011xx)
|
||||
#if defined(STM32L010xB)
|
||||
#include "stm32l010xb.h"
|
||||
#elif defined(STM32L010x8)
|
||||
#include "stm32l010x8.h"
|
||||
#elif defined(STM32L010x6)
|
||||
#include "stm32l010x6.h"
|
||||
#elif defined(STM32L010x4)
|
||||
#include "stm32l010x4.h"
|
||||
#elif defined(STM32L011xx)
|
||||
#include "stm32l011xx.h"
|
||||
#elif defined(STM32L021xx)
|
||||
#include "stm32l021xx.h"
|
||||
|
23
cpu/stm32l0/stm32_line.mk
Normal file
23
cpu/stm32l0/stm32_line.mk
Normal file
@ -0,0 +1,23 @@
|
||||
# Compute CPU_LINE
|
||||
LINE := $(shell echo $(CPU_MODEL) | tr 'a-z-' 'A-Z_' | sed -E -e 's/^STM32L([0-9][0-9][0-9])(.)(.)/\1 \2 \3/')
|
||||
TYPE := $(word 1, $(LINE))
|
||||
MODEL1 := $(word 2, $(LINE))
|
||||
MODEL2 := $(word 3, $(LINE))
|
||||
|
||||
ifneq (, $(filter $(TYPE), 010))
|
||||
ifneq (, $(filter $(MODEL2), 4))
|
||||
CPU_LINE = STM32L$(TYPE)x4
|
||||
else ifneq (, $(filter $(MODEL2), 6))
|
||||
CPU_LINE = STM32L$(TYPE)x6
|
||||
else ifneq (, $(filter $(MODEL2), 8))
|
||||
CPU_LINE = STM32L$(TYPE)x8
|
||||
else ifneq (, $(filter $(MODEL2), B))
|
||||
CPU_LINE = STM32L$(TYPE)xB
|
||||
endif
|
||||
else
|
||||
CPU_LINE = STM32L$(TYPE)xx
|
||||
endif
|
||||
|
||||
ifeq ($(CPU_LINE), )
|
||||
$(error Unsupported CPU)
|
||||
endif
|
Loading…
Reference in New Issue
Block a user