ubuntu
I am trying to install the gnu arm toolchain for ubuntu. I first downloaded the tar from CodeSourcery. However when I go into the bin folder, I cannot run any of the binaries. I have tried with ./ and without and putting it in the PATH and it keeps telling me "Command not Found" yet the file is there in the folder right in front of me. Then I tried sudo apt-get install gcc-arm-linux-gnueabi except after it says it has installed successfully, I cannot find it with whereis gcc-arm-linux-gnueabi. Can anyone help?
Are you compiling on a 64-bit OS? Try:
sudo apt-get install ia32-libs
I had the same problem when trying to compile the Raspberry Pi kernel. I was cross-compiling on Ubuntu 12.04 64-bit and the toolchain requires ia32-libs to work on on a 64-bit system.
See http://hertaville.com/2012/09/28/development-environment-raspberry-pi-cross-compiler/
CodeSourcery convention is to use prefix arm-none-linux-gnueabi-
for all executables, not gcc-arm-linux-gnueabi
that you mention. So, standard name for CodeSourcery gcc would be arm-none-linux-gnueabi-gcc
.
After you have installed CodeSourcery G++, you need to add CodeSourcery directory into your PATH
.
Typically, I prefer to install CodeSourcery into directory like /opt/arm-2010q1
or something like that. If you don't know where you have installed it, you can find it using locate arm-none-linux-gnueabi-gcc
, however you may need to force to update your locate db using sudo updatedb
before locate
will work properly.
After you have identified where your CodeSourcery is installed, add it your PATH by editing ~/.bashrc
like this:
PATH=/opt/arm-2010q1/bin:$PATH
Also, it is customary and very convenient to define
CROSS_COMPILE=arm-none-linux-gnueabi-
in your .bashrc
, because with CROSS_COMPILE
defined, most tools will automatically use proper compiler for ARM compilation without you doing anything.
固定,使用:
sudo apt-get install gcc-arm*
链接地址: http://www.djcxy.com/p/19072.html
上一篇: 如何在windows 7中安装Module :: Build with strawberry perl
下一篇: Ubuntu的