2020-03-10 08:41:07 +00:00
|
|
|
# Boot Renode Script (boot.resc)
|
|
|
|
|
|
2020-03-12 05:33:37 +00:00
|
|
|
# Add this script's path to the global path, so
|
|
|
|
|
# we can include files relative to ourselves.
|
|
|
|
|
path add $ORIGIN
|
|
|
|
|
|
2020-03-10 04:04:17 +00:00
|
|
|
using sysbus
|
|
|
|
|
mach create
|
|
|
|
|
|
2020-03-10 08:41:07 +00:00
|
|
|
# Add peripherals that are defined in C#. You must restart Renode
|
|
|
|
|
# if you modify these files.
|
|
|
|
|
i @peripherals/LiteX_Timer_32.cs
|
2020-03-17 02:27:03 +00:00
|
|
|
i @peripherals/memlcd.cs
|
|
|
|
|
i @peripherals/keyboard.cs
|
2020-03-10 04:04:17 +00:00
|
|
|
|
2020-03-10 08:41:07 +00:00
|
|
|
# Load the Betrusted Renode Platform file
|
|
|
|
|
machine LoadPlatformDescription @betrusted.repl
|
|
|
|
|
|
|
|
|
|
machine StartGdbServer 3333 true
|
|
|
|
|
showAnalyzer uart
|
2020-03-13 12:33:08 +00:00
|
|
|
showAnalyzer uartlog
|
2020-08-10 08:06:38 +00:00
|
|
|
showAnalyzer uartkernel
|
2020-08-17 12:01:26 +00:00
|
|
|
showAnalyzer memlcd
|
2020-03-10 04:04:17 +00:00
|
|
|
|
2020-03-30 08:07:58 +00:00
|
|
|
logLevel -1 kbd
|
|
|
|
|
|
2020-03-10 04:04:17 +00:00
|
|
|
# The macro `reset` gets called implicitly when running `machine Reset`
|
|
|
|
|
macro reset
|
|
|
|
|
"""
|
2020-08-17 12:01:26 +00:00
|
|
|
sysbus LoadELF @../target/riscv32imac-unknown-none-elf/release/loader
|
|
|
|
|
sysbus LoadBinary @../target/riscv32imac-unknown-none-elf/release/args.bin 0x40800000
|
2020-03-10 04:04:17 +00:00
|
|
|
# Set $a0 to point at the args binary
|
|
|
|
|
cpu SetRegisterUnsafe 10 0x40800000
|
|
|
|
|
# cpu PC 0x20500000
|
|
|
|
|
"""
|
|
|
|
|
|
|
|
|
|
runMacro $reset
|
|
|
|
|
start
|