rust-embedded / discovery

Discover the world of microcontrollers through Rust!
https://docs.rust-embedded.org/discovery/
Apache License 2.0
1.46k stars 504 forks source link

Can't follow the book because gdb isn't available on Apple M1 #468

Open thehappycoder opened 1 year ago

thehappycoder commented 1 year ago

This could be a good alternative https://github.com/knurling-rs/probe-run

aronzvi commented 1 year ago

@thehappycoder Can you please provide details on how to use probe-run instead of gdb?

lpython commented 1 year ago

I've gotten halfway through the book on an M1 air, what exactly didn't work? So far, its been better than any attempt I've made on windows. I installed gdb through homebrew.

slyons commented 1 year ago

@thehappycoder I was able to run it after installing all of the targets by using arm-none-eabi-gdb instead of gdb

rashack commented 1 year ago

@slyons can you please elaborate on what you did to make it work? What did you install and how? And what did you use instead of gdb?

lpython commented 1 year ago

@rashack nothing too special, I've only have been using a Mac for a year and use brew to install most cli programs.

brew install arm-none-eabi-gcc brew install minicom openocd

I've used the previous rust embedded discovery book which really is still current, just for a different board. Specifically, this page should cover all the details

a file located at ./src/.cargo/config.toml should identify the target for the executable and the command to run which is something like bash``` arm-none-eabi-gdb -q -x ../openocd.gdb

rashack commented 1 year ago

@slyons Ah, thank you! What did it for me was brew install arm-none-eabi-gcc and then I got it going with .../discovery/microbit $ arm-none-eabi-gdb target/thumbv7em-none-eabihf/debug/led-roulette

markmurphydev commented 1 year ago

Seems like arm-none-eabi-gcc is no longer listed on homebrew. Had to tap https://github.com/eblot/homebrew-armeabi to get it.