This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

[参考译文] CCS/66AK2H14:使用 gcc 编译器创建 hello 工程不会立即编译

Guru**** 2966500 points

Other Parts Discussed in Thread: 66AK2H14

请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/tools/code-composer-studio-group/ccs/f/code-composer-studio-forum/935269/ccs-66ak2h14-creating-a-hello-project-using-the-gcc-compiler-does-not-compile-out-of-the-box

器件型号:66AK2H14

工具/软件:Code Composer Studio

你好

这更像是一个错误报告和指南、用于说明其他人是否遇到相同的问题。  我正在使用

  • evmK2H  
  • CCS 9.3
  • GNU v9.2.1 (Linaro)编译器
  • Linux 主机

GNU 编译 器的原因是 TI 编译器不适用于 A15、因为 ARM 的唯一目标是 GNU.targets.arm.A15F。

当我创建一个新的 CCS 项目时、选择目标、Cortex A、编译器 GNU v9.2.1、空项目(带有 main.c)、为其命名并完成。

现在尝试进行编译。  失败时出现以下错误:

Makefile:137:目标'test.out'的配方失败
ti/ccs930/Ccs/tools/compiler/gcc-arm-no-eabi-9-2019-Q4-maj/bin/。/lib/gcc/arm-none-eabi/9.2.1/../../../../arm-none-eabi/bin/ld:错误:./main.o 使用 VFP 寄存器参数、test.out 不使用 

好的、从技术上讲、它在链接时失败、而不是编译...

因此、问题是代码是使用硬浮点(默认设置)编译的、但链接器不会设置为使用硬浮点。  我的快速修复方法是也只需将"-mfloat-abi=hard"添加到链接器命令中。   

工程-属性-编译- GNU 连接器-编辑标志... 然后在 其中粘贴-mfloat-abi=hard。  应用并关闭。  compile 和 Bob 是您的叔叔。

希望这能帮助未来的用户、或许技术支持人员构建修复程序。

Christo