Sorry for my late reply. I hadn't got time to look to the docs. Your problem here is that the Pi model 1 differs from model 2 and 3. And to even more complicated, the model 3B uses a different SOC so even there there could be a difference.
I see you're using the raspberrypi-native.cfg
interface script while you're using a RPI3 B+ as the timings are different between the between models. I made a list for you based on the different RPI models.
RPI 1A/A+/B/B+ with 700 MHz base clock
bcm2835gpio_peripheral_base 0x20000000
bcm2835gpio_speed_coeffs 113714 28
RPI 2B with 900 MHz base clock
bcm2835gpio_peripheral_base 0x3E000000
bcm2835gpio_speed_coeffs 146203 36
RPI 3B with 1200 MHz base clock
bcm2835gpio_peripheral_base 0x3E000000
bcm2835gpio_speed_coeffs 194938 48
RPI 3B+ with 1400 MHz base clock (despite the higher clock seems to be the same as RPI 3B)
bcm2835gpio_peripheral_base 0x3E000000
bcm2835gpio_speed_coeffs 194938 48
RPI 4 with 1500 MHz base clock
bcm2835gpio_peripheral_base 0xFE000000
bcm2835gpio_speed_coeffs 236181 60
Also please note that the mentioned pinout from RPI to JTAG header differs between models. Edit is incoming. Edit: Nope I stand corrected, sorry for the confusion about alt modes and pinouts. I was mixing JTAG debugging the RPi itself vs debugging another device using the RPi with JTAG. But for clarity, in your interface configuration you have the following options.
bcm2835gpio_jtag_nums
bcm2835gpio_trst_num
Which corresponds to which GPIO pins are set for jtag debugging another device. bcm2835gpio_jtag_nums
defines as sequence of GPIO pins (which are not the same as the RPI header pins).
bcm2835gpio_jtag_nums tck tms tdi tdo
bcm2835gpio_trst_num trst
So the default settings are:
bcm2835gpio_jtag_nums 11 25 10 9
bcm2835gpio_trst_num 7
And translating these GPIO pins to header pins means (see also the schematics):
Function |
RPI GPIO |
RPIO header |
Meraki JTAG header |
TCK |
11 |
23 |
9 |
TMS |
25 |
22 |
7 |
TDI |
10 |
19 |
3 |
TDO |
9 |
21 |
5 |
TRST |
7 |
26 |
1 |
Which should be the same as the table in the guide if I did the translation correctly.
So TLDR: adjust your interface to match the RPI3B+ model. Set bcm2835gpio_peripheral_base 0x3E000000
, bcm2835gpio_speed_coeffs 194938 48
, bcm2835gpio_jtag_nums 11 25 10 9
, and bcm2835gpio_trst_num 7
. And match your wiring with the RPIO header to the Meraki JTAG header.
Last edit, I also see a interface/raspberrypi2-native.cfg
exists which should theoretically work with your RPI3B+, but also has a few lines commented that we need (and I don't know how it handles the default values). So for completeness sake, just make sure the your interface script contains the following values.
- make a new interface configuration in your home folder
$ cd ~
# vi rpi3.cfg
- paste the following contents (press
i
enter insert mode, paste contents, press esc
to exit insert mode, issue :wq
command to save and quit)
interface bcm2835gpio
bcm2835gpio_peripheral_base 0x3F000000
bcm2835gpio_speed_coeffs 146203 36
bcm2835gpio_jtag_nums 11 25 10 9
bcm2835gpio_trst_num 7
- run openocd using the newly created
rpi3.cfg
and mr18.cfg
that you created per the guide.
cd ~
sudo openocd -f rpi3.cfg -f mr18.cfg -c "init; halt"
This should theoretically work.