<clever>
ah but tcl, thats a scripting language, openocd uses tcl files to configure itself
angerisagift has quit [Ping timeout: 248 seconds]
angerisagift has joined ##raspberrypi-internals
<CarlFK>
openocd... years ago I was trying to get a PR in that got blocked by "use a scope and submit some ...." which is just outside what I was willing to do
<clever>
ive also found it a pain to setup openocb every time i need to debug something
<CarlFK>
it was someone else's patch, that was causing me a headache ... yeah...
<CarlFK>
"use this openocd fork until this 2+ year old patch..."
<clever>
basically, rig a pico-w into the uart and jtag pins of a pi, and then connect to it over the wifi
<clever>
currently, it only does uart
<clever>
ive done it with a zero before, but it was running from a r/w SD card, and i didnt feel comfortable just yanking power like i would with a pico-w
<clever>
but for this, you shouldnt need any patch
<CarlFK>
thats refreshing
<clever>
although, the openocd in the package manager is many years out of date, and i think everybody recommends you just use openocd master
<clever>
and ive gotten weird looks when telling somebody to go to the bunny blog :P
<CarlFK>
lol
<CarlFK>
I have a few netv2 boards. somewhere in that universe is the "use this fork..." where I tried to get the patch upstreamed
<CarlFK>
I'm curious what ever happened.
<CarlFK>
msg xobs "no such nick" huh. thats surprising
<CarlFK>
clever: fpga4fun is great.
<clever>
yep, they explain a lot of concepts clearly, even if your not planning to use an fpga
<clever>
i2c, uart, spi, ethernet, jtag
<CarlFK>
https://pinout.xyz/pinout/jtag ... do I have this right: "two separate JTAG interfaces available on the Pi" means there are 2 places the pi can be hooked into to control things...
<clever>
CarlFK: its a bit more complex, TDO can be on gpio 5 or gpio 24
<CarlFK>
but the pi does not have dedicated jtag pins for controlling, just gpio and software to do the bit banging
<clever>
TDI can be on 26 or 4
<clever>
and you can make a different choice on each
<clever>
there are 2 jtag ports, but not in the way you asked
<clever>
the main jtag port, is an unpopulated SMD socket on the bottom, and it can only debug the VPU, and nobody in the public knows how to drive it
<clever>
the arm jtag port is behind the gpio altfunc array, so you must set those gpio pins into jtag mode to access the arm jtag port
<clever>
i just randomly picked pins as i was setting it up the first time
<CarlFK>
got it. so if some other project (https://github.com/mithro/MoBoControl/wiki ) needs a jtag controller (is that the right word?) it doesn't matter which gpio pins are used
<clever>
yeah
<clever>
on the host side, you can pick any pins you want, as long as you list them correctly in openocd's config
<clever>
on the target side, you need to use the pins that are set to the right altmode, as listed in arm.c
<CarlFK>
if I made a board that was basically 2 40 pin headers with traces routing gpio to jtag - and adding buttons / leds are about free, what would be some handy buttons / leds?
<clever>
i cant see much use in buttons/led's for basic debug, but it cant really hurt to put an led on every gpio?
<clever>
having the reset pin wired to a gpio would be handy
<clever>
thats part of where my wifi-jtag project comes in
<CarlFK>
on the pi 1234 target header - there is alt1/2 - does it make sense to have 2 40 pin headers, one for each?
<clever>
CarlFK: i would just pick one, and make sure the pi is configured to match
<CarlFK>
er, alt4/5 - looks like 5 has RTCK so that's better?
<clever>
CarlFK: you dont have to use the same grouping or mode for all pins
<clever>
so you could get TDI from 4, and TDO from 24, then TMS from 12, and TCM from 25
<clever>
you can just pick whatever pin fits your pcb routing best
<CarlFK>
gah. choices :p
<clever>
and on the host side (if its an rpi), you have nearly infinite choices
<clever>
any pin can be used
<clever>
CarlFK: oh, another idea i had, there is a standard pinout for jtag (i forget what though), creating a board, that adapts the 40pin header to the standard pinout, would then let you use any jtag programmer
<clever>
and if you configure openocd to use the same pins, then you can use that same board for both host and target