cpu/riscv_common: model Kconfig
This commit is contained in:
parent
34259e1e29
commit
cf753c6790
@ -12,9 +12,11 @@ config CPU_ARCH_RISCV
|
|||||||
select HAS_NEWLIB
|
select HAS_NEWLIB
|
||||||
select HAS_PERIPH_CORETIMER
|
select HAS_PERIPH_CORETIMER
|
||||||
select HAS_PICOLIBC if '$(RIOT_CI_BUILD)' != '1'
|
select HAS_PICOLIBC if '$(RIOT_CI_BUILD)' != '1'
|
||||||
select MODULE_MALLOC_THREAD_SAFE if TEST_KCONFIG
|
|
||||||
select HAS_SSP
|
select HAS_SSP
|
||||||
|
|
||||||
|
select MODULE_MALLOC_THREAD_SAFE if TEST_KCONFIG
|
||||||
|
imply MODULE_NEWLIB_NANO
|
||||||
|
|
||||||
config CPU_CORE_RV32IMAC
|
config CPU_CORE_RV32IMAC
|
||||||
bool
|
bool
|
||||||
select CPU_ARCH_RISCV
|
select CPU_ARCH_RISCV
|
||||||
@ -28,3 +30,17 @@ config HAS_ARCH_RISCV
|
|||||||
|
|
||||||
config CPU_ARCH
|
config CPU_ARCH
|
||||||
default "rv32" if CPU_CORE_RV32IMAC
|
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
|
||||||
|
|||||||
35
cpu/riscv_common/periph/Kconfig
Normal file
35
cpu/riscv_common/periph/Kconfig
Normal file
@ -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
|
||||||
@ -15,6 +15,9 @@ ifneq (,$(filter periph_init, $(USEMODULE)))
|
|||||||
periph_init% \
|
periph_init% \
|
||||||
periph_common \
|
periph_common \
|
||||||
periph_rtc_rtt \
|
periph_rtc_rtt \
|
||||||
|
periph_clic \
|
||||||
|
periph_coretimer \
|
||||||
|
periph_plic
|
||||||
#
|
#
|
||||||
PERIPH_MODULES := $(filter-out $(PERIPH_IGNORE_MODULES),\
|
PERIPH_MODULES := $(filter-out $(PERIPH_IGNORE_MODULES),\
|
||||||
$(filter periph_%,$(USEMODULE)))
|
$(filter periph_%,$(USEMODULE)))
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user