我正在尝试构建一个裸机臂项目。我尝试了 GNU 工具链arm-elf
和arm-none-eabi
. 两个工具链生成的可执行文件在转换为 intel hex 格式时运行良好。
我正在使用 Proteus 软件进行模拟。Proteus 支持调试 elf 和 coff 格式的可执行文件。
在我的情况下,Proteus 接受生成的可执行文件,arm-elf
但在加载生成的可执行文件时显示错误arm-none-eabi
。Proteus 显示的错误信息是:
我只是file
在 linux 中以两个可执行文件作为参数运行该命令,一个接一个。
结果如下所示。
arm-none-eabi 输出
图片:ELF 32 位 LSB 可执行文件,ARM,EABI5 版本 1 (SYSV),静态链接,未剥离
手臂精灵输出
图片:ELF 32 位 LSB 可执行文件,ARM,版本 1,静态链接,未剥离
是否有任何选项可以使用 arm-none-eabi 工具链生成与 Proteus 兼容的 elf 文件?
编辑:我的收费链版本的详细信息。
C:\SysGCC\arm-elf\bin>arm-elf-gcc.exe --version
arm-elf-gcc.exe (GCC) 4.6.3
Copyright (C) 2011 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
C:\SysGCC\arm-elf\bin>arm-elf-as.exe --version
GNU assembler (GNU Binutils) 2.22
Copyright 2011 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License version 3 or later.
This program has absolutely no warranty.
This assembler was configured for a target of `arm-elf'.
sreeyesh@ITP-PTLX118:~$ arm-none-eabi-gcc --version
arm-none-eabi-gcc (15:4.9.3+svn227297-1) 4.9.3 20150529 (prerelease)
Copyright (C) 2014 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
sreeyesh@ITP-PTLX118:~$ arm-none-eabi-as --version
GNU assembler (2.25-10ubuntu1+5build1) 2.25
Copyright (C) 2014 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License version 3 or later.
This program has absolutely no warranty.
This assembler was configured for a target of `arm-none-eabi'.
提前致谢。