mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
cpu/stm32: Add Kconfig dependency modeling
This commit is contained in:
parent
4cdf93da78
commit
02a2de4916
17
boards/common/nucleo/Kconfig
Normal file
17
boards/common/nucleo/Kconfig
Normal file
@ -0,0 +1,17 @@
|
||||
# Copyright (c) 2021 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.
|
||||
#
|
||||
|
||||
if TEST_KCONFIG
|
||||
|
||||
config MODULE_BOARDS_COMMON_NUCLEO
|
||||
bool
|
||||
default y
|
||||
select MODULE_SAUL_GPIO if MODULE_SAUL_DEFAULT && HAS_PERIPH_GPIO
|
||||
help
|
||||
stm32 common nucleo code.
|
||||
|
||||
endif # TEST_KCONFIG
|
@ -13,4 +13,5 @@ config BOARD_COMMON_NUCLEO144
|
||||
select BOARD_HAS_HSE if !CPU_FAM_L4 && !CPU_FAM_L5
|
||||
select BOARD_HAS_LSE
|
||||
|
||||
source "$(RIOTBOARD)/common/nucleo/Kconfig"
|
||||
source "$(RIOTBOARD)/common/stm32/Kconfig"
|
||||
|
@ -12,4 +12,5 @@ config BOARD_COMMON_NUCLEO32
|
||||
# Clock configuration
|
||||
select BOARD_HAS_LSE if (CPU_FAM_L0 || CPU_FAM_L4) && !BOARD_NUCLEO_L011K4
|
||||
|
||||
source "$(RIOTBOARD)/common/nucleo/Kconfig"
|
||||
source "$(RIOTBOARD)/common/stm32/Kconfig"
|
||||
|
@ -13,4 +13,5 @@ config BOARD_COMMON_NUCLEO64
|
||||
select BOARD_HAS_HSE if !CPU_FAM_G0 && !CPU_FAM_L0 && !CPU_FAM_L1 && !CPU_FAM_L4
|
||||
select BOARD_HAS_LSE if !BOARD_NUCLE0_L152RE
|
||||
|
||||
source "$(RIOTBOARD)/common/nucleo/Kconfig"
|
||||
source "$(RIOTBOARD)/common/stm32/Kconfig"
|
||||
|
@ -36,4 +36,12 @@ orsource "kconfigs/*/Kconfig"
|
||||
orsource "kconfigs/*/Kconfig.lines"
|
||||
orsource "kconfigs/*/Kconfig.models"
|
||||
|
||||
if TEST_KCONFIG
|
||||
|
||||
rsource "periph/Kconfig"
|
||||
rsource "stmclk/Kconfig"
|
||||
rsource "vectors/Kconfig"
|
||||
|
||||
endif # TEST_KCONFIG
|
||||
|
||||
source "$(RIOTCPU)/cortexm_common/Kconfig"
|
||||
|
@ -51,4 +51,11 @@ ifneq (,$(filter $(CPU_MODEL),$(STM32_WITH_MPU)))
|
||||
FEATURES_PROVIDED += cortexm_mpu
|
||||
endif
|
||||
|
||||
# Add stm32 configs after including cortexm_common so stm32 takes precendence
|
||||
# This configuration enables modules that are only available when using Kconfig
|
||||
# module modelling
|
||||
ifeq (1, $(TEST_KCONFIG))
|
||||
KCONFIG_ADD_CONFIG += $(RIOTCPU)/stm32/stm32.config
|
||||
endif
|
||||
|
||||
include $(RIOTCPU)/cortexm_common/Makefile.features
|
||||
|
28
cpu/stm32/periph/Kconfig
Normal file
28
cpu/stm32/periph/Kconfig
Normal file
@ -0,0 +1,28 @@
|
||||
# Copyright (c) 2021 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 MODULE_PERIPH
|
||||
bool
|
||||
default y
|
||||
select MODULE_XTIMER if MODULE_PERIPH_USBDEV
|
||||
help
|
||||
stm32 common peripheral code.
|
||||
|
||||
config MODULE_PERIPH_UART_NONBLOCKING
|
||||
depends on HAS_PERIPH_UART_NONBLOCKING
|
||||
depends on MODULE_PERIPH_UART
|
||||
select MODULE_TSRB
|
||||
|
||||
config MODULE_PERIPH_CAN
|
||||
bool
|
||||
depends on HAS_PERIPH_CAN
|
||||
depends on HAS_PERIPH_GPIO
|
||||
depends on HAS_PERIPH_GPIO_IRQ
|
||||
select MODULE_PERIPH_GPIO_IRQ
|
||||
select MODULE_PERIPH_I2C
|
||||
help
|
||||
STM32 CAN peripheral controller.
|
1
cpu/stm32/stm32.config
Normal file
1
cpu/stm32/stm32.config
Normal file
@ -0,0 +1 @@
|
||||
CONFIG_MODULE_PM_LAYERED=y
|
10
cpu/stm32/stmclk/Kconfig
Normal file
10
cpu/stm32/stmclk/Kconfig
Normal file
@ -0,0 +1,10 @@
|
||||
# Copyright (c) 2021 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 MODULE_STM32_CLK
|
||||
bool
|
||||
default y
|
10
cpu/stm32/vectors/Kconfig
Normal file
10
cpu/stm32/vectors/Kconfig
Normal file
@ -0,0 +1,10 @@
|
||||
# Copyright (c) 2021 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 MODULE_STM32_VECTORS
|
||||
bool
|
||||
default y
|
Loading…
Reference in New Issue
Block a user