compile with Terry Guo's gcc
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:
arm-eabi
headers located? arm-eabi
libs located? arm-eabi
sysroot
located? $ 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
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:
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?.
链接地址: http://www.djcxy.com/p/86952.html下一篇: 与Terry Guo的gcc一起编译