Greetings. I am using GCC v3.3 compiler for MSP430. I can't get uprintf() to work for floating point variables. Here is example code:
float i, k, m; i = 20.125f; k = 20.125F; m = 2.0125E+1;
uprintf( serial_out, "%F \r\n", i ); uprintf( serial_out, "%F \r\n", k ); uprintf( serial_out, "%2.2E \r\n", m ); uprintf( serial_out, "%g \r\n", m );
Compiler messages:
analog9.c:259: warning: double format, float arg (arg 3) analog9.c:261: warning: double format, float arg (arg 3) analog9.c:263: warning: double format, float arg (arg 3) analog9.c:265: warning: double format, float arg (arg 3)
The people who did the port for the MSP430 say; that floating point is a work in progress but I don't know if my problem is due to missing facilities. I can perform floating point arithmetic and view the results using GDB, but it won't print. The msp-gcc manual says floating point operations work for type float but not type double. By declaring the variables as float and using the f suffix, I think the variables must be type float, but the compiler messages suggest that they are type double. I am puzzled. Help and suggestions appreciated. JC