cancel
Showing results for 
Search instead for 
Did you mean: 

STM32CubeProgrammer v2.7.0-RC1 doesn't find target.

NNari.1
Associate II

I am trying to debug small project on STM32H7B. I use STM32 Cube Programmer and STLINK-V3SET to clear the flash. It seems to me that ST-LINK GDB server ver 5.8.0 is connected. See blow.

==========

STMicroelectronics ST-LINK GDB server. Version 5.8.0

Copyright (c) 2020, STMicroelectronics. All rights reserved.

Starting server with the following options:

    Persistent Mode      : Disabled

    LogFile Name        : C:\Users\nnarita\Documents\STMicro_project\EX-5188\Debug\st-link_gdbserver_log.txt

    Logging Level       : 31

    Listen Port Number     : 61234

    Status Refresh Delay    : 15s

    Verbose Mode        : Enabled

Target connection mode: Attach

Reading ROM table for AP 0 @0xe00fefd0

Hardware watchpoint supported by the target 

COM frequency = 21333 kHz

ST-LINK Firmware version : V3J7M3B5S1

Device ID: 0x480

PC: 0x75f9e0

ST-LINK device status: RUN_MODE

ST-LINK detects target voltage = 2.94 V

ST-LINK device status: RUN_MODE

ST-LINK device initialization OK

Waiting for debugger connection...

Waiting for connection on port 61234...

Accepted connection on port 61234...

Debugger connected

Try halt...

ST-LINK device status: HALT_MODE

Enter STM32_AppReset() function 

NVIC_DFSR_REG = 0x00000009

NVIC_CFGFSR_REG = 0x00000000

=============

Then switching to STM32CubeProgrammer. See below.

=============

------ Switching to STM32CubeProgrammer ----- 

   -------------------------------------------------------------------

            STM32CubeProgrammer v2.7.0-RC1          

   -------------------------------------------------------------------

ST-LINK SN : 000C00125553501020393256

ST-LINK FW : V3J7M3B5S1

Board    : STLINK-V3S������

Voltage   : 2.94V

Error: No STM32 target found!

2nd connect tentative with a lower frequency (8MHz)

ST-LINK SN : 000C00125553501020393256

ST-LINK FW : V3J7M3B5S1

Board    : STLINK-V3S������

Voltage   : 2.94V

Error: No STM32 target found!

Encountered Error when opening C:\ST\STM32CubeIDE_1.6.1\STM32CubeIDE\plugins\com.st.stm32cube.ide.mcu.externaltools.cubeprogrammer.win32_1.6.0.202101291314\tools\bin\STM32_Programmer_CLI.exe

 ------ Switching context ----- 

Error in STM32CubeProgrammer

Debugger connection lost.

Shutting down...

============================

There seems to be two problems, "No STM target found" and "Error in STM32CubeProgrammer". Could someone help me to figure out causes of the errors?

1 ACCEPTED SOLUTION

Accepted Solutions
LaurentL
ST Employee

Hi,

Did you connect the Reset pin from STLink to NRST pin of mcu ?

If not, don't use "connect under reset" mode but "software system reset".

Also, you're using the auto mode for STLink freq and it is at 21,33 MHz in JTAG and that can be problematic on custom boards with long wires from stlink...

So, try with a lower JTAG freq.

You can also debug in SWD mode instead of JTAG, it uses less pins and works the same.

Last trial is to try with Openocd in debug configuration (debugger tab).

Rgds,

Laurent

View solution in original post

4 REPLIES 4
TDK
Guru

> Error: No STM32 target found!

Looks like it find the ST-Link but not the board. My guess is the first error is the direct cause of the second. Is this a custom board? Are SWD pins connected? Seems like it reads a voltage, so power is probably fine. Anything loaded on the board?

If you feel a post has answered your question, please click "Accept as Solution".
Yes, this is a custom board. I use JTAG instead of SWD. The board was programmed before, and STM32 Cube Programmer (standalone) can read/write/erase the flash, but integrated STM32CubeProgrammer can’t find the device. I am new to microprocessor, please help.
LaurentL
ST Employee

Hi,

Did you connect the Reset pin from STLink to NRST pin of mcu ?

If not, don't use "connect under reset" mode but "software system reset".

Also, you're using the auto mode for STLink freq and it is at 21,33 MHz in JTAG and that can be problematic on custom boards with long wires from stlink...

So, try with a lower JTAG freq.

You can also debug in SWD mode instead of JTAG, it uses less pins and works the same.

Last trial is to try with Openocd in debug configuration (debugger tab).

Rgds,

Laurent

By using SWD mode instead of JTAG the debugger works without the problem.

Thank you guys!