JTAG On-Chip Debugger #28
Replies: 4 comments 6 replies
-
OpenOCD already supports an interface to GDB using TCP port 3333 |
Beta Was this translation helpful? Give feedback.
-
I have been experimenting with However, I've tried to setup a simple "tutorial" that explains how to do a simple debugging of the Link: https://stnolting.github.io/neorv32/#_debugging_using_the_on_chip_debugger If you like, you can try it by yourself. 🚀 |
Beta Was this translation helpful? Give feedback.
-
Awesome, congrats!! |
Beta Was this translation helpful? Give feedback.
-
Hi, I am experimenting with neorv32 on a ColorLight i9 board, which comprises an Lattice ECP5 FPGA. This board features an DAP programming interface, which is directly connected to ECP5 JTAG port. Programming of FPGA works normally using ECPDAP. In order to avoid the use of an additional FTDI based JTAG interface solely for debugging the neorv32, I tried to use the ECP5 primitive called JTAGG to connect neorv32 into JTAG chain and then use OpenOCD in similar fashion as described in the neorv32 documentation. Table 416 in Lattice reference manual explains the JTAGG signals: There is a complete set of signals, which are connected directly to TAP controller (TCK, TMS, TDI, TDO) and there is a set of signals, which are the outputs of JTAGG component. Some outputs seem quite logical to use (JTDI, JTCK), while JTDO comes in two forms (JTDO1, JTDO2). In order to use JTDOx output, proper instruction has to be passed to the IR first, which is useless for working with OpenOCD. Can you please advise on how to connect the JTAGG signals to the neorv32 interface in order to be able to list it in the JTAG chain? |
Beta Was this translation helpful? Give feedback.
-
I am currently working on an on-chip debugger (OCD) that is compatible to the RISC-V External Debug Support - Version 0.13.2. It will support the execution based debugging scheme.
The NEORV32 OCD complex will be base on four modules:
Status
💡 Check out the current state in the On-Chip Debugger Project Board
I have tested the whole OCD complex in its early stage and the results are quite promising. I am using "Open On-Chip Debugger 0.11.0-rc1+dev (SiFive OpenOCD 0.10.0-2020.12.1)" (RISC-V port of OpenOCD; prebuilt binaries available from SiFive) on Windows 10 with a FTDI FT2232H-56Q Mini Module as JTAG adapter to test everything on real hardware. The NEORV32 + OCD runs on an Intel Cyclone IV board.
Connecting to the NEORV32 OCD using OpenOCD:
OpenOCD can successfully connect to the DM/CPU via the DTM. Executing abstract commands and configuring and running the DM's program buffer also works: OpenOCD is able to read the CPU's
misa
CSR 🚀Running, halting and single-stepping the CPU also works already. Furthermore, OpenOCD can read arbitrary memory locations using the low-level
mdw
command:So far, this looks quite promising!✨ 🚀 ✨ 🚀 ✨
TODOs
gdb
integration📢 Help Wanted 📢
I am not a software expert and I am quite new to the GNU Debugger. I would be very thankful if anyone could help with the integration of
gdb
. So if you have any questions or ideas or if you want to contribute in any way, feel free to comment. 😉Beta Was this translation helpful? Give feedback.
All reactions