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.12k stars 177 forks source link

Segmentation fault #313

Closed KenxinKun closed 2 years ago

KenxinKun commented 2 years ago

Hi! I'm just trying to run the verification steps (here) and all the variants of the command return me a segmentation fault... Here's the output:

$ openocd -f interface/stlink.cfg -f target/stm32f3x.cfg

Open On-Chip Debugger 0.11.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
Info : Listening on port 6666 for tcl connections
Info : Listening on port 4444 for telnet connections
Info : clock speed 1000 kHz
[1]    71890 segmentation fault  openocd -f interface/stlink.cfg -f target/stm32f3x.cfg

Some extra context:

Any suggestions on how to solve this?

Thanks!

KenxinKun commented 2 years ago

Aftes some help from a friend debugging via lldb it seems my issue is the same as the one described here. Uninstalling openocd and reinstalling with brew install openocd --HEAD fixed the segmentation fault issue :) Closing this but adding link above in case someone else gets stuck in the same place!

Screenshot 2022-03-12 at 14 31 41