Skip to content

Commit

Permalink
Run RISC-V emulator just spike pk
Browse files Browse the repository at this point in the history
  * "bbl loader" message suppressed
  * `pk` can be loaded without fullpath (if spike is appropriate)
  • Loading branch information
tyfkda committed Dec 6, 2024
1 parent bc9e045 commit 04bd8b3
Showing 1 changed file with 2 additions and 18 deletions.
20 changes: 2 additions & 18 deletions tool/run-riscv64
Original file line number Diff line number Diff line change
@@ -1,21 +1,5 @@
#!/bin/bash

THISDIR=$(cd "$(dirname "$0")";pwd)
set -e

# Execute RISC-V executable on Spike
prefix=`${THISDIR}/find-riscv-toolchain` || exit 1
pk="${RISCV}/${prefix}/bin/pk"

# Eliminate "bbl loader" message
first=1
spike "$RISCV/$prefix/bin/pk" "$@" | while IFS= read LINE
do
if [[ $first -eq 1 ]]; then
first=0
if [[ "$LINE" =~ bbl\ loader ]]; then
continue
fi
fi
echo "$LINE"
done
exit "${PIPESTATUS[0]}"
spike pk "$@"

0 comments on commit 04bd8b3

Please sign in to comment.