Small RISC-V spike demo improvements (#554)

* Put XLEN into .o files.

Makes it easier to work on voth RV32 and RV64 binaries side-by-side.

* Let the debugger disable HTIF use.

* Makefile now links the binary at BASE_ADDRESS

I need this so I can easily generate the appropriate binaries for
riscv-tests/debug. Unfortunately there doesn't seem to be any good
mechanism to externally define values for lds files, so I'm running it
through the C preprocessor.

Co-authored-by: Joseph Julicher <jjulicher@mac.com>
This commit is contained in:
Tim Newsome 2021-04-08 15:03:10 -07:00 committed by GitHub
parent f87eb7d0d4
commit c280f26c1b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 31 additions and 17 deletions

View file

@ -67,20 +67,20 @@ $ export PATH=~/x-tools/riscv64-unknown-elf/bin:$PATH
To build, simply run `make`. If you want a debug build, pass `DEBUG=1`. If
you want an RV64 build, pass `XLEN=64`.
The resulting executable file is ./build/RTOSDemo.axf.
The resulting executable file is ./build/RTOSDemo32.axf or ./build/RTOSDemo64.axf.
## How to run
RV32:
```
$ spike -p1 --isa RV32IMA -m0x80000000:0x10000000 --rbb-port 9824 \
./build/RTOSDemo.axf
./build/RTOSDemo32.axf
```
RV64:
```
$ spike -p1 --isa RV64IMA -m0x80000000:0x10000000 --rbb-port 9824 \
./build/RTOSDemo.axf
./build/RTOSDemo64.axf
```
## How to debug with gdb