Author Topic: Any openocd gurus?  (Read 1986 times)

0 Members and 1 Guest are viewing this topic.

Online naliTopic starter

  • Frequent Contributor
  • **
  • Posts: 901
  • Country: gb
Any openocd gurus?
« on: July 12, 2023, 11:22:16 am »
I'm trying to build/run openocd on a Beaglebone, using bitbanged gpio to program a nRF52832 by SWD.
After pulling & building the latest source (0.12) I can't get it to accept my config for some reason.

Here's the configuration
Code: [Select]
adapter driver linuxgpiod
adapter gpio swdio 50
adapter gpio swclk 60
adapter gpio srst 51
adapter srst delay 100
adapter srst pulse_width 100

and here's the output
Code: [Select]
Open On-Chip Debugger 0.12.0+dev-00256-g4a9677617 (2023-07-12-08:57)
Licensed under GNU GPL v2
For bug reports, read
        http://openocd.org/doc/doxygen/bugs.html
swd
Info : Listening on port 6666 for tcl connections
Info : Listening on port 4444 for telnet connections
Info : Linux GPIOD JTAG/SWD bitbang driver
Error: Require swclk and swdio gpio for SWD mode

As far as I can see by trawling the source code the error comes from sysfsgpio_swd_mode_possible() which in turn is just checking for non-negative values for swdio & swclk i.e. that they have been defined. So maybe I'm using the wrong method of defining the signals?

Any ideas please? My Google-fu is failing me not help by the fact that gpio usage doesn't seem to be that common plus several options have been deprecated.

 

Offline liaifat85

  • Regular Contributor
  • *
  • !
  • Posts: 172
  • Country: bd
Re: Any openocd gurus?
« Reply #1 on: July 12, 2023, 03:51:57 pm »
I think OpenOCD forum will be good for this question: https://openocd.org/pages/forum.html
 

Online naliTopic starter

  • Frequent Contributor
  • **
  • Posts: 901
  • Country: gb
Re: Any openocd gurus?
« Reply #2 on: July 12, 2023, 05:45:22 pm »
That's sound advice  :) Odd the forum never came up in my searches (it's not mentioned on openocd.org)

..Actually I just looked at it, it's locked with the most recent post in 2019. Ah well.
 

Offline Faranight

  • Supporter
  • ****
  • Posts: 256
  • Country: si
Re: Any openocd gurus?
« Reply #3 on: July 12, 2023, 06:50:17 pm »
What about the OpenOCD IRC channel?
https://openocd.org/pages/irc.html
Fara-day? Fara-night.
 

Online naliTopic starter

  • Frequent Contributor
  • **
  • Posts: 901
  • Country: gb
Re: Any openocd gurus?
« Reply #4 on: July 13, 2023, 02:05:49 pm »
OK so I got an answer on IRC...

For the record, it was the actual GPIO definitions it wasn't liking although there was no error to indicate as such. The GPIOs are in banks of 32, so for example 50 is spec'd as 18 with "-chip 1" to indicate the 2nd bank.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf

 

- - -
-->