注释:
Cortex®-R5F 和 A53 工具链的使用方式较为相似。
编译
arm-none-eabi-gcc -c file1.c -I<include_path> -o file1.o
arm-none-eabi-gcc -c file2.c -I<include_path> -o file2.o
链接
arm-none-eabi-gcc -Wl,-T -Wl,lscript.ld -L<libxil.a path> -o
"App.elf"file1.o file2.o -Wl,--start-group,-lxil,-lgcc,-lc,--end-group
如需获取上述命令中所用标志的描述,请使用以下命令参阅编译器帮助信息:
-
--help
-
-v --help
-
--target-help
编译器选项
在 GNU 网站上可找到可使用 Arm® 相关标志来应用的其他 GNU 编译器选项。这些标志均可在上述步骤中按需使用。以上链接中列出了所有 Arm® GCC 编译器选项。但实际支持取决于所用的目标(在此例中,即 Arm Cortex-A9、Cortex-A53, Cortex®-A72 和 Cortex-R5F)和编译器工具链。