Rust Embed - LED Roulette - unknown architecture armv7e-m

I've just started with RUST embedded discovery book. I dont know much about embedded or GDB etc.

I'm getting some problems with the breakpoint.
When I setup the breakpoint it seems to get set somewhere into nrf52833-pacxxxx/src/

so, if I do layout src at this point, it jumps to this point in the code instead of the led-roulette program.

Can the lovely RUST community give me some pointers (:laughing:) as to whats going on here.
I might have not provided all the information, as i'm new to all this and dont know what other information to provide, so please let me know..

$ lsusb | grep -i "NXP ARM mbed"
Bus 001 Device 004: ID 0d28:0204 NXP ARM mbed

$ ls -l /dev/bus/usb/001/004
crw-rw-rw- 1 root root 189, 3 Feb  9 12:25 /dev/bus/usb/001/004

$ rustc -V
rustc 1.54.0 (a178d0322 2021-07-26)

$ cargo size --version
cargo-size 0.3.4

$ cargo embed --version
cargo-embed 0.11.0
git commit:


How do you set the breakpoint?

Just like the book said: break main

I do get an unknown architecture "armv7e-m" message when I start the remote


Ok, I found the problem.
I'll write a bit about it and could be of help for anyone starting with embedded and stuff..

I tried other fair few things and broke everything, then I started with the book from top again.
The problem was with the GDB.
So, first thing I noticed is that the book does say that this has been testing on ver 10 of GDB, and then doing a --version on the installed gdb it says version 9 and built for my machine arch.
But I need arm-arch, that would explain the unknown arch message above.

After looking around I found this blog about installing arm toolchain.

The blog also points to here, which is the ARM downloads page.

I'm on Ubuntu Focal (20) so I downloaded the Linux x86_64 Tarball and followed the blog.

To get the debugger going like in the book, i started the invocation like so:

arm-none-eabi-gdb target/thumbv7em-none-eabihf/debug/led-roulette -ex 'target remote localhost:1337'

and voila, I can follow along!

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.