OpenOCD GDB Server Timeout


#1

Hi all,

I’m having a bit of trouble.

I’m trying to use an STLink/V2 on a SparkFun Photon RedBoard.

When I try to launch the OpenOCD debugger I get a timeout message.

My launch.json file has the following…

  {
        "cwd": "${workspaceRoot}",
        "executable": "./target/test.elf",
        "name": "OpenOCD Debug Microcontroller",
        "request": "launch",
        "type": "cortex-debug",
        "servertype": "openocd",
        "configFiles": [
            "interface/stlink-v2-1.cfg",
            "target/stm32f2x.cfg"
        ]
    },

I’ve also setup the OpenOCD path in the user settings as follows…

“cortex-debug.openocdPath”: “F:/openOCD/bin-x64/openOCD.exe”

The STM32 tools work fine. I also tried Texane’s st-util without luck.

Should I be using a different debug pod, or is my configuration wrong?

Any help is greatly appreciated.

Archer


#2

Hi again,

One other piece of info.\

I tried running openOCD from a command prompt.
Still failed but more output messages

F:\openOCD\bin-x64>openocd -f interface/stlink-v2-1.cfg -f target/stm32f2x.cfg -c "gdb_port 3333"
Open On-Chip Debugger 0.10.0
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
Info : auto-selecting first available session transport “hla_swd”. To override use 'transport select '.
adapter speed: 1000 kHz
adapter_nsrst_delay: 100
Info : The selected transport took over low-level target control. The results might differ compared to plain JTAG/SWD
none separate
Info : Unable to match requested speed 1000 kHz, using 950 kHz
Info : Unable to match requested speed 1000 kHz, using 950 kHz
Info : clock speed 950 kHz
Error: open failed
in procedure 'init’
in procedure ‘ocd_bouncer’

Thanks in advance
Archer


#3

How are you connecting? Via the large 20-pin JTAG connector (not normally populated on the Sparkfun RedBoard) or just using SWD?

A few other common issues:

  • You will only be able to connect initially if the device is in DFU mode or you’ve already flashed system and user (or monolithic) binaries with JTAG/SWD enabled.
  • Make sure you connect the power pin on the ST-LINK to 3V3. It’s a detection pin and is required.

#4

Hi Rickkas7,

Thanks for the quick reply!

I’m using the 20 pin connector. I soldered it in.
But I’m not the worlds best technician, so buzzing out that connector is a great idea.

The STM32 Util does report a 3.3V connection.

The Photon Redboard is flashed with the default device firmware
(DeviceOS and Tinker as I recall). I have no idea if that firmware has JTAG/SWD
enabled.

Your idea of putting the Redboard into DFU mode is a great one.
I’ll give that a shot and see what happens.

Thanks
Archer


#5

Well no luck with the DFU mode, and the 20 pin JTAG connect is fine.

Is anyone else using the STLink/V2 on Win10 with the Particle Workbench?

I think the next thing I’ll try is replicating everything over on Linux…

I’ll let you guys know if that fares any better.