Skip to content

Commit

Permalink
boards/riscv/hifive_unleashed: add Renode simulation support
Browse files Browse the repository at this point in the history
This commit adds Renode simulation support to the HiFive Unleashed
board.

Signed-off-by: Filip Kokosinski <[email protected]>
  • Loading branch information
fkokosinski authored and carlescufi committed Jun 16, 2022
1 parent 253070b commit 3ed800e
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 0 deletions.
2 changes: 2 additions & 0 deletions boards/riscv/hifive_unleashed/board.cmake
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# SPDX-License-Identifier: Apache-2.0

set(SUPPORTED_EMU_PLATFORMS renode)
set(RENODE_SCRIPT ${CMAKE_CURRENT_LIST_DIR}/support/hifive_unleashed.resc)
set(OPENOCD_USE_LOAD_IMAGE NO)

board_runner_args(openocd "--config=${BOARD_DIR}/support/openocd_hifive_unleashed.cfg")
Expand Down
4 changes: 4 additions & 0 deletions boards/riscv/hifive_unleashed/hifive_unleashed.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,14 @@ arch: riscv64
toolchain:
- zephyr
ram: 3840
simulation: renode
testing:
ignore_tags:
- net
- bluetooth
- flash
- newlib
- crypto
supported:
- gpio
- spi
25 changes: 25 additions & 0 deletions boards/riscv/hifive_unleashed/support/hifive_unleashed.resc
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
:description: This script is prepared to run Zephyr on SiFive-FU540 board.
:name: SiFive-FU540

$name?="SiFive-FU540"

using sysbus
mach create $name

set platform
"""
using "platforms/cpus/sifive-fu540.repl"

clint:
frequency: 10000000
"""

machine LoadPlatformDescriptionFromString $platform
machine PyDevFromFile @scripts/pydev/flipflop.py 0x10000000 0x100 True
showAnalyzer uart0

macro reset
"""
sysbus LoadELF $bin
"""
runMacro $reset

0 comments on commit 3ed800e

Please sign in to comment.