diff --git a/cpu/riscv_common/Kconfig b/cpu/riscv_common/Kconfig index 500c0a0016..3a0c8d46fe 100644 --- a/cpu/riscv_common/Kconfig +++ b/cpu/riscv_common/Kconfig @@ -12,9 +12,11 @@ config CPU_ARCH_RISCV select HAS_NEWLIB select HAS_PERIPH_CORETIMER select HAS_PICOLIBC if '$(RIOT_CI_BUILD)' != '1' - select MODULE_MALLOC_THREAD_SAFE if TEST_KCONFIG select HAS_SSP + select MODULE_MALLOC_THREAD_SAFE if TEST_KCONFIG + imply MODULE_NEWLIB_NANO + config CPU_CORE_RV32IMAC bool select CPU_ARCH_RISCV @@ -28,3 +30,17 @@ config HAS_ARCH_RISCV config CPU_ARCH default "rv32" if CPU_CORE_RV32IMAC + +config MODULE_RISCV_COMMON + bool + default y + depends on TEST_KCONFIG && CPU_ARCH_RISCV + select MODULE_MALLOC_THREAD_SAFE + help + Common code for RISC-V architecture. + +rsource "periph/Kconfig" + +choice LIBC_IMPLEMENTATION + default MODULE_NEWLIB +endchoice diff --git a/cpu/riscv_common/periph/Kconfig b/cpu/riscv_common/periph/Kconfig new file mode 100644 index 0000000000..1718db641b --- /dev/null +++ b/cpu/riscv_common/periph/Kconfig @@ -0,0 +1,35 @@ +# 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_RISCV_COMMON_PERIPH + bool + default y + depends on TEST_KCONFIG && CPU_ARCH_RISCV + help + Common peripheral code for RISC-V architecture. + +if MODULE_RISCV_COMMON_PERIPH + +config MODULE_PERIPH_CLIC + bool + depends on HAS_PERIPH_CLIC + help + Core-Local interrupt controller driver. + +config MODULE_PERIPH_CORETIMER + bool + depends on HAS_PERIPH_CORETIMER + help + Low-level timer driver based on the Core-local Interrupt (CLINT) + +config MODULE_PERIPH_PLIC + bool + depends on HAS_PERIPH_PLIC + help + Platform-Level interrupt controller driver. + +endif # MODULE_RISCV_COMMON_PERIPH diff --git a/makefiles/features_modules.inc.mk b/makefiles/features_modules.inc.mk index de95d7c4d8..abde96c438 100644 --- a/makefiles/features_modules.inc.mk +++ b/makefiles/features_modules.inc.mk @@ -15,6 +15,9 @@ ifneq (,$(filter periph_init, $(USEMODULE))) periph_init% \ periph_common \ periph_rtc_rtt \ + periph_clic \ + periph_coretimer \ + periph_plic # PERIPH_MODULES := $(filter-out $(PERIPH_IGNORE_MODULES),\ $(filter periph_%,$(USEMODULE)))