Changing the threads attributes to enable saving and
restoring the state of the FP coprocessor doesn't change
the function you call when you reference rtl_printf().
It's incapable of printing floating point without the
attribute change and it remains incapable with it.
There are several things you can do to print FP data but
they all involve some kind of hack at creating a function
that does the equivalent of sprintf( string , "%f" ,
variable) so you can pass a character string to rtl_printf.
If you absolutely must print the data, find a way to
convert it to a fixed precision integer representation and
print that.
Norm
----- Original Message -----
From: Tim Beamish <[EMAIL PROTECTED]>
To: rtlinux help <[EMAIL PROTECTED]>
Sent: Wednesday, November 14, 2001 3:34 PM
Subject: [rtl] printfing floats
> Can we do this in a real time thread:
>
> float x = 1.5;
> rtl_printf("%f", x);
>
> It's printing this for me:
> x = %f
>
> I've given the thread permission to do floating point
arithmetic but it
> shouldn't matter in this case.
>
> Tim
>
> -- [rtl] ---
> To unsubscribe:
> echo "unsubscribe rtl" | mail [EMAIL PROTECTED] OR
> echo "unsubscribe rtl <Your_email>" | mail
[EMAIL PROTECTED]
> --
> For more information on Real-Time Linux see:
> http://www.rtlinux.org/
>
-- [rtl] ---
To unsubscribe:
echo "unsubscribe rtl" | mail [EMAIL PROTECTED] OR
echo "unsubscribe rtl <Your_email>" | mail [EMAIL PROTECTED]
--
For more information on Real-Time Linux see:
http://www.rtlinux.org/