1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
RIOT/cpu/stm32l0/stm32_line.mk
William MARTIN 1d54137295 cpu/stm32l0: add stm32l010xx family
This adds support for members of the stm32l010xx family.

Co-authored-by: William MARTIN <wysman@gmail.com>
2019-12-13 14:14:28 +01:00

24 lines
631 B
Makefile

# 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