1*** Keywords ***
2Create Machine
3    Execute Command                             mach create
4
5    Execute Command                             machine LoadPlatformDescriptionFromString "cpu: CPU.VexRiscv @ sysbus { cpuType: \\"rv32gc\\"; timeProvider: empty }"
6    Execute Command                             machine LoadPlatformDescriptionFromString "mem: Memory.MappedMemory @ sysbus 0x80000000 { size: 0x1000 }"
7    Execute Command                             machine LoadPlatformDescriptionFromString "uart: UART.LiteX_UART @ sysbus 0x40008000"
8
9    Execute Command                             sysbus LoadELF @https://dl.antmicro.com/projects/renode/riscv32--ebreak_custom_test.elf-s_5760-4db0870a69de9bba7ccda18908832c5b72cff35e
10
11*** Test Cases ***
12Should Generate Ebreak
13
14    Create Machine
15    Create Terminal Tester                      sysbus.uart
16
17    Start Emulation
18
19    Wait For Line On Uart                       !starting test...
20    Wait For Line On Uart                       ecall instruction from machine mode
21    Wait For Line On Uart                       ebreak instruction
22    Wait For Line On Uart                       ecall instruction from machine mode
23    Wait For Line On Uart                       ebreak instruction
24    Wait For Line On Uart                       finished test
25
26