rust-embedded / book

Documentation on how to use the Rust Programming Language to develop firmware for bare metal (microcontroller) devices
https://docs.rust-embedded.org/book/
Apache License 2.0
1.08k stars 173 forks source link

After tool setup, Openocd quits before connecting #365

Closed archifo closed 8 months ago

archifo commented 8 months ago

I just managed to have all the software tooling installed on Windows 10 for my STM32F3DISCOVERY (the "F3") but when doing the final openocd test I got the following message. Any idea ? (Task manager doen't show any residual openocd process and netstat shows nobody sitting on port 6666).

C:\Users\franc>openocd -f interface/stlink.cfg -f target/stm32f3x.cfg xPack Open On-Chip Debugger 0.12.0+dev-01312-g18281b0c4-dirty (2023-09-04-22:32) 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 '. Info : The selected transport took over low-level target control. The results might differ compared to plain JTAG/SWD Error: couldn't bind tcl to socket on port 6666: No error

archifo commented 8 months ago

Finally, there indeed was a process sitting on port 6666, but not visible by windows' netstat ! There was a Powershell command to find it: $portProcessID = ( Get-NetTCPConnection -LocalPort 6666 ).OwningProcess ( Get-WmiObject win32process | Where-Object {$.ProcessID -eq $portProcessID } ).ProcessName and the to kill it Stop-Process -id $portProcessID Sorry for the disturbance.