RasPi
JTAG for RasPi¶
NetBooting a Pi¶
https://riscj.dev/projects/rpirack/posts/01.html
Setting up the Pi¶
- Download the Raspi 32bit OS.
- Flash the sdcard
- (Optional) Add the
ssh
file to the root of the sdcard to enable ssh
Enabling JTAG on the RasPi¶
Set the enable_jtag_gpio
option in the boot variables
Enable Jtag Pins:
echo "enable_jtag_gpio=1" >> /boot/firmware/config.txt
Wiring the Connectors¶
Using the JTAG Pinouts for the RasPi connect the pins in the Alt4 mode.
Connecting them to the Shikra Pins
Pins on the PI:
Pi Pins Names | Pi Pin Number | Wire Color | Tigard JTAG |
---|---|---|---|
GPIO 22 (TRST) | Pin 15 | Green | (TRST) |
GPIO 24 (TDO) | Pin 18 | Purple | (TDO) |
GPIO 25 (TCK) | Pin 22 | White | (TCK) |
GPIO 26 (TDI) | Pin 37 | Grey | (TDI) |
GPIO 27 (TMS) | Pin 13 | Blue | (TMS) |
Ground | Pin 20 | Black | (GND) |
5V VCC | Pin 2 | Red | (VTGT) |
https://sysprogs.com/VisualKernel/tutorials/raspberry/jtagsetup/
Testing the Connectors¶
$ sudo openocd -f tigard-jtag.cfg -f raspi.cfg
Open On-Chip Debugger 0.11.0-rc2
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
jtag
DEPRECATED! use 'adapter speed' not 'adapter_khz'
raspi.arm
Info : Listening on port 6666 for tcl connections
Info : Listening on port 4444 for telnet connections
Info : clock speed 1000 kHz
Info : JTAG tap: raspi.arm tap/device found: 0x07b7617f (mfg: 0x0bf (Broadcom), part: 0x7b76, ver: 0x0)
Info : found ARM1176
Info : raspi.arm: hardware has 6 breakpoints, 2 watchpoints
Info : starting gdb server for raspi.arm on 3333
Info : Listening on port 3333 for gdb connections
Info : accepting 'telnet' connection on tcp/4444