don't start EC during swap debug

This commit is contained in:
bunnie 2024-05-08 07:22:58 +08:00
parent 1f12a97b64
commit 3d98b28055
2 changed files with 130 additions and 130 deletions

View file

@ -1,121 +1,121 @@
# Boot Renode Script (boot.resc) # Boot Renode Script (boot.resc)
# Add this script's path to the global path, so # Add this script's path to the global path, so
# we can include files relative to ourselves. # we can include files relative to ourselves.
path add $ORIGIN path add $ORIGIN
using sysbus using sysbus
# Add peripherals that are defined in C#. You must restart Renode # Add peripherals that are defined in C#. You must restart Renode
# if you modify these files. # if you modify these files.
i @peripherals/ABRTCMC.cs i @peripherals/ABRTCMC.cs
i @peripherals/BetrustedEcI2C.cs i @peripherals/BetrustedEcI2C.cs
i @peripherals/BetrustedSocI2C.cs i @peripherals/BetrustedSocI2C.cs
i @peripherals/BetrustedSpinor.cs i @peripherals/BetrustedSpinor.cs
# i @peripherals/BetrustedWatchdog.cs # i @peripherals/BetrustedWatchdog.cs
i @peripherals/BQ24157.cs i @peripherals/BQ24157.cs
i @peripherals/BQ27421.cs i @peripherals/BQ27421.cs
i @peripherals/BtEvents.cs i @peripherals/BtEvents.cs
i @peripherals/ComConnector.cs i @peripherals/ComConnector.cs
EnsureTypeIsLoaded "Antmicro.Renode.Peripherals.SPI.Betrusted.IComPeripheral" EnsureTypeIsLoaded "Antmicro.Renode.Peripherals.SPI.Betrusted.IComPeripheral"
EnsureTypeIsLoaded "Antmicro.Renode.Peripherals.SPI.Betrusted.IComController" EnsureTypeIsLoaded "Antmicro.Renode.Peripherals.SPI.Betrusted.IComController"
i @peripherals/ComEc.cs i @peripherals/ComEc.cs
i @peripherals/ComSoC.cs i @peripherals/ComSoC.cs
i @peripherals/EcPower.cs i @peripherals/EcPower.cs
i @peripherals/EcWifi.cs i @peripherals/EcWifi.cs
i @peripherals/engine.cs i @peripherals/engine.cs
i @peripherals/Jtag.cs i @peripherals/Jtag.cs
i @peripherals/keyboard.cs i @peripherals/keyboard.cs
i @peripherals/keyrom.cs i @peripherals/keyrom.cs
i @peripherals/LiteX_Timer_32.cs i @peripherals/LiteX_Timer_32.cs
i @peripherals/LM3509.cs i @peripherals/LM3509.cs
i @peripherals/LSM6DS3.cs i @peripherals/LSM6DS3.cs
i @peripherals/memlcd.cs i @peripherals/memlcd.cs
i @peripherals/MXIC_MX66UM1G45G.cs i @peripherals/MXIC_MX66UM1G45G.cs
i @peripherals/sha512.cs i @peripherals/sha512.cs
i @peripherals/spinor_soft_int.cs i @peripherals/spinor_soft_int.cs
i @peripherals/ticktimer.cs i @peripherals/ticktimer.cs
i @peripherals/trng_kernel.cs i @peripherals/trng_kernel.cs
i @peripherals/trng_server.cs i @peripherals/trng_server.cs
i @peripherals/TLV320AIC3100.cs i @peripherals/TLV320AIC3100.cs
i @peripherals/TUSB320LAI.cs i @peripherals/TUSB320LAI.cs
i @peripherals/WF200.cs i @peripherals/WF200.cs
i @peripherals/wfi.cs i @peripherals/wfi.cs
EnsureTypeIsLoaded "Antmicro.Renode.Peripherals.CPU.VexRiscv" EnsureTypeIsLoaded "Antmicro.Renode.Peripherals.CPU.VexRiscv"
i @peripherals/vexriscv-aes.cs i @peripherals/vexriscv-aes.cs
EnsureTypeIsLoaded "Antmicro.Renode.Peripherals.Timers.Betrusted.TickTimer" EnsureTypeIsLoaded "Antmicro.Renode.Peripherals.Timers.Betrusted.TickTimer"
i @peripherals/susres.cs i @peripherals/susres.cs
# Create the COM SPI bus # Create the COM SPI bus
emulation CreateComConnector "com" emulation CreateComConnector "com"
############### Define the Betrusted SoC ############### ############### Define the Betrusted SoC ###############
mach create "SoC" mach create "SoC"
machine LoadPlatformDescription @soc/betrusted-swap.repl machine LoadPlatformDescription @soc/betrusted-swap.repl
machine StartGdbServer 3333 true machine StartGdbServer 3333 true
showAnalyzer uart showAnalyzer uart
showAnalyzer console showAnalyzer console
showAnalyzer app_uart showAnalyzer app_uart
showAnalyzer memlcd showAnalyzer memlcd
# sysbus LogPeripheralAccess engine true # sysbus LogPeripheralAccess engine true
# sysbus LogPeripheralAccess sha512 true # sysbus LogPeripheralAccess sha512 true
# sysbus LogPeripheralAccess i2c true # sysbus LogPeripheralAccess i2c true
# sysbus LogPeripheralAccess trng_kernel true # sysbus LogPeripheralAccess trng_kernel true
sysbus Tag <0xB0000000, 0xB0006000> "Framebuffer" sysbus Tag <0xB0000000, 0xB0006000> "Framebuffer"
# logLevel -1 keyboard # logLevel -1 keyboard
# logLevel -1 ticktimer # logLevel -1 ticktimer
# logLevel -1 engine # logLevel -1 engine
# logLevel -1 i2c # logLevel -1 i2c
# logLevel -1 i2c.abracom_rtc # logLevel -1 i2c.abracom_rtc
# logLevel -1 sha512 # logLevel -1 sha512
# logLevel -1 sysbus.spinor.flash # logLevel -1 sysbus.spinor.flash
# sysbus LogPeripheralAccess spinor true # sysbus LogPeripheralAccess spinor true
# Silence GPIO # Silence GPIO
sysbus SilenceRange <0xf0003000, 0xF0003FFF> sysbus SilenceRange <0xf0003000, 0xF0003FFF>
# Silence POWER # Silence POWER
sysbus SilenceRange <0xF0014000 100> sysbus SilenceRange <0xF0014000 100>
# Attach the flash backing to the filesystem # Attach the flash backing to the filesystem
sysbus.spinor.flash BackingFile $ORIGIN/../tools/pddb-images/renode.bin sysbus.spinor.flash BackingFile $ORIGIN/../tools/pddb-images/renode.bin
# Load the SPI flash into RAM # Load the SPI flash into RAM
sysbus LoadBinary @../utralib/renode/soc_csr.bin 0x20000000 sysbus LoadBinary @../utralib/renode/soc_csr.bin 0x20000000
# Connect the SoC to the SPI bus # Connect the SoC to the SPI bus
connector Connect sysbus.com com connector Connect sysbus.com com
# The macro `reset` gets called implicitly when running `machine Reset` # The macro `reset` gets called implicitly when running `machine Reset`
macro reset macro reset
""" """
#sysbus LoadBinary @flash-formatted.bin 0x20000000 #sysbus LoadBinary @flash-formatted.bin 0x20000000
sysbus LoadBinary @../target/riscv32imac-unknown-xous-elf/release/loader.bin 0x20500000 sysbus LoadBinary @../target/riscv32imac-unknown-xous-elf/release/loader.bin 0x20500000
sysbus LoadBinary @../target/riscv32imac-unknown-xous-elf/release/xous.img 0x20980000 sysbus LoadBinary @../target/riscv32imac-unknown-xous-elf/release/xous.img 0x20980000
sysbus LoadBinary @../target/riscv32imac-unknown-xous-elf/release/swap.img 0x21200000 sysbus LoadBinary @../target/riscv32imac-unknown-xous-elf/release/swap.img 0x21200000
# Set $a0 to point at the args binary # Set $a0 to point at the args binary
cpu SetRegisterUnsafe 10 0x20980000 cpu SetRegisterUnsafe 10 0x20980000
cpu PC 0x20501000 cpu PC 0x20501000
""" """
# Connect the serial port to an Ethernet port # Connect the serial port to an Ethernet port
emulation CreateServerSocketTerminal 8888 "kernel" False emulation CreateServerSocketTerminal 8888 "kernel" False
connector Connect sysbus.uart kernel connector Connect sysbus.uart kernel
# Connect the `app_uart` port -- which is the port on which # Connect the `app_uart` port -- which is the port on which
# the Xous gdbserver runs -- to TCP port 3456, to allow for # the Xous gdbserver runs -- to TCP port 3456, to allow for
# application-aware debugging # application-aware debugging
emulation CreateServerSocketTerminal 3456 "gdb" False emulation CreateServerSocketTerminal 3456 "gdb" False
connector Connect sysbus.app_uart gdb connector Connect sysbus.app_uart gdb
runMacro $reset runMacro $reset
mach clear mach clear
start start

View file

@ -1,10 +1,10 @@
i @emulation/betrusted-swap.resc i @emulation/betrusted-swap.resc
# i @emulation/linux-server.resc # i @emulation/linux-server.resc
# Connect EC to the switch # Connect EC to the switch
# mach set "EC" # mach set "EC"
# connector Connect sysbus.wifi.wf200 switch # connector Connect sysbus.wifi.wf200 switch
# mach clear # mach clear
start start