Skip to main content
Visitor II
February 20, 2025
Question

Doubt in error rectification

  • February 20, 2025
  • 3 replies
  • 438 views

 

Open On-Chip Debugger 0.12.0-00024-gc3ff39f8b (2023-06-26-16:51) [https://github.com/STMicroelectronics/OpenOCD]

Licensed under GNU GPL v2

For bug reports, read

http://openocd.org/doc/doxygen/bugs.html

Info : Listening on port 6666 for tcl connections

Info : Listening on port 4444 for telnet connections

Info : STLINK V2J45S7 (API v2) VID:PID 0483:3748

Info : Target voltage: 3.141085

Error: init mode failed (unable to connect to the target)

 

I am getting these error messages while I upload my code to the board. How to solve it? can anyone explain?

    This topic has been closed for replies.

    3 replies

    Super User
    February 20, 2025

    What board do you have and how is your programmer attached to the board? Show pictures.

    Explorer
    February 20, 2025

    What host and OS ?

    If you use Linux, your user needs to be added to the appropriate groups to access USB devices.

    ST Employee
    February 21, 2025

    I would suggest the following steps to help investigate and solve your issue:

    1. Please verify the connection using STM32CubeProgrammer to ensure there are no issues with the board.
      • If you don't have STM32CubeProgrammer, you can check using the ST-Link GDB server in STM32CubeIDE to confirm whether the issue is related to OpenOCD.
    2. If STM32CubeProgrammer is ok, then for sure we have an issue with OpenOCD. To help us investigate your issue, could you please share with us the OpenOCD log with higher verbosity (use -d3)?