How to translate ARM compiler commands to gcc cross compile toolchain?

谁都会走 提交于 2019-12-13 01:00:54

问题


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

回答1:


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



来源:https://stackoverflow.com/questions/31262164/how-to-translate-arm-compiler-commands-to-gcc-cross-compile-toolchain

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!