cancel
Showing results for 
Search instead for 
Did you mean: 

How to setup STM32CubdeIDE using ST Link V2 Debugger

HMSEdinburge
Associate II
25 REPLIES 25
Andrew Neil
Super User

That's almost certainly going to be a fake ST-Link:

How to recognize a genuine ST-LINK/V2 versus a cloned one.

 

Do yourself a favour, and get a genuine ST-Link...

 

You can read how to set up an ST-Link in CubeIDE:

https://www.st.com/en/development-tools/stm32cubeide.html#documentation

https://wiki.st.com/stm32mcu/wiki/STM32CubeIDE:Introduction_to_STM32CubeIDE

 

And watch videos on ST's YouTube Channel:

https://www.youtube.com/channel/UCjnmZw3h4XnpK3e5D2jvIGA 

A complex system that works is invariably found to have evolved from a simple system that worked.
A complex system designed from scratch never works and cannot be patched up to make it work.
TDK
Super User

Connect SWD pins to programmer.

Ensure board is powered.

Hit debug.

If you feel a post has answered your question, please click "Accept as Solution".

@TDK wrote:

Connect SWD pins to programmer.


Not forgetting Vtarget and GND.

@HMSEdinburge  Also connecting NRST is highly recommended.

A complex system that works is invariably found to have evolved from a simple system that worked.
A complex system designed from scratch never works and cannot be patched up to make it work.

Hi Dude, its genuine STLink V2, cost $40++ 

HMSEdinburge
Associate II

Hi All, can the ST Link V2 be used for debugging? I m keep getting these errors on STM32CudeIDE, although i can use STLink Utility to download the code?

 

Error in initializing ST-LINK device.

Reason: ST-LINK: Could not verify ST device! Abort connection.


@HMSEdinburge wrote:

Hi All, can the ST Link V2 be used for debugging?.


Of course it can - that's its key function!

 


@HMSEdinburge wrote:

 i can use STLink Utility to download the code.


The ST-Link Utility is long obsolete - STM32CubeProgrammer is the replacement.

You haven't said what STM32 chip you're using - the Obsolete Utility won't support recent chips.

A fake/clone ST-Link could also cause problems.

Again, see: How to recognize a genuine ST-LINK/V2 versus a cloned one.

 

See also:

How to solve connection errors when connecting and programming the STM32 target board.

How to solve debugger connection issues.

 

A complex system that works is invariably found to have evolved from a simple system that worked.
A complex system designed from scratch never works and cannot be patched up to make it work.

> Reason: ST-LINK: Could not verify ST device! Abort connection.

This typically happens with non-genuine devices.

See if it works with the standalone STM32CubeProgrammer.

If you feel a post has answered your question, please click "Accept as Solution".

yes it works on STM32Cube Programmer, i can download code on the board

hi Andrew, i tried the STMCude Programmer, it works perfectly... board is a blue pill, STM32F103,  guess it must be a Chinese clone... 

I happen to have the H753 Nucleo and H750 DISCO board, could you advise how to test the STLink V2 on these 2 boards? I m pretty sure the STlink V2 is a genuine from STM!