23

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?

2
  • Just a general note: ARM aren't distributing their tools via PPA any more (latest version on Launchpad is 6.3.1, but actually they're on 10.2.1 at time of writing), and you have to get it from their site. Annoying, esp if you don't realize! ARM's announcement here: launchpad.net/gcc-arm-embedded Check this answer for full details: askubuntu.com/a/1243405/498719
    – SusanW
    Dec 12, 2020 at 18:00
  • Ubuntu is Debian based and on Debian's package tracker I can see that the package was not maintained any longer: tracker.debian.org/pkg/gdb-arm-none-eabi Therefore it was removed from Debian and therefore also Ubuntu. It is sad. I also need it...
    – 71GA
    Jul 1, 2021 at 9:23

7 Answers 7

20

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.
1
  • 6
    gdb-multiarch worked for me. May 9, 2018 at 15:41
13

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! .....)

2
  • 2
    Are you using gdb or gdb-multiarch in Ubuntu? May 7, 2018 at 8:47
  • 12
    Plain "gdb" does not work (produces "warning: Architecture rejected target-supplied description"), you need "gdb-multiarch". May 9, 2018 at 15:44
6

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
3

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.

1

packages for ARM's pre-built toolchain, download the "Linux 64-bit" file and put its bin directory on your path. Here's one way to do it:

$ cd /usr/local/share
$ tar xjf ~/Downloads/gcc-arm-none-eabi-9-2019-q4-major-x86_64-linux.tar.bz2

Then, use your editor of choice to append to your PATH in the appropriate shell init file (e.g. ~/.zshrc or ~/.bashrc):

export PATH=$PATH:$HOME/local/gcc-arm-none-eabi-7-2017-q4-major/bin
arm-none-eabi-gcc --version
arm-none-eabi-g++ --version
arm-none-eabi-gdb --version
arm-none-eabi-size --version
1

Install gdb-multiarch instead which can serve your requirement:

$ sudo apt install gdb-multiarch
$ gdb-multiarch my.elf
1
0

I searched for and found that package in Synaptic package manager. Just install synaptic and search for it. You can find it in the software store or by sudo apt-get install synaptic

4
  • 1
    Are you sure that you are on 18.04 since it does not show any results here: packages.ubuntu.com/… nor via apt-cache search gdb-arm-none-eabi May 2, 2018 at 13:53
  • Yes I just installed it 2 days ago. Did you try searching in synaptic ?
    – Chaos
    May 2, 2018 at 14:02
  • 1
    It is a headless machine, so no X environment -> no synaptic. Also, "apt-cache search gdb-arm-none-eabi" should list the package, but there is none. Have you tried to search it online via packages.ubuntu.com (the link in my previous comment points to the search with bionic pre-selected)? What's the version of the package you find with synaptic? May 2, 2018 at 14:08
  • Oh yes I understand now! I have added the trusty repository, that's why I found it in synaptic. You could do the same and then use apt-get to install the package. I tried it in terminal and found the package. The version is 7.6.50.20131218-0ubuntu1+1
    – Chaos
    May 2, 2018 at 14:32

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .