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:

  • sudo add-apt-repository ppa:terry.guo/gcc-arm-embedded
  • sudo apt-get update
  • sudo apt-get install gcc-arm-none-eabi
  • 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:

  • What is the name of the compiler?
  • Where is the compiler located?
  • Where are the arm-eabi headers located?
  • Where are the arm-eabi libs located?
  • Where is the 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:

  • sudo apt-get remove binutils-arm-none-eabi gcc-arm-none-eabi
  • sudo apt-get autoremove
  • sudo add-apt-repository ppa:terry.guo/gcc-arm-embedded
  • sudo apt-get update
  • 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?.

    链接地址: http://www.djcxy.com/p/86952.html

    上一篇: 在没有Xcode IDE的情况下开发c ++

    下一篇: 与Terry Guo的gcc一起编译