DSPRelated.com
Forums

LOG_printf ( float )

Started by gary21uk2002 May 23, 2002
Hi,

I have a library that is used on two different hardware platforms -
one is big-endian, the other little endian. I compile two libraries
using CCS 2.1 and the only difference in the CDB config file is
big/little endian.

When I look at LOG_prinf output when a float is "printed", the little
endian version prints OK but the big endian version prints 0.00000
2.00000 or some HUGE number. Printing integers works fine on both.

Does anyone know what is happening or preferably how to fix it ? I
suspect the big endian float is being interpreted as little endian.
Anyone know if this is a "known" problem (I couldn't find it in the
TI Knowledgebase).

Many thanks,
... Gary



Hi Gary,

On Thu, 23 May 2002, gary21uk2002 wrote:

> Hi,
>
> I have a library that is used on two different hardware platforms -
> one is big-endian, the other little endian. I compile two libraries
> using CCS 2.1 and the only difference in the CDB config file is
> big/little endian.
>
> When I look at LOG_prinf output when a float is "printed", the little
> endian version prints OK but the big endian version prints 0.00000
> 2.00000 or some HUGE number. Printing integers works fine on both.
>
> Does anyone know what is happening or preferably how to fix it ? I
> suspect the big endian float is being interpreted as little endian.
> Anyone know if this is a "known" problem (I couldn't find it in the
> TI Knowledgebase).
>
> Many thanks,
> ... Gary

My reply is a bit late. If you have found the answer yourself, please
disregard this mail.

The document "TMS320C6000 DSP/BIOS Application Programming Interface (API)
Reference Guide" (SPRU403C) reads on page 2-117:

The arguments passed to LOG_printf must be integers, strings, or a
pointer if the special %r conversion character is used.

The float type is not mentioned, though somebody on this list has
indicated this also could work in some cases.

Hope this helps.
--
Regards, | /^^^\
Yury | (| , , |)
| | * |
E-mail: yury.burkatovsky at telrad dot co dot il | \_-_/