Merge pull request #14485 from leandrolanzieri/pr/kconfig/saml1x_based_symbols
boards/saml1x-based: Model features in Kconfig
This commit is contained in:
commit
3b778451e1
17
boards/common/saml1x/Kconfig
Normal file
17
boards/common/saml1x/Kconfig
Normal file
@ -0,0 +1,17 @@
|
||||
# Copyright (c) 2020 HAW Hamburg
|
||||
#
|
||||
# This file is subject to the terms and conditions of the GNU Lesser
|
||||
# General Public License v2.1. See the file LICENSE in the top level
|
||||
# directory for more details.
|
||||
|
||||
config BOARD_COMMON_SAML1X
|
||||
bool
|
||||
select HAS_PERIPH_ADC
|
||||
select HAS_PERIPH_DAC
|
||||
select HAS_PERIPH_I2C
|
||||
select HAS_PERIPH_RTC
|
||||
select HAS_PERIPH_RTT
|
||||
select HAS_PERIPH_SPI
|
||||
select HAS_PERIPH_TIMER
|
||||
select HAS_PERIPH_UART
|
||||
select HAS_RIOTBOOT
|
||||
16
boards/saml10-xpro/Kconfig
Normal file
16
boards/saml10-xpro/Kconfig
Normal file
@ -0,0 +1,16 @@
|
||||
# Copyright (c) 2020 HAW Hamburg
|
||||
#
|
||||
# This file is subject to the terms and conditions of the GNU Lesser
|
||||
# General Public License v2.1. See the file LICENSE in the top level
|
||||
# directory for more details.
|
||||
|
||||
config BOARD
|
||||
default "saml10-xpro" if BOARD_SAML10_XPRO
|
||||
|
||||
config BOARD_SAML10_XPRO
|
||||
bool
|
||||
default y
|
||||
select BOARD_COMMON_SAML1X
|
||||
select CPU_MODEL_SAML10E16A
|
||||
|
||||
source "$(RIOTBOARD)/common/saml1x/Kconfig"
|
||||
@ -1,4 +1,3 @@
|
||||
CPU_FAM = saml10
|
||||
CFLAGS += -D__SAML10E16A__
|
||||
|
||||
include $(RIOTBOARD)/common/saml1x/Makefile.include
|
||||
|
||||
16
boards/saml11-xpro/Kconfig
Normal file
16
boards/saml11-xpro/Kconfig
Normal file
@ -0,0 +1,16 @@
|
||||
# Copyright (c) 2020 HAW Hamburg
|
||||
#
|
||||
# This file is subject to the terms and conditions of the GNU Lesser
|
||||
# General Public License v2.1. See the file LICENSE in the top level
|
||||
# directory for more details.
|
||||
|
||||
config BOARD
|
||||
default "saml11-xpro" if BOARD_SAML11_XPRO
|
||||
|
||||
config BOARD_SAML11_XPRO
|
||||
bool
|
||||
default y
|
||||
select BOARD_COMMON_SAML1X
|
||||
select CPU_MODEL_SAML11E16A
|
||||
|
||||
source "$(RIOTBOARD)/common/saml1x/Kconfig"
|
||||
@ -1,4 +1,3 @@
|
||||
CPU_FAM = saml11
|
||||
CFLAGS += -D__SAML11E16A__
|
||||
|
||||
include $(RIOTBOARD)/common/saml1x/Makefile.include
|
||||
|
||||
@ -5,4 +5,47 @@
|
||||
# directory for more details.
|
||||
#
|
||||
|
||||
config CPU_COMMON_SAML1X
|
||||
bool
|
||||
select CPU_COMMON_SAM0
|
||||
select CPU_CORE_CORTEX_M23
|
||||
select HAS_CORTEXM_MPU
|
||||
select HAS_CPU_SAML1X
|
||||
select HAS_PERIPH_HWRNG
|
||||
|
||||
config CPU_FAM_SAML10
|
||||
bool
|
||||
select CPU_COMMON_SAML1X
|
||||
|
||||
config CPU_FAM_SAML11
|
||||
bool
|
||||
select CPU_COMMON_SAML1X
|
||||
|
||||
## CPU Models
|
||||
config CPU_MODEL_SAML10E16A
|
||||
bool
|
||||
select CPU_FAM_SAML10
|
||||
|
||||
config CPU_MODEL_SAML11E16A
|
||||
bool
|
||||
select CPU_FAM_SAML11
|
||||
|
||||
## Declaration of specific features
|
||||
config HAS_CPU_SAML1X
|
||||
bool
|
||||
help
|
||||
Indicates that a 'saml1x' cpu is being used.
|
||||
|
||||
## Common CPU symbols
|
||||
config CPU_FAM
|
||||
default "saml10" if CPU_FAM_SAML10
|
||||
default "saml11" if CPU_FAM_SAML11
|
||||
|
||||
config CPU_MODEL
|
||||
default "saml10e16a" if CPU_MODEL_SAML10E16A
|
||||
default "saml11e16a" if CPU_MODEL_SAML11E16A
|
||||
|
||||
config CPU
|
||||
default "saml1x" if CPU_COMMON_SAML1X
|
||||
|
||||
source "$(RIOTCPU)/sam0_common/Kconfig"
|
||||
|
||||
@ -1,5 +1,12 @@
|
||||
CPU_CORE = cortex-m23
|
||||
CPU_FAM = saml1x
|
||||
|
||||
ifneq (,$(filter saml10%,$(CPU_MODEL)))
|
||||
CPU_FAM = saml10
|
||||
else ifneq (,$(filter saml11%,$(CPU_MODEL)))
|
||||
CPU_FAM = saml11
|
||||
else
|
||||
$(error Unknown saml1x CPU Model: $(CPU_MODEL))
|
||||
endif
|
||||
|
||||
FEATURES_PROVIDED += cortexm_mpu
|
||||
FEATURES_PROVIDED += periph_hwrng
|
||||
|
||||
@ -136,6 +136,8 @@ BOARD_WHITELIST += 6lowpan-clicker \
|
||||
remote-revb \
|
||||
ruuvitag \
|
||||
same54-xpro \
|
||||
saml10-xpro \
|
||||
saml11-xpro \
|
||||
samr21-xpro \
|
||||
seeeduino_arch-pro \
|
||||
slstk3401a \
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user