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.
Tool/software: Code Composer Studio
Dears,
The floating point number can't be print out using the function printf(),in CCS 6.13 compiler environment, on AM5728 test board.But other types of variables can be print out.
Why?
Thanks for your heip!
Both the TI and GCC ARM compilers have options which can exclude support for floating point in printf and related functions:JohnS said:From what I can tell GCC for ARM disables float for printf.
1) With the TI ARM compiler the "Level of printf/scanf support required (--printf_support)" option must be set to "full" for printf to handle floating point arguments. With TI ARM compiler v16.9.4.LTS this option is in the project properties under Build -> ARM Compiler -> Advanced Options -> Language Options:
2) For GCC ARM compiler it is the Runtime support library under the General project properties which selects if printf supports floating point:
The *_nano.a versions of the run time library don't support floating point arguments for printf. E.g. for both GCC v4.9.3 and v6.3.1 when using a C test program:
- Setting the Runtime support library to libc.a allowed printf to output floating point values.
- Setting the Runtime support library to libc_nano.c prevented printf from outputting floating point values - the floating point arguments were ignored.