stm32-rs / stm32f407g-disc

Rust BSP crate for the STM32F4DISCOVERY (STM32F407G-DISC) development board
BSD Zero Clause License
43 stars 14 forks source link

OpenOCD config results in error #10

Open slyons opened 4 years ago

slyons commented 4 years ago

Using the openocd.cfg/openocd.gdb in the repo I get the following error:

Open On-Chip Debugger 0.10.0
Licensed under GNU GPL v2
For bug reports, read
    http://openocd.org/doc/doxygen/bugs.html
Info : The selected transport took over low-level target control. The results might differ compared to plain JTAG/SWD
adapter speed: 2000 kHz
adapter_nsrst_delay: 100
none separate
srst_only separate srst_nogate srst_open_drain connect_deassert_srst
Info : Unable to match requested speed 2000 kHz, using 1800 kHz
Info : Unable to match requested speed 2000 kHz, using 1800 kHz
Info : clock speed 1800 kHz
Error: open failed
in procedure 'init'
in procedure 'ocd_bouncer'

Tried multiple board resets and only reverting it back to the original cortex example (modified for the f40x) restored the connection.

Open On-Chip Debugger 0.10.0
Licensed under GNU GPL v2
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 <transport>'.
Info : The selected transport took over low-level target control. The results might differ compared to plain JTAG/SWD
adapter speed: 2000 kHz
adapter_nsrst_delay: 100
none separate
Info : Unable to match requested speed 2000 kHz, using 1800 kHz
Info : Unable to match requested speed 2000 kHz, using 1800 kHz
Info : clock speed 1800 kHz
Info : STLINK v2 JTAG v25 API v2 SWIM v14 VID 0x0483 PID 0x374B
Info : using stlink api v2
Info : Target voltage: 2.883677
Info : stm32f4x.cpu: hardware has 6 breakpoints, 4 watchpoints
therealprof commented 4 years ago

No idea, sorry. I've been using OpenOCD only for flashing but even that is obsolete now.

@arkap Any idea?

arkap commented 4 years ago

Sorry, I don't know either. The config works fine on my machine.

@therealprof Out of curiosity: What are you using instead of OpenOCD to flash and debug?

therealprof commented 4 years ago

For flashing I use cargo-flash from the probe-rs project: https://probe.rs/

I don't do debugging but in theory that should work with probe-rs, too.