Skip to main content
Associate II
Nov 20, 2026 10:34 AM UTC
Question

Target is not responding, retrying...

The .elf file is built, then I try to download it, and I get all this mess. I believe something is not getting erased from the previous run. I tried openocd, erased the file, but it is still having issues. Any ideas would helpful.      ---Randy

 

STMicroelectronics ST-LINK GDB server. Version 7.14.0

Copyright (c) 2026, 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

InitWhile : Enabled

 

Waiting for debugger connection...

Debugger connected

Waiting for debugger connection...

Debugger connected

Waiting for debugger connection...

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

STM32CubeProgrammer v2.24.0

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

 

 

 

Log output file: C:\Users\Randy\AppData\Local\Temp\STM32CubeProgrammer_a01828.log

ST-LINK SN : 066DFF555278665067093421

ST-LINK FW : V2J49M36

Board : NUCLEO-F411RE

Voltage : 3.26V

SWD freq : 4000 KHz

Connect mode: Under Reset

Reset mode : Hardware reset

Device ID : 0x431

Revision ID : Rev A

Device name : STM32F411xC/E

NVM size : 512 KBytes

Device type : MCU

Device CPU : Cortex-M4

BL Version : 0xD0

 

 

 

Opening and parsing file: ST-LINK_GDB_server_a01828.srec

 

 

Memory Programming ...

File : ST-LINK_GDB_server_a01828.srec

Size : 976.000 B

Address : 0x08000000

 

 

Erasing memory corresponding to segment 0:

Erasing internal memory sector 0

Download in Progress:

 

 

File download complete

Time elapsed during download operation: 00:00:00.319

 

 

 

Verifying...

 

 

File size < 32KB legacy verify will be used

 

 

Time elapsed during verifying operation: 00:00:00.007

 

 

Download verified successfully

 

 

Error in executing 'cont' command ...

Target is not responding, retrying...

Target is not responding, retrying...

Target is not responding, retrying...

Target is not responding, retrying...

Target is not responding, retrying...

Target is not responding, retrying...

Target is not responding, retrying...

Target is not responding, retrying...

Target is not responding, retrying...

Target is not responding, retrying...

Target is not responding, retrying...

Target is not responding, retrying...

Target is not responding, retrying...

Target is not responding, retrying...

Target is not responding, retrying...

Target is not responding, retrying...

Target is not responding, retrying...

Target is not responding, retrying...

Target is not responding, retrying...

Target is not responding, retrying...

GdbSession, Lost target connection, Exiting...

Failed to read registers from target

Target is not responding, retrying...

Target is not responding, retrying...

Target is not responding, retrying...

Target is not responding, retrying...

Target is not responding, retrying...

Target is not responding, retrying...

Target is not responding, retrying...

Target is not responding, retrying...

Target is not responding, retrying...

Target is not responding, retrying...

Failed to read registers from target

GdbSession, Lost target connection, Exiting...

Shutting down...

Exit.

7 replies

Andrew Neil
Super User
Nov 20, 2026 10:48 AM UTC

 I believe something is not getting erased from the previous run

Have you tried doing a full chip erase using CubeProgrammer?

Are you saying this board has previously been working, but has now stopped?

So what did you change?

In particular:

  • Does your code now go into a low-power mode?
  • Does your code now disable the SWD pins ?

 

 

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.
rseedleAuthor
Associate II
Nov 21, 2026 2:29 AM UTC

Further debugging shows that the code in .elf file gets to the first line and then jumps to the Reset_Handler. It stays in the Reset_Handler as if its stuck there. Using the full chip erase would seem to be the next step unless someone has a wonder idea.

Andrew Neil
Super User
Nov 21, 2026 8:06 AM UTC

 gets to the first line 

First line of what?

First line of main() ?

jumps to the Reset_Handler. It stays in the Reset_Handler as if its stuck there

Are you sure it’s Reset_Handler - not Error_Handler ?

Show the code where it’s “stuck”

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.
rseedleAuthor
Associate II
Nov 21, 2026 4:54 PM UTC

First line of what? Of main()

jumps to the Reset_Handler. It stays in the Reset_Handler as if its stuck there

Show the code where it’s “stuck”

See the attached file.

--- Randy Seedle