与郭德华的gcc-arm-none-eabi交叉编译。

时间:2021-02-06 12:18:07

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:

我正在尝试使用郭台铭的gcc-arm-none-eabi来测试交叉编译。简单地说,下面是在Ubuntu上安装的步骤:

  • sudo add-apt-repository ppa:terry.guo/gcc-arm-embedded
  • sudo add-apt-repository ppa:terry.guo / gcc-arm-embedded
  • sudo apt-get update
  • sudo apt-get更新
  • sudo apt-get install gcc-arm-none-eabi
  • sudo apt-get安装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?
  • arm-eabi标头在哪里?
  • Where are the arm-eabi libs located?
  • arm-eabi libs在哪里?
  • 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

1 个解决方案

#1


0  

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:

问题是我在Ubuntu 14上安装了Debian的贫血工具;而不是郭台铭的工具,即使我加入了郭台铭的PPA。这可以用以下方法来解决:

  1. sudo apt-get remove binutils-arm-none-eabi gcc-arm-none-eabi
  2. sudo ap -get remove binutils- armno -eabi gcc- armno -eabi
  3. sudo apt-get autoremove
  4. sudo apt-get autoremove
  5. sudo add-apt-repository ppa:terry.guo/gcc-arm-embedded
  6. sudo add-apt-repository ppa:terry.guo / gcc-arm-embedded
  7. sudo apt-get update
  8. sudo apt-get更新
  9. sudo apt-get install gcc-arm-none-eabi=4-8-2014q2-0trusty10
  10. sudo apt-get安装gcc-arm-none-eabi = 4 - 8 - 2014 - q2 - 0 - trusty10

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.

/usr/bin/arm-none-eabi-gcc和朋友。

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

arm-eabi头在哪里?arm-eabi libs在哪里?艾比雪藏在哪里?

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

SYSROOT /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.

我还需要使用-mcpu=cortex-m3, -mthumb和-spec =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:

相关信息:Ubuntu将尝试在升级或升级时升级郭的包。这种行为可以通过锁定郭的包进行修改。要确定郭的包,请将以下内容添加到/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?.

感谢grawity对超级用户的信息。看到永久块发行包安装?。

#1


0  

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:

问题是我在Ubuntu 14上安装了Debian的贫血工具;而不是郭台铭的工具,即使我加入了郭台铭的PPA。这可以用以下方法来解决:

  1. sudo apt-get remove binutils-arm-none-eabi gcc-arm-none-eabi
  2. sudo ap -get remove binutils- armno -eabi gcc- armno -eabi
  3. sudo apt-get autoremove
  4. sudo apt-get autoremove
  5. sudo add-apt-repository ppa:terry.guo/gcc-arm-embedded
  6. sudo add-apt-repository ppa:terry.guo / gcc-arm-embedded
  7. sudo apt-get update
  8. sudo apt-get更新
  9. sudo apt-get install gcc-arm-none-eabi=4-8-2014q2-0trusty10
  10. sudo apt-get安装gcc-arm-none-eabi = 4 - 8 - 2014 - q2 - 0 - trusty10

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.

/usr/bin/arm-none-eabi-gcc和朋友。

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

arm-eabi头在哪里?arm-eabi libs在哪里?艾比雪藏在哪里?

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

SYSROOT /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.

我还需要使用-mcpu=cortex-m3, -mthumb和-spec =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:

相关信息:Ubuntu将尝试在升级或升级时升级郭的包。这种行为可以通过锁定郭的包进行修改。要确定郭的包,请将以下内容添加到/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?.

感谢grawity对超级用户的信息。看到永久块发行包安装?。