Skip to content

Commit

Permalink
install gdb
Browse files Browse the repository at this point in the history
  • Loading branch information
wsipak committed Oct 1, 2024
1 parent a92435d commit 6154a2f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
4 changes: 3 additions & 1 deletion .github/scripts/gdb_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,9 @@ source `dirname ${BASH_SOURCE[0]}`/utils.sh

terminate_all () {
terminate ${OPENOCD_PID}
terminate ${SIM_PID}
echo "waiting for the simulation to end"
wait ${SIM_PID}
# terminate ${SIM_PID}
}

print_logs () {
Expand Down
9 changes: 7 additions & 2 deletions .github/workflows/test-openocd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ jobs:
cpanminus ccache ninja-build gcc-riscv64-unknown-elf
pip3 install meson
sudo cpanm Bit::Vector
wget https://github.com/riscv-collab/riscv-gnu-toolchain/releases/download/2024.09.03/riscv64-elf-ubuntu-22.04-gcc-nightly-2024.09.03-nightly.tar.gz
tar -xzf riscv64-elf-ubuntu-22.04-gcc-nightly-2024.09.03-nightly.tar.gz
mv riscv /opt/
- name: Setup Cache Metadata
id: cache_metadata
Expand Down Expand Up @@ -92,7 +95,8 @@ jobs:
- name: Test with GDB-test (register access)
run: |
export PATH=/opt/verilator/bin:/opt/openocd/bin:$PATH
# TODO GDB is in /opt/riscv and a separate toolchain is installed with apt. Make this better.
export PATH=/opt/riscv/bin:/opt/verilator/bin:/opt/openocd/bin:$PATH
export RV_ROOT=$(pwd)
mkdir reg_test
make -C reg_test -f ${RV_ROOT}/tools/Makefile verilator-build program.hex TEST=infinite_loop \
Expand All @@ -103,7 +107,8 @@ jobs:
- name: Test with GDB-test (memory access)
run: |
export PATH=/opt/verilator/bin:/opt/openocd/bin:$PATH
# TODO GDB is in /opt/riscv and a separate toolchain is installed with apt. Make this better.
export PATH=/opt/riscv/bin:/opt/verilator/bin:/opt/openocd/bin:$PATH
export RV_ROOT=$(pwd)
mkdir mem_test
make -C mem_test -f ${RV_ROOT}/tools/Makefile verilator-build program.hex TEST=infinite_loop \
Expand Down

0 comments on commit 6154a2f

Please sign in to comment.