jww
jww

Reputation: 102376

Cross-compile with Terry Guo's gcc-arm-none-eabi

I'm trying to test a cross compile using Terry Guo's gcc-arm-none-eabi. In a nutshell, here are the steps to install on Ubuntu:

The problem I am having is I can't find the documentation (or I'm doing something wrong). I know I can't ask for documentation or other off-site resources, so I'll cut right to the chase:


$ find /usr -iname *arm-eabi*
$ find /usr -iname *gcc-arm*
/usr/share/lintian/overrides/gcc-arm-none-eabi
/usr/share/doc/gcc-arm-none-eabi
$ info gcc-arm-none-eabi
No menu item `gcc-arm-none-eabi' in node `(dir)Top'.
$ man gcc-arm-none-eabi
No manual entry for gcc-arm-none-eabi

Upvotes: 2

Views: 3695

Answers (1)

jww
jww

Reputation: 102376

The problem was I got Debian's anemic arm embedded tools on Ubuntu 14; and not Terry Guo's tools even though I added Guo's PPA. This can be fixed with:

  1. sudo apt-get remove binutils-arm-none-eabi gcc-arm-none-eabi
  2. sudo apt-get autoremove
  3. sudo add-apt-repository ppa:terry.guo/gcc-arm-embedded
  4. sudo apt-get update
  5. sudo apt-get install gcc-arm-none-eabi=4-8-2014q2-0trusty10

With the proper package in place:

What is the name of the compiler?
Where is the compiler located?

/usr/bin/arm-none-eabi-gcc and friends.

Where are the arm-eabi headers located?
Where are the arm-eabi libs located?
Where is the arm-eabi sysroot located?

SYSROOT is /usr/lib/gcc/arm-none-eabi/4.8.2/armv7-m.

I also needed to compile with -mcpu=cortex-m3, -mthumb and --specs=nosys.specs.


Related: Ubuntu will attempt to upgrade Guo's packages during a upgrade or dist-upgrade. The behavior can be modified by pinning Guo's package. To pin Guo's package, add the following to /etc/apt/preferences:

Package: binutils-arm-none-eabi
Pin: origin ppa.launchpad.net
Pin-Priority: 900

Package: gcc-arm-none-eabi
Pin: origin ppa.launchpad.net
Pin-Priority: 900

Thanks to grawity on Super User for the information. See Permanently block distro package installation?.

Upvotes: 0

Related Questions