boards: riscv: hifive1: add support for QEMU and Renode simulation

This commit adds required config files for Renode simulation and adds
missing QEMU_binary_suffix. It also adds flash and newlib tags to
ignore_tags, as flash chip is currently not provided by default in
Renode for FE310 and newlib does not fit into the available memory.

Signed-off-by: Filip Kokosinski <fkokosinski@antmicro.com>
This commit is contained in:
Filip Kokosinski 2021-09-13 11:27:04 +02:00 committed by Anas Nashif
commit 0851255258
3 changed files with 26 additions and 1 deletions

View file

@ -1,7 +1,9 @@
# SPDX-License-Identifier: Apache-2.0 # SPDX-License-Identifier: Apache-2.0
set(SUPPORTED_EMU_PLATFORMS qemu) set(SUPPORTED_EMU_PLATFORMS renode qemu)
set(RENODE_SCRIPT ${CMAKE_CURRENT_LIST_DIR}/support/hifive1.resc)
set(QEMU_binary_suffix riscv32)
set(QEMU_CPU_TYPE_${ARCH} riscv32) set(QEMU_CPU_TYPE_${ARCH} riscv32)
set(QEMU_FLAGS_${ARCH} set(QEMU_FLAGS_${ARCH}

View file

@ -5,6 +5,7 @@ arch: riscv32
toolchain: toolchain:
- zephyr - zephyr
ram: 16 ram: 16
simulation: renode
supported: supported:
- pwm - pwm
- gpio - gpio
@ -13,3 +14,5 @@ testing:
ignore_tags: ignore_tags:
- net - net
- bluetooth - bluetooth
- flash
- newlib

View file

@ -0,0 +1,20 @@
:description: This script is prepared to run Zephyr on SiFive-FE310 board.
:name: SiFive-FE310
$name?="SiFive-FE310"
using sysbus
mach create $name
machine LoadPlatformDescription @platforms/cpus/sifive-fe310.repl
sysbus Tag <0x10008000 4> "PRCI_HFROSCCFG" 0xFFFFFFFF
sysbus Tag <0x10008008 4> "PRCI_PLLCFG" 0xFFFFFFFF
cpu PerformanceInMips 320
showAnalyzer uart0
macro reset
"""
sysbus LoadELF $bin
"""
runMacro $reset