How to translate ARM compiler commands to gcc cros

2019-08-13 03:07发布

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 arm gnu-make
1条回答
太酷不给撩
2楼-- · 2019-08-13 03:59

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

查看更多
登录 后发表回答