Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tools/litex_sim support for remote_bitbang (openocd) #1887

Merged
merged 2 commits into from
Feb 13, 2024

Conversation

Dolu1990
Copy link
Collaborator

This PR mostly merge previously made work to add jtagremote support into litex_sim.py

Here is a simple way to test it :

Terminal 1 :

litex_sim --cpu-type=vexriscv_smp --with-sdram --sdram-init boot.json --with-rvc  --with-privileged-debug --hardware-breakpoints 4 --jtag-tap --with-jtagremote

Terminal 2 :

cd openocd
src/openocd  -f ???/jtag_remote.cfg -f ???/riscv_jtag_tunneled.tcl 

jtag_remote.cfg and riscv_jtag_tunneled.tcl being openocd_scripts.zip.

You should get something like :

Open On-Chip Debugger 0.11.0+dev-04033-g058dfa50d (2023-11-27-14:31)
Licensed under GNU GPL v2
For bug reports, read
	http://openocd.org/doc/doxygen/bugs.html
Info : only one transport option; autoselect 'jtag'
DEPRECATED! use 'remote_bitbang host' not 'remote_bitbang_host'
DEPRECATED! use 'remote_bitbang port' not 'remote_bitbang_port'
Info : Simple Register based Bscan Tunnel Selected
Info : Initializing remote_bitbang driver
Info : Connecting to localhost:44853
Info : remote_bitbang driver initialized
Info : This adapter doesn't support configurable speed
Info : JTAG tap: riscv.cpu tap/device found: 0x10003fff (mfg: 0x7ff (<invalid>), part: 0x0003, ver: 0x1)
Info : [riscv.cpu.0] datacount=1 progbufsize=2
Info : Disabling abstract command reads from CSRs.
Info : [riscv.cpu.0] Examined RISC-V core; found 1 harts
Info : [riscv.cpu.0]  XLEN=32, misa=0x40041105
[riscv.cpu.0] Target successfully examined.
Info : starting gdb server for riscv.cpu.0 on 3333
Info : Listening on port 3333 for gdb connections
Ready for Remote Connections
Info : Listening on port 6666 for tcl connections
Info : Listening on port 4444 for telnet connections
Info : accepting 'telnet' connection on tcp/4444

soc/cores/vexriscv_smp add jtag tap support
# Conflicts:
#	litex/soc/cores/cpu/vexriscv_smp/core.py
@enjoy-digital
Copy link
Owner

Thanks @Dolu1990 for the PR and instruction to use it!

@enjoy-digital enjoy-digital merged commit 46a2e6f into enjoy-digital:master Feb 13, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants