Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

05-led-roulette | cargo embed crashes on (gdb) target remote :1337 with During the execution of GDB an error was encountered: failed to fill whole buffer #508

Open
bcpeinhardt opened this issue Feb 13, 2023 · 6 comments

Comments

@bcpeinhardt
Copy link

05-led-roulette | cargo embed crashes on (gdb) target remote :1337 with During the execution of GDB an error was encountered: failed to fill whole buffer.
Coming at this with zero domain knowledge (never even used GDB) so could use some help. Running Ubuntu 22 and following along with Microbit v2.

@bcpeinhardt
Copy link
Author

Oh and on gdb's side of thing:

(gdb) target remote :1337
Remote debugging using :1337
warning: while parsing target description (at line 4): Target description specified unknown architecture "armv7"
warning: Could not load XML target description; ignoring
Truncated register 16 in remote 'g' packet

@SHA256man
Copy link

Oh and on gdb's side of thing:

(gdb) target remote :1337
Remote debugging using :1337
warning: while parsing target description (at line 4): Target description specified unknown architecture "armv7"
warning: Could not load XML target description; ignoring
Truncated register 16 in remote 'g' packet

Yes! This has to do with the compiler and gdb. gdb on your system works for probably x86 architecture but you are trying to run it on a program compiled and running on ARM. If you followed all the installing instructions in this tutorial so far, you should have a specific version of gdb installed. In your terminal do ls /bin | grep "gdb". This should return you all gdb related binaries. For me on arch it is arm-none-eabi-gdb and on ubuntu it should be something like gdb-arm-none-eabi. If there is nothing of the sort, you should install it via apt-get. Then run gdb-arm-none-eabi target/thumbv7em-none-eabihf/debug/led-roulette, assuming that this is the correct binary for ubuntu. Hope that helps.

@ghost
Copy link

ghost commented Mar 17, 2023

I am using Kubuntu as my Linux distro with a micro:bit 2.21
I am now in discovery/microbit/src/05-led-roulette/
This is how i solved it:

  1. Run sudo apt install gdb-arm-none-eabi
  2. Run cargo embed --features v2 --target thumbv7em-none-eabihf and do not terminate the process. Also I noticed that cargo-embed is using too much CPU (nearly 25%) and i don't know why
  3. Go back 2 directories to microbit/ and run gdb-multiarch target/thumbv7em-none-eabihf/debug/led-roulette
  4. Inside gdb, run target remote :1337

@umatbro
Copy link

umatbro commented May 19, 2023

I had the same problem on Arch (Manjaro). I roughly followed the steps above, the arch package is: https://archlinux.org/packages/community/x86_64/arm-none-eabi-gdb/

sudo pacman -S arm-none-eabi-gdb
arm-none-eabi-gdb target/thumbv7em-none-eabihf/debug/led-roulette

@smidkristian
Copy link

yeah, the key is to run gdb-multiarch instead of just gdb

@zhenyakornilov
Copy link

I can additionaly add If someone working on Windows then the key is to run arm-none-eabi-gdb instead of gdb, which you should have installed as dependency and add to Path in 3.2 Chapter of the Discovery book

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants