1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
RIOT/cpu/sam0_common/sam0_info.mk
2022-02-21 15:13:29 +01:00

15 lines
531 B
Makefile

# Extract SAM0 infos from CPU_MODEL
# Example for saml21e15b
# - SAM0_FAMILY: l
# - SAM0_SERIES: 21
# - SAM0_PINCNT: e (32 Pins)
# - SAM0_DENSITY: 15 (32k Flash)
# - SAM0_VARIANT: b (release stepping)
SAM0_INFO := $(shell echo $(CPU_MODEL) | sed -E -e 's/^sam(d|e|l|r)([0-9][0-9])([a-z])([0-9][0-9])(.)?/\1 \2 \3 \4 \5/')
SAM0_FAMILY := $(word 1, $(SAM0_INFO))
SAM0_SERIES := $(word 2, $(SAM0_INFO))
SAM0_PINCNT := $(word 3, $(SAM0_INFO))
SAM0_DENSITY := $(word 4, $(SAM0_INFO))
SAM0_VARIANT := $(word 5, $(SAM0_INFO))