如何将 ARM 编译器命令转换为 gcc 交叉编译工具链? [英] How to translate ARM compiler commands to gcc cross compile toolchain?

查看:85
本文介绍了如何将 ARM 编译器命令转换为 gcc 交叉编译工具链?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有许多 armcc 命令,我喜欢将它们转换为 gcc 选项.该代码最初用于不同的环境.我确实查看了 gcc --help,但没有看到相同的选项,例如 --cpu.有人可以帮忙吗?下面是命令:

I have a number of armcc commands, which I like to translate to gcc options. The code was originally for a different environment. I did look at gcc --help and I did not see the same options such as --cpu. Can anyone help please? Here are the commands:

del .\obj\*.o

armcc  -c --debug --cpu=Cortex-A9.no_neon.no_vfp -O1 -o ./obj/foo     ./src/foo.c
armcc  -c --debug --cpu=Cortex-A9.no_neon.no_vfp -O1 -o ./obj/bar ./src/bar.c 

armasm    --debug --cpu=Cortex-A9.no_neon.no_vfp     -o ./obj/buz.o  ./src/buz.s
armasm    --debug --cpu=Cortex-A9.no_neon.no_vfp     -o ./obj/58

armlink   --scatter=scatter_foo.txt --entry=fooStart -o foo.axf ./obj/foo  ./obj/bar ./obj/buz.o ./obj/58

fromelf --bin -o foo.bin foo.axf

del .\obj\*.o

armcc  -c --debug --cpu=Cortex-A9.no_neon.no_vfp -I ./headers/ -O1 -o ./obj/foo.o     ./src/foo.c
armcc  -c --debug --cpu=Cortex-A9.no_neon.no_vfp -I ./headers/ -O1 -o ./obj/bar.o ./src/bar.c
armcc  -c --debug --cpu=Cortex-A9.no_neon.no_vfp -I ./headers/ -O1 -o ./obj/buz.o      ./src/buz.c

armasm    --debug --cpu=Cortex-A9.no_neon.no_vfp                        -o ./obj/bar.o  ./src/bar.s
armasm    --debug --cpu=Cortex-A9.no_neon.no_vfp --diag_suppress=A1786W -o ./obj/bar.o         ./src/bar.s
armasm    --debug --cpu=Cortex-A9.no_neon.no_vfp                        -o ./obj/58

armlink   --scatter=foo.txtt  -o example.axf --entry=bar --keep=bar.o(NORMAL_IMAGE) ./obj/foo.o  ./obj/bar.o ./obj/startup.o ./obj/58

推荐答案

您使用 gcc --help 获得的选项并未列出所有选项(只有很多).而是阅读应列出所有选项的在线文档.此外,汇编器和链接器以及对象转储器(从 ELF 文件创建二进制文件)不是 GCC 的一部分,而是 GNU binutils 包的一部分.– 来自 Joachim Pileborg

The options you get with gcc --help doesn't list all options (there are simply to many). Instead read the online documentation which should list all options. Also, the assembler and linker and object dumper (to create binary files from ELF files) is not part of GCC but of the GNU binutils package. – From Joachim Pileborg

这篇关于如何将 ARM 编译器命令转换为 gcc 交叉编译工具链?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆