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.

Compiler/CCSTUDIO-C2000: Usage of printf and scanf

Part Number: CCSTUDIO-C2000


Tool/software: TI C/C++ Compiler

Hi,

I am facing some issues while using printf and scanf function in a C2000 CCS project. I tried with two compiler versions : v18.9.0 EABI and v18.1.3 COFF. Run time libraries : rts2800_fpu32_eabi.lib and rts2800_fpu32.lib respectively.

Below is my code snippet:

scanf ("%d", &n);

...

printf ("%6.1f \n", Microseconds);

where n is an int variable and Microseconds is a float variable.

I have some other printf statements that uses int variable which works fine. But when I use a float variable with %f, the function never returns and is stuck at ltoa function. I have set --printf_support as full.

While using scanf function, it does not wait for the user input and returns immediately. 

Can someone help me identify what the issue is

Regards,

Veena