4

Has anyone been able to debug/program using SWD over a Olimex USB-JTAG programmer and the ARM-JTAG-SWD adapter? If so, please share how you did it :)

Specifically, I'm looking for what the OpenOCD configuration files would look like.

user31308
  • 41
  • 2
  • It would help if you added some details of what you are trying to program and why this setup is not working for you. – David Nov 05 '13 at 17:09
  • Well, I'm trying to connect to a Cortex-M3 MCU, more specifically a STM32. I'm not sure how to configure OpenOCD for SWD at all or even if its supported. – user31308 Nov 07 '13 at 09:52
  • Did you RTFM? Basically, you launch openocd, passing to it some configuration parameters, then open your gdb and hook up to localhost:2222 or something. I recently went through this (hooking to a Cortex M4 core on a custom PCB) and will be happy to answer your more concrete questions. – Vorac Nov 12 '13 at 16:48
  • I have been using OpenOCD flawlessly with standard JTAG connection for years, I'm just looking for a way to evaluate SWD functionality. If the FM you're referring to is this one: http://openocd.sourceforge.net/doc/html/ I dont find any obvious way to switch from JTAG to SWD. Should I use the same stm32.cfg but add a "transport select swd" somewhere? Do I need to declare DAPs instead of TAPs? Maybe you can share your configuration? – user31308 Nov 13 '13 at 17:34
  • 1
    I have the same question :) Did you ever get it working? Does anyone else have information? Thanks! – bitsmack Oct 30 '14 at 21:32
  • 1
    IIRC OpenOCD does not currently implement SWD. It was on the feature list but was removed. I would love to be proven wrong on that. :-( – akohlsmith Jul 06 '15 at 15:37

1 Answers1

1

I cannot address the programmer, adapter, or configuration files directly. However, to get an answer started, I did peruse the link a bit and found this:

http://openocd.sourceforge.net/doc/html/Debug-Adapter-Configuration.html#Debug-Adapter-Configuration

8.3 Transport Configuration

As noted earlier, depending on the version of OpenOCD you use, and the debug adapter you are using, several transports may be available to communicate with debug targets (or perhaps to program flash memory).

— Command: transport list
displays the names of the transports supported by this version of OpenOCD.

— Command: transport select transport_name
Select which of the supported transports to use in this OpenOCD session. The transport must be supported by the debug adapter hardware and by the version of OpenOCD you are using (including the adapter's driver). No arguments: returns name of session's selected transport.

Presumably, selecting SWD in this manner will tell the programmer to switch to SWD and to send the JTAG->SWD transition command to the chip before programming.

Jon
  • 742
  • 3
  • 12