forked from riscvarchive/riscv-binutils-gdb
-
Notifications
You must be signed in to change notification settings - Fork 0
Home
Pavel S. Smirnov edited this page Nov 23, 2016
·
4 revisions
libexpat
, python2.7-dev
Setup environment variable:
export RISCV=/home/tools32i/riscv32i
Go to work directory and invoke configuration script:
<path to configure>/configure --prefix=$RISCV --target=riscv32-unknown-elf --enable-targets=riscv32-unknown-elf
Then build
make
and then install to /home/tools32i/riscv32i/bin
make install
Run openocd (example):
src/openocd -f tcl/interface/ftdi/olimex-arm-usb-ocd-h.cfg -f tcl/target/syntacore_riscv32i.cfg
In other console run gdb:
riscv32-unknown-elf-gdb ./Debug/hello_riscv
Connect with openocd
target remote localhost:3333
Halt to access target
monitor halt
Load program
load
Setup breakpoints, etc. Run program:
c
Press CTRL-C To break execution
GDB command monitor ...
pass arguments directly to openocd