cancel
Showing results for 
Search instead for 
Did you mean: 

Weird behavior on STM32f103C8T6 (blue pill) trying to use OpenOCD

Alexander Hoffman
Associate III
Posted on September 13, 2017 at 19:06

Hi all,

I am using a STM32f103C8T6 (blue pill), one of these $2 ebay boards, and I am having a really hard time getting some sort of dev environment set up with it.

I seem to have finally be able to get it to consistently program by setting the boot0 jumper to 1 and the boot1 jumper to 0, building my code in system workbench then flashing through the command like using stlink. So as it stand the board is not totally useless but I have no be able to get any debugging working. The closes I have to getting debugging working is to run openocd from the command line then I can run the debugger in system workbench. It successfully breaks at main but after 2 steps it given 'Error: JTAG failure -4' error through the opeocd terminal and system workbench debugger just hangs. I don't really have much experience with command line debugging and would really like to be able to debug in system workbench. 

Does anyone have any idea's how to solve this issue or had any success with this board?

On a side note, I do not have any problems with any of my otherboard with onboard debuggers so I don't think it is an issue with my system. More so the configuring for this board.

Cheers

#stm32f103cbt6 #openocd
4 REPLIES 4
Posted on September 13, 2017 at 22:48

External ST-LINK?

Connected what pins to what? SWDIO, SWCLK, NRST, GND, VCC?

Please provide a link to the specific board, with a schematic

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Posted on September 20, 2017 at 23:47

Sorry if unclear, external ST-link meaning a st-link programmer (

http://www.st.com/en/development-tools/st-link-v2.html

 ) as the board does not have an on-board debugger.

The board is the following: 

http://wiki.stm32duino.com/index.php?title=Blue_Pill

 

and the pinout I used was 

st-link         board

RST      ->  NRST

SWDIO -> SWDIO

GND     -> GND

SWCLK-> SWCLK

3.3V      ->  3.3v

Cheers

Posted on September 21, 2017 at 00:24

People tend to hack up DISCO and NUCLEO boards to escape SWD connectivity. Pin 1 of the external version need power to connect via on-board buffers.

VTarget is an input, not a provider of power. Would need powering via 5V on micro-USB

What do ST-LINK Utilities report?

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
medanis
Associate II
Posted on November 13, 2017 at 13:52

Check this thread

https://community.st.com/0D50X00009XkZBsSAN