From 249796cec94d75ff10ca034153e206a319e87158 Mon Sep 17 00:00:00 2001 From: Tim Newsome Date: Tue, 24 Sep 2019 10:41:09 -0700 Subject: Redo the debug README. (#205) Hopefully this is enough information that I can simply point people who submit OpenOCD changes to it, and they can run the tests themselves. --- debug/README.md | 45 +++++++++++++++++++-------------------------- 1 file changed, 19 insertions(+), 26 deletions(-) (limited to 'debug/README.md') diff --git a/debug/README.md b/debug/README.md index 1a802cf..3dc1f2d 100644 --- a/debug/README.md +++ b/debug/README.md @@ -6,33 +6,31 @@ perform an end-to-end test, communicating with gdb and OpenOCD. If a simulator or hardware passes all these tests, then you can be pretty confident that the actual debug interface is functioning correctly. -Targets -======= +Requirements +============ +The following should be in the user's path: +* riscv64-unknown-elf-gcc +* riscv64-unknown-elf-gdb (can be overridden with `--gdb` when running gdbserver.py manually) +* spike (can be overridden with `--sim_cmd` when running gdbserver.py manually) +* openocd (can be overridden with `--server_cmd` when running gdbserver.py manually) + +Usage +===== +To run a quick smoke test against spike, run `make`. For a more comprehensive +test against a variety of spike configurations, run `make all`. + +To run tests against hardware, or a specific spike configuration, manually +invoke gdbserver.py: `./gdbserver.py targets/.py` -64-bit Spike ------------- - -`./gdbserver.py targets/RISC-V/spike64.py` - -32-bit Spike ------------- - -`./gdbserver.py targets/RISC-V/spike32.py` - -32-bit SiFive Core on Supported FPGA Boards & Hardware ------------------------------------------------------- - -`./gdbserver.py targets/SiFive/E300.py` -`./gdbserver.py targets/SiFive/HiFive1.py` - -Custom Target -------------- +You can run just a single test by specifying any part of its name on the +command line, eg: `./gdbserver.py targets/RISC-V/spike64.py S0` runs +SimpleS0Test. Once that test has failed, you can look at the log file to get +an idea of what might have gone wrong. For custom targets, you can create a .py file anywhere and pass its path on the command line. The Targets class in `targets.py` contains documentation on what every variable means. - Log Files ========= @@ -42,11 +40,6 @@ per test. If a test fails, this is where to look. Debug Tips ========== -You can run just a single test by specifying any part of its name on the -command line, eg: `./gdbserver.py targets/RISC-V/spike64.py S0` runs -SimpleS0Test. Once that test has failed, you can look at the log file to get -an idea of what might have gone wrong. - You can see what spike is doing by adding `-l` to the spike command, eg.: `./gdbserver.py --sim_cmd "$RISCV/bin/spike -l" targets/RISC-V/spike32.py Breakpoint` -- cgit v1.1