NishanthMenon changed the topic of #openocd to: this is the place to discuss all things OpenOCD | Logs: https://libera.irclog.whitequark.org/openocd/
Guest62 has joined #openocd
Guest62 has quit [Client Quit]
jn has quit [Ping timeout: 256 seconds]
jn_ has joined #openocd
jn_ has joined #openocd
Guest35 has joined #openocd
<Guest35> Hello - anybody home??
Guest35 has left #openocd [#openocd]
Guest35 has joined #openocd
impulse has joined #openocd
<Guest35> I'm using openocd with my RPi Pico dev kit, hosted on an RPi5. Which config file do I need to use to set the "adapter speed"? Alternatively, how would I go about creating a config file to retain the '-c' settings I now enter at the command line?
<Hawk777> You can just put each thing you pass to “-c” into a file, one item per line.
<Hawk777> The syntax between “-c” options and config files is the same.
<Guest35> OK - "into a file"... but which file?
<Hawk777> Whatever file you want. That’s your new config file. You tell OpenOCD to read it with “-f” on the command line.
<Guest35> Let me try that...
nerozero has joined #openocd
<Guest35> Here's the command line I've been using: 'sudo openocd -f interface/cmsis-dap.cfg -f target/rp2040.cfg -c "program ina260_trial.elf verify reset exit"'   ... It works except that it uses the default x-slow 100kHz speed. If I add the following option, it goes faster: `-c "adapter speed 5000"'.                         I've
<Guest35> tried adding this to the 'target/rp2040.cfg' file, but it ignores all variations of `-c "adapter speed 5000"' I've tried. Should I use a 'set' instead of '-c'??
<Guest35> Also - I have two copies of the rp2040.cfg file on. my system:  One at '/home/pi/pico/openocd/tcl/target/rp2040.cfg', and another at
<Guest35> '/usr/local/share/openocd/scripts/target/rp2040.cfg'  Since I'm having to use sudo to run openocd, maybe it's the file in '/usr/local/share...' that I should be modifying??
<Guest35> OK - that's what was wrong... I was editing the "wrong" copy of 'rp2040.cfg' !?! If I add 'adapter speed 5000' to the file '/usr/local/share/openocd/scripts/target/rp2040.cfg' I don't get the warning from openocd, and the program loads much faster.
<Hawk777> Oh, no, don’t put the “-c” itself in the config file.
<Hawk777> Just the “adapter speed 5000” command.
<Hawk777> Ah there you go.
<Guest35> But that raises another question, "Why is openocd reading from the 'rp2040.cfg' file at '/usr/local/share' instead of the file at 'home/pi/pico'?
<Hawk777> If you want to write a local file of your own, probably best to name it something else.
<Hawk777> It has a search path where it looks for shipped config files, and I’m not sure whether it looks there or in the current working directory first.
<Guest35> Do you know where the search path is specified? It's not PATH I presume...?
<Guest35> Well shit fire & save matches... I can't seem to overcome the sudo requirement. I 'chown'd the rp2040.cfg file, but then openocd threw this error: "Error: unable to find a matching CMSIS-DAP device"...   I 'chown'd the 'usr/local/share/openocd/interface/cmsis-dap.cfg' , but that didn't fix it. Grrrr!
Guest35 has quit [Quit: Client closed]
<Hawk777> It’s not $PATH. I’m not sure what it is.
<Hawk777> The error you’re seeing now is not about accessing the config files, it’s about accessing the actual USB devices.
<Hawk777> These would probably be device nodes in /dev/bus/usb. You could either set up a udev rule to grant access to your JTAG adapter to your regular user, or depending on your Linux distro, there may be a group you can add yourself to which will do that.
crabbedhaloablut has quit [Ping timeout: 240 seconds]
crabbedhaloablut has joined #openocd
Guest81 has joined #openocd
KindOne has quit [Ping timeout: 268 seconds]
KindOne has joined #openocd
Bugies has joined #openocd
gzlb has quit [Quit: WeeChat 4.1.2]
Guest81 has quit [Quit: Client closed]
gzlb has joined #openocd
rkta has joined #openocd
Guest43 has joined #openocd
seamus has joined #openocd
Haohmaru has joined #openocd
MGF_Fabio has joined #openocd
Hawk777 has quit [Quit: Leaving.]
seamus is now known as Seamus
<karlp> sudo cp /home/pi/pico/openocd/contrib/60-openocd.rules /etc/udev/rules.d && sudo udevadm control --reload; [unplug and replug your adapter here]
<karlp> it's using the files in /usr/local/share, because you installed it.
<karlp> and ar erunning "openocd"
<karlp> if you want to see the search path a given installation of openocd will use, the easiest way I know is "openocd -f hohoho -d3"
<Seamus> karlp  ummm... I was here earlier under a different nickname, asked a couple of questions, then got distracted with registration, etc. I wonder if your answers were to the questions I asked?
crabbedhaloablut has quit [Ping timeout: 246 seconds]
crabbedhaloablut has joined #openocd
Guest43 has quit [Quit: Client closed]
Seamus has quit [Quit: Client closed]
Seamus has joined #openocd
Seamus is now known as Seamus
Seamus has quit [Quit: Client closed]
<karlp> did they sound useful? :)
BuldiBaerBeer has joined #openocd
BuldiBaerBeer has quit [Quit: Leaving]
Steffanx has quit [Ping timeout: 268 seconds]
Steffanx has joined #openocd
geep has quit [Ping timeout: 268 seconds]
PaulFertser has quit [Ping timeout: 268 seconds]
PaulFertser has joined #openocd
geep has joined #openocd
Haohmaru has quit [Quit: saionara]
braunr_ has joined #openocd
braunr has quit [Ping timeout: 252 seconds]
Deneb has joined #openocd
nerozero has quit [Ping timeout: 264 seconds]
MGF_Fabio has quit [Ping timeout: 260 seconds]
bvernoux has joined #openocd
Bugies has quit [Ping timeout: 256 seconds]
Deneb has quit [Quit: Leaving]
braunr_ is now known as braun
braun is now known as braunr