我正在尝试在raspberry pi上安装汇编代码的工具链。我使用以下步骤安装程序包文件:
$ wget http://www.cl.cam.ac.uk/freshers/raspberrypi/tutorials/os/downloads/arm-none-eabi.tar.bz2
--2012-08-16 18:26:29-- http://www.cl.cam.ac.uk/freshers/raspberrypi/tutorials/os/downloads/arm-none-eabi.tar.bz2
Resolving www.cl.cam.ac.uk (www.cl.cam.ac.uk)... 128.232.0.20, 2001:630:212:267::80:14
Connecting to www.cl.cam.ac.uk (www.cl.cam.ac.uk)|128.232.0.20|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 32108070 (31M) [application/x-bzip2]
Saving to: `arm-none-eabi.tar.bz2'
100%[======================================>] 32,108,070 668K/s in 67s
2012-08-16 18:27:39 (467 KB/s) - `arm-none-eabi.tar.bz2' saved [32108070/32108070]
$ tar xjvf arm-none-eabi.tar.bz2
arm-2008q3/arm-none-eabi/
arm-2008q3/arm-none-eabi/lib/
arm-2008q3/arm-none-eabi/lib/libsupc++.a
arm-2008q3/arm-none-eabi/lib/libcs3arm.a
...
arm-2008q3/share/doc/arm-arm-none-eabi/info/gprof.info
arm-2008q3/share/doc/arm-arm-none-eabi/info/cppinternals.info
arm-2008q3/share/doc/arm-arm-none-eabi/LICENSE.txt
$ export PATH=$PATH:$HOME/arm-2008q3/bin这似乎是工作,包文件是在正确的位置。
~/arm-2008q3/bin $ ls
arm-none-eabi-addr2line arm-none-eabi-gcc-4.3.2 arm-none-eabi-objdump
arm-none-eabi-ar arm-none-eabi-gcov arm-none-eabi-ranlib
arm-none-eabi-as arm-none-eabi-gdb arm-none-eabi-readelf
arm-none-eabi-c++ arm-none-eabi-gdbtui arm-none-eabi-run
arm-none-eabi-c++filt arm-none-eabi-gprof arm-none-eabi-size
arm-none-eabi-cpp arm-none-eabi-ld arm-none-eabi-sprite
arm-none-eabi-g++ arm-none-eabi-nm arm-none-eabi-strings
arm-none-eabi-gcc arm-none-eabi-objcopy arm-none-eabi-strip然而,当我去make时,我得到了以下结果。
arm-none-eabi-as -I source/ source/main.s -o build/main.o
make: arm-none-eabi-as: Command not found
make: *** [build/main.o] Error 127提前感谢您的帮助。
发布于 2013-04-09 16:44:07
export PATH=$PATH:$HOME/arm-2008q3/bin仅在执行它的shell中有效(以及从该shell派生的任何shell)。因此,您可以使用该shell而不是打开新shell来执行make或编辑~/.bashrc (请参阅Unix: Getting Export PATH to "Stick")
发布于 2013-07-06 06:20:06
我遇到了同样的问题,在我的例子中,问题是我运行的是64位操作系统,而要使用的包是32位的。修复方法是安装i32-libs包,它允许在64位系统上运行32位应用程序。
# apt-get install ia32-libs发布于 2014-04-16 21:43:57
您必须将编译器定向到arm-none-eabi-as所在的正确路径。您可以通过以下方式执行此操作
导出路径=$path:/file_path_goes_here/
当你编译的时候,你应该不会有任何问题,因为编译器现在会知道去哪里找。
https://stackoverflow.com/questions/15750545
复制相似问题