-
Notifications
You must be signed in to change notification settings - Fork 6
OpenOCD for sc_riscv32
You will need to install several packages to compile and run OpenOCD. Open a terminal window and type:
sudo apt-get install make libtool autoconf texinfo libusb-dev doxygen
See http://elinux.org/Compiling_OpenOCD
Clone any available repository to working directory
git clone -b syntacore_riscv32i --recursive https://github.com/syntacore/openocd.git openocd
Go to working directory and create Makefile
./bootstrap
./configure --enable-maintainer-mode --disable-werror --enable-ftdi
Invoke the make
nice make -j
If build is successful, you can install OpenOCD and headers
sudo make install
To deinstall library and headers
sudo make uninstall
Run OpenOCD as TCP server with selected configuration files (even without install).
Use sudo if policy for your USB device is not configured.
For example ./tcl folder contains set of configuration files, using olimex-arm-usb-ocd interface for syntacore_riscv32i 2 TAPs target:
sudo src/openocd -f tcl/interface/ftdi/olimex-arm-usb-ocd.cfg -f tcl/target/syntacore_riscv32i_2tap.cfg |& tee ocd.log
After initialization OpenOCD waiting for command from the network.
Run telnet application in other console:
telnet localhost 4444
Print help to show list of commands.
For example:
targets sc_rv32i0.cpu
halt
load_image /home/tools32i/test/scr5-baremetal-example/build/scr-test.elf
resume 0x200
halt
shutdown
Enter the shutdown command to close remote OpenOCD application.