工具/软件:Code Composer Studio
德拉斯,
在 CCS 6.13 编译器环境的AM5728测试板上,不能使用函数printf(),输出浮点数。但可以输出其他类型的变量。
为什么?
谢谢你的臀部!
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.
TI和GCC ARM编译器都具有可排除printf和相关函数中浮点支持的选项:从我可以告诉GCC for ARM禁用printf的浮点。
1)使用TI ARM编译器时,“需要printf/scanf支持级别(--printf_support)”选项必须设置为“完全”,以便printf处理浮点参数。 对于TI ARM编译器v 16.9 .4.LTS,此选项位于“生成”->“ARM编译器”->“高级选项”->“语言选项”下的项目属性中:
2)对于GCC ARM编译器,它是General项目属性下的运行时支持库,用于选择printf是否支持浮点:
运行时库的*_nano。a版本不支持printf的浮点参数。 例如,使用C测试程序时,gcc v 4.9 .................3和6.3 v.1:
-将运行时支持库设置为libc.a允许printf输出浮点值。
-将运行时支持库设置为libc_nano.c可防止printf输出浮点值-浮点参数被忽略。