Merge pull request #14338 from aabadie/pr/cpu/fe310_kconfig
cpu/fe310: boards/hifive1*: model features in Kconfig
This commit is contained in:
commit
cd3b1515a0
19
boards/hifive1/Kconfig
Normal file
19
boards/hifive1/Kconfig
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
# Copyright (c) 2020 Inria
|
||||||
|
#
|
||||||
|
# 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 "hifive1" if BOARD_HIFIVE1
|
||||||
|
|
||||||
|
config BOARD_HIFIVE1
|
||||||
|
bool
|
||||||
|
default y
|
||||||
|
select CPU_MODEL_FE310_G000
|
||||||
|
select HAS_PERIPH_RTC
|
||||||
|
select HAS_PERIPH_RTT
|
||||||
|
select HAS_PERIPH_SPI
|
||||||
|
select HAS_PERIPH_TIMER
|
||||||
|
select HAS_PERIPH_UART
|
||||||
21
boards/hifive1b/Kconfig
Normal file
21
boards/hifive1b/Kconfig
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
# Copyright (c) 2020 Inria
|
||||||
|
#
|
||||||
|
# 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 "hifive1b" if BOARD_HIFIVE1B
|
||||||
|
|
||||||
|
config BOARD_HIFIVE1B
|
||||||
|
bool
|
||||||
|
default y
|
||||||
|
select CPU_MODEL_FE310_G002
|
||||||
|
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_ARDUINO
|
||||||
63
cpu/fe310/Kconfig
Normal file
63
cpu/fe310/Kconfig
Normal file
@ -0,0 +1,63 @@
|
|||||||
|
# Copyright (c) 2020 Inria
|
||||||
|
#
|
||||||
|
# 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 CPU_ARCH_RISCV
|
||||||
|
bool
|
||||||
|
select HAS_ARCH_RISCV
|
||||||
|
|
||||||
|
config CPU_CORE_RV32M
|
||||||
|
bool
|
||||||
|
select CPU_ARCH_RISCV
|
||||||
|
select HAS_ARCH_32BIT
|
||||||
|
|
||||||
|
config CPU_FAM_FE310
|
||||||
|
bool
|
||||||
|
select CPU_CORE_RV32M
|
||||||
|
select HAS_CPU_FE310
|
||||||
|
select HAS_PERIPH_CPUID
|
||||||
|
select HAS_PERIPH_GPIO
|
||||||
|
select HAS_PERIPH_GPIO_IRQ
|
||||||
|
select HAS_PERIPH_PM
|
||||||
|
select HAS_PERIPH_WDT
|
||||||
|
select HAS_CPP
|
||||||
|
select HAS_SSP
|
||||||
|
|
||||||
|
config CPU_MODEL_FE310_G000
|
||||||
|
bool
|
||||||
|
select CPU_FAM_FE310
|
||||||
|
|
||||||
|
config CPU_MODEL_FE310_G002
|
||||||
|
bool
|
||||||
|
select CPU_FAM_FE310
|
||||||
|
|
||||||
|
## Definition of specific features
|
||||||
|
config HAS_ARCH_RISCV
|
||||||
|
bool
|
||||||
|
help
|
||||||
|
Indicates that the current CPU has a RISC-V.
|
||||||
|
|
||||||
|
## Definition of specific features
|
||||||
|
config HAS_CPU_FE310
|
||||||
|
bool
|
||||||
|
help
|
||||||
|
Indicates that a 'fe310' cpu is being used.
|
||||||
|
|
||||||
|
config CPU_ARCH
|
||||||
|
default "risc-v" if CPU_ARCH_RISCV
|
||||||
|
|
||||||
|
config CPU_CORE
|
||||||
|
default "rv32m" if CPU_CORE_RV32M
|
||||||
|
|
||||||
|
config CPU_FAM
|
||||||
|
default "fe310" if CPU_FAM_FE310
|
||||||
|
|
||||||
|
config CPU_MODEL
|
||||||
|
default "fe310_g000" if CPU_MODEL_FE310_G000
|
||||||
|
default "fe310_g002" if CPU_MODEL_FE310_G002
|
||||||
|
|
||||||
|
config CPU
|
||||||
|
default "fe310" if CPU_FAM_FE310
|
||||||
@ -17,6 +17,8 @@ BOARD_WHITELIST += arduino-duemilanove \
|
|||||||
chronos \
|
chronos \
|
||||||
derfmega128 \
|
derfmega128 \
|
||||||
derfmega256 \
|
derfmega256 \
|
||||||
|
hifive1 \
|
||||||
|
hifive1b \
|
||||||
ikea-tradfri \
|
ikea-tradfri \
|
||||||
mega-xplained \
|
mega-xplained \
|
||||||
microduino-corerf \
|
microduino-corerf \
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user