Page 1 of 1

ST Link v2 utility works, by itself, but unable to connect to GDB

Posted: Tue Sep 29, 2020 9:52 pm
by thatdude
Hi All,
I made a custom board with a STM32F429 and connected a ST LINK v2, with pullups on SWD pins AND the TMS pin. Using the STLINK utility gui as a stand alone, I was able to program the MCU, but it did not start up on it's own. As a newbie to Atollic, I started an embedded project and uploaded a CMSIS package AND a SVD file to accommodate the debugger. Some back story, I was able to run this in Segger embedded studio's debugger before my jlink died, so I know the actual code works. (It's a simple SPI implementation) At any rate, the project compiled, with out warnings and used documentation establish the st link debug configurations. As I tried to start a debug session, the console read as follows:

STMicroelectronics ST-LINK GDB server. Version 5.1.0
Copyright (c) 2018, STMicroelectronics. All rights reserved.

Starting server with the following options:
Persistent Mode : Disabled
Logging Level : 1
Listen Port Number : 61234
Status Refresh Delay : 15s
Verbose Mode : Disabled
SWD Debug : Enabled

Waiting for debugger connection...
Debugger connected
Error! Failed to read target status
Debugger connection lost.
Shutting down...

warning: Remote failure reply: E31
C:\Users\xxxxxx\AppData\Local\Temp\truestudio4095097594792969941gdbscript:25: Error in sourced command file:
Remote communication error. Target disconnected.: No error.


Can anyone direct me to what this is and how to solve this?

Re: ST Link v2 utility works, by itself, but unable to connect to GDB

Posted: Tue Sep 29, 2020 10:05 pm
by thatdude
BTW: this is what I get when I run STLINK without loading the gdb:

STM32 ST-LINK CLI v3.5.0.0
STM32 ST-LINK Command Line Interface

ST-LINK SN: xxxxxxxxxxxxxxxxxxxxxxxxxxx
ST-LINK Firmware version: V2J34S7
Connected via SWD.
SWD Frequency = 4000K.
Target voltage = 3.2 V
Connection mode: Connect Under Reset
Reset mode: Hardware reset
Debug in Low Power mode enabled
Device ID: 0x419
Device flash Size: 512 Kbytes
Device family: STM32F42xxx/F43xxx

Loading file...
Flash Programming:
File : C:\armprojects\board_v2_atolic_2\spi_2\Debug\spi_2.hex
Address : 0x00008000
Memory programming...
±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±± 0%
Memory programming...
Memory programming...
Memory programmed in 0s and 15ms.
Programming Complete.