1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-12-30 08:51:19 +01:00

Merge pull request #16877 from kfessel/p-add-risc-v-cpuarch-info

cpu/riscv,gd32,fe310: add CPU_ARCH, CPU_CORE information

adds CPU_ARCH to riscv_common preparing to handle it like cortex-m does
adds CPU_CORE to gd32v and fe310

match Kconfig to Makefile changes
This commit is contained in:
Karl Fessel 2021-09-22 17:30:35 +02:00 committed by GitHub
commit c1e4a28c9b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 18 additions and 7 deletions

View File

@ -7,7 +7,7 @@
config CPU_FAM_FE310
bool
select CPU_CORE_RV32I
select CPU_CORE_RV32IMAC
select HAS_CPU_FE310
select HAS_PERIPH_CPUID
select HAS_PERIPH_GPIO
@ -42,6 +42,9 @@ config CPU_MODEL
config CPU
default "fe310" if CPU_FAM_FE310
config CPU_CORE
default "rv32imac" if CPU_CORE_RV32IMAC
rsource "Kconfig.clk"
source "$(RIOTCPU)/riscv_common/Kconfig"

View File

@ -1,3 +1,5 @@
CPU_CORE := rv32imac
FEATURES_PROVIDED += periph_cpuid
FEATURES_PROVIDED += periph_gpio periph_gpio_irq
FEATURES_PROVIDED += periph_pm

View File

@ -7,7 +7,7 @@
config CPU_FAM_GD32V
bool
select CPU_CORE_RV32I
select CPU_CORE_RV32IMAC
select HAS_CPU_GD32V
select HAS_PERIPH_CLIC
select HAS_PERIPH_GPIO
@ -37,4 +37,7 @@ config CPU_MODEL
config CPU
default "gd32v" if CPU_FAM_GD32V
config CPU_CORE
default "rv32imac" if CPU_CORE_RV32IMAC
source "$(RIOTCPU)/riscv_common/Kconfig"

View File

@ -1,3 +1,5 @@
CPU_CORE := rv32imac
FEATURES_PROVIDED += periph_clic
FEATURES_PROVIDED += periph_gpio
FEATURES_PROVIDED += periph_timer

View File

@ -15,7 +15,7 @@ config CPU_ARCH_RISCV
select MODULE_MALLOC_THREAD_SAFE if TEST_KCONFIG
select HAS_SSP
config CPU_CORE_RV32I
config CPU_CORE_RV32IMAC
bool
select CPU_ARCH_RISCV
select HAS_ARCH_32BIT
@ -27,7 +27,4 @@ config HAS_ARCH_RISCV
Indicates that the current CPU has a RISC-V.
config CPU_ARCH
default "risc-v" if CPU_ARCH_RISCV
config CPU_CORE
default "rv32i" if CPU_CORE_RV32I
default "rv32" if CPU_CORE_RV32IMAC

View File

@ -1,3 +1,7 @@
ifeq ($(findstring rv32,$(CPU_CORE)),rv32)
CPU_ARCH := rv32
endif
FEATURES_PROVIDED += arch_32bit
FEATURES_PROVIDED += arch_riscv
FEATURES_PROVIDED += cpp