Hello,
I am using "TWR-K20D72M" board and "IAR Embedded Workbench IDE" software for coding.this board support virtual serial terminal using "OSBDM/OSJTAG - CDC SERIAL PORT" for display. this terminal supports printf() means using printf() i can print any value in this virtual terminal. if i print any integer,hexadecimal,octal then this printf works properly. please try to solve my below query.
1) using printf if i want to print float value then this will not print float value so i can't print float value in virtual terminal
using %f.
2) also if i try to convert this float value in string using sprintf() also this function not work properly in this board.
please give me library or API supported by this board so that i can print float value in virtual terminal for this board.
Thank You
Bhavin
In your 'Project...' 'Options...' dialog, 'General Options' group, 'Library Options' tab, specify a printf and/or scanf that includes the formats you are looking for (Large to get float for instance, I use 'Large without multibytes' for printf.
Hi EARL GOODRICH Thank you for your reply as per your suggestion in 'Library option' i tried 'Large' and 'Large without multibyte' but still it not print the float value.
I guess I should have asked if you have a specific 'printf' routine already in your project (rather than, and thus ignoring, said IAR library version). If so, I see that you have two options:
Follow the options in this link:
Use and print out floating point with K60 and codewarrior
to update your local printf() and fix/deal-with negatives.
OR remove/disable your local printf() and alter the 'byte input' for that "OSBDM/OSJTAG - CDC SERIAL PORT" process to allow or match the default character-out required-link for the IAR-library printf() function, which I believe is '__write'. See also: