Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Error: init mode failed (unable to connect to the target) when running openocd #380

Open
@Penjo989

Description

I got a stm32f4 and wrote some code to it, then tried to run openocd and got this error

C:\Users\eyala\Documents\OpenOCD-20240916-0.12.0\bin>openocd.exe -f openocd.cfg
Open On-Chip Debugger 0.12.0 (2024年09月16日) [https://github.com/sysprogs/openocd]
Licensed under GNU GPL v2
libusb1 d52e355daa09f17ce64819122cb067b8a2ee0d4b
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
Info : auto-selecting first available session transport "hla_swd". To override use 'transport select '.
Info : The selected transport took over low-level target control. The results might differ compared to plain JTAG/SWD
Info : Listening on port 6666 for tcl connections
Info : Listening on port 4444 for telnet connections
Info : clock speed 2000 kHz
Info : STLINK V0J8S0 (API v0) VID:PID 0000:0000
Error: init mode failed (unable to connect to the target)

my openocd.cfg -

source [find interface/stlink.cfg]

source [find target/stm32f4x.cfg]

I reflashed the stlink a couple of times and changed it to jlink(and then back to stlink) so that might have something to do with it.
also i have a friend that has the same board as i do and openocd works for him(he didn't reflash his stlink)

would very appreciate any help :), i've been stuck on this for a week now

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

        AltStyle によって変換されたページ (->オリジナル) /