2021-05-28 09:35 AM
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?
Solved! Go to Solution.
2021-06-02 01:28 AM
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
2021-05-28 06:58 PM
> 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?
2021-06-01 11:32 AM
2021-06-02 01:28 AM
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
2021-06-02 09:23 AM
By using SWD mode instead of JTAG the debugger works without the problem.
Thank you guys!