Update Kelvin simulation/debug doc Add Kelvin ISS usage Change-Id: I012808ad08de2cd679e272950894ad8dd7c9b527
diff --git a/KelvinIssDebugging.md b/KelvinIssDebugging.md index 14f4603..8266441 100644 --- a/KelvinIssDebugging.md +++ b/KelvinIssDebugging.md
@@ -8,7 +8,28 @@ [MPACT_Sim](https://github.com/google/mpact-sim) and supports all the kelvin instructions. It is used for single-core testing and debugging. -**TODO** Add kelvin sim CLI instructions when it sits in `sim/kelvin` +Running the Kelvin SW binary can be done with the following CLIs + +```bash +source build/setup.sh +m kelvin_sim +sim_kelvin <elf file path> +``` + +The bash function detects the file type by ELF's *magic_bytes* and launches the `kelvin_sim`. `kelvin_sim` runs the exetuable, and depends on the terminator ops +`mpause` or `ebreak`, it prints out different messages before exit the simulator. + +Illegal instruction also terminates the simulation, with the fault PC printed out. + +### Debug Kelvin SW via Kelvin Sim + +```bash +sim_kelvin <elf file path> debug +``` + +It launches `kelvin_sim` in the interactive mode. It acts as a debugger, with +`break`, `run`, and `step` available for instructions. Use `help` to see the +supported debug functions. ## Running Kelvin ISS with Renode @@ -21,7 +42,7 @@ ```bash source build/setup.sh - +m renode sim_kelvin <location of the kelvin SW .bin file> ```