How can I install "gdb-arm-none-eabi" on Ubuntu 18.04 (Bionic Beaver)?
In previous versions of Ubuntu, GDB for ARM Cortex processors was part of the package gdb-arm-none-eabi
. Searching https://packages.ubuntu.com/ for gdb-arm-none-eabi
for Ubuntu 18.04 doesn't return any results. Am I missing something or why isn't there any GDB for ARM any more?
As far as I can see, there are two options:
- Install an old version (as pointed out by Chaos)
- Install gdb-multiarch, which actually worked for me.
I had the same question, and googled some more. It seems that with modern GDB you no longer need a GDB for your specific architecture. Just use GDB.
(seems to work on my older 16.04 workstation as well. I've been typing arm-none-eabi-gdb all those years, while just "gdb" would've worked just as well! .....)
I had the same issue with Ubuntu 18.04. To install “gcc-arm-none-eabi” on Ubuntu 18.04, do:
sudo apt-get install gcc-arm-none-eabi
Using this command, the system installs all binaries into the /usr/bin folder. But some binaries are not found here, so I am using its alternative way as below. It's working for me.
If you want to use the below arm-none-eabi utility,
arm-none-eabi-gdb
arm-none-eabi-as
arm-none-eabi-objcopy
Download the ARM-GCC toolchain from gnu-mcu-eclipse/arm-none-eabi-gcc.
I have downloaded "gnu-mcu-eclipse-arm-none-eabi-gcc-6.3.1-1.1-20180331-0618-centos64" for my x64 System.
After it has downloaded successfully, extract the compressed file. Go to
/gnu-mcu-eclipse-arm-none-eabi-gcc-6.3.1-1.1-20180331-0618-centos64/gnu-mcu-eclipse/arm-none-eabi-gcc/6.3.1-1.1-20180331-0618/bin
Copy the GDB and objcopy into the /usr/bin directory:
sudo cp arm-none-eabi-gdb /usr/bin/
sudo cp arm-none-eabi-objcopy /usr/bin/
After the copy, you can use GCC and GDB.
After installing gdb-multiarch
, you might want to add following symlink:
ln -s /usr/bin/gdb-multiarch /usr/bin/arm-none-eabi-gdb
to be able to execute:
arm-none-eabi-gdb
Run:
sudo apt install gdb-multiarch
gdb-multiarch my.elf