cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to debug from STM32CubeIDE

TomC1
Associate II

Hi,

I am having a problem where I am unable to run my code in debug mode from within STM32CubeIDE v1.15.

I can program the device fine with STM32CubeProgrammer, but when I try to debug I get this output:

log output file: C:\Users\[me]\AppData\Local\Temp\STM32CubeProgrammer_a23280.log

ST-LINK SN : 004C002F3532510F31333430

ST-LINK FW : V3J14M5B5S1

Board : STLINK-V3SET

Voltage : 3.26V

Error: ST-LINK error (DEV_UNKNOWN_MCU_TARGET)

2nd connect tentative with frequency (8MHz)

ST-LINK SN : 004C002F3532510F31333430

ST-LINK FW : V3J14M5B5S1

Board : STLINK-V3SET

Voltage : 3.26V

Error: ST-LINK error (DEV_UNKNOWN_MCU_TARGET)

Encountered Error when opening C:\ST\STM32CubeIDE_1.15.0\STM32CubeIDE\plugins\com.st.stm32cube.ide.mcu.externaltools.cubeprogrammer.win32_2.1.200.202311302303\tools\bin\STM32_Programmer_CLI.exe

Error in STM32CubeProgrammer

Shutting down...

 

For comparison, when I connect to the MCU through the Cube Programmer, I get this output:

11:56:20 : UR connection mode is defined with the HWrst reset mode
11:56:20 : ST-LINK SN : 004C002F3532510F31333430
11:56:20 : ST-LINK FW : V3J14M5B5S1
11:56:20 : Board : STLINK-V3SET
11:56:20 : Voltage : 3.26V
11:56:20 : SWD freq : 8000 KHz
11:56:20 : Connect mode: Normal
11:56:20 : Reset mode : Software reset
11:56:20 : Device ID : 0x430
11:56:20 : Revision ID : Rev A
11:56:20 : Debug in Low Power mode is not supported for this device.
11:56:21 : UPLOADING OPTION BYTES DATA ...
11:56:21 : Bank : 0x00
11:56:21 : Address : 0x4002201c
11:56:21 : Size : 8 Bytes
11:56:21 : Bank : 0x01
11:56:21 : Address : 0x1ffff800
11:56:21 : Size : 16 Bytes
11:56:21 : UPLOADING ...
11:56:21 : Size : 1024 Bytes
11:56:21 : Address : 0x8000000
11:56:21 : Read progress:
11:56:21 : Data read successfully

Could anyone help shed some light on why I am unable to debug?

For reference, I am using the most recent version of all tools, and I have tried several of our units, several different STLinks (v2 and v3) and even multiple laptops, all with the same outcome.

7 REPLIES 7
TomC1
Associate II

Further info, I also get this dialog when the debug fails:

TomC1_0-1712747125039.png

 

Andrew Neil
Evangelist III

What microcontroller, and on what board?

Are you using 'Connect Under Reset' ?

The "ST-LINK error (DEV_UNKNOWN_MCU_TARGET)" would seem to be key:

https://community.st.com/t5/forums/searchpage/tab/message?q=ST-LINK%20error%20%2BDEV_UNKNOWN_MCU_TARGET&noSynonym=false&collapse_discussion=true

 

Hello,

It's a known issue with STM32CubeIDE v1.15. Already escalated internally to be fixed asap.

See these threads. 

https://community.st.com/t5/stm32cubeide-mcus/stm32cubeide-v1-15-st-link-upgrade-problem/m-p/652172/highlight/true

https://community.st.com/t5/stm32cubeide-mcus/problem-after-updating-cubeide-to-1-15-0/td-p/653175

https://community.st.com/t5/stm32cubeide-mcus/with-stm32cube-ide-v1-15-0-update-problem-with-stlink/td-p/652514

 

To give better visibility on the answered topics, please click on "Accept as Solution" on the reply which solved your issue or answered your question.

STMCubeIDE seems to give endless problems. Since the MX can generate c++ code what is the possibility of using all the generated files in C++ Builder? If This is possible, which files should I look for? Has anyone tried this before or will we just have to be stuck with STMCubeIDE. 
I do note that many tutorials using  STMCubeMX susally have their code generated using other toolchains and not the STMCubeIDE.
Could someone shed some light on this matter?

Hello,

This is another subject. Please open a new thread for this. Another ST team can help you.

Thank you for your understanding.

To give better visibility on the answered topics, please click on "Accept as Solution" on the reply which solved your issue or answered your question.

@SofLit wrote:

Please open a new thread for this. Another ST team can help you.


It's here: https://community.st.com/t5/feedback-forum/using-c-builder/td-p/660342

Dunno why it's under 'Forum Feedback', though?

Surely, 'Other Tools (MCUs)' would make more sense?

I don't understand why this is showing as an accepted solution to my thread.  I certainly did not accept it, because it did not in any way solve my problem.

The only solution I have found was to migrate my project to Visual Studio with VisualGDB.