Sign in

username:

password:



Not a member?

Search code-comp



Search tips

Subscribe to code-comp



code-comp by Keywords

ARM7 | BIOS | Bug | EVM | JTAG | Linker | LOG_printf | McBSP | Profiling | Relocation | RTDX | Simulator | Target | Watch

Discussion Groups

Discussion Groups | Code-Composer | HELP: LOG_printf and floats

Technical discussions about Code Composer Studio.

  

Post a new Thread

HELP: LOG_printf and floats - gary21uk2002 - Mar 26 16:33:00 2002



Hi,

I seem to have endless trouble trying to use LOG_printf() to display
a floating point value. I am using the latest and greatest CCS (2.1)
and I'm sure I saw that this includes a fix but it still doesn't work.

If I use
LOG_printf(&trace,"value=%f",floatvalue);
I get rubbish - quite possibly mis-interpreted bits.

I'm fed up getting round it using
LOG_printf(&trace,"value=%de-6",(int)(floatvalue*1e6));

Any help would be appreciated.

I am using CCS2.1 for C6x and a C6711 target via XDS510 JTAG emulator

Cheers,
... Gary





(You need to be a member of code-comp -- send a blank email to code-comp-subscribe@yahoogroups.com )

Re: HELP: LOG_printf and floats - Mikhail Fridberg - Mar 28 4:17:00 2002

On 3/26/02 11:33 AM, "gary21uk2002" <> wrote:

> Hi,
>
> I seem to have endless trouble trying to use LOG_printf() to display
> a floating point value. I am using the latest and greatest CCS (2.1)
> and I'm sure I saw that this includes a fix but it still doesn't work.
>
> If I use
> LOG_printf(&trace,"value=%f",floatvalue);
> I get rubbish - quite possibly mis-interpreted bits.
>
> I'm fed up getting round it using
> LOG_printf(&trace,"value=%de-6",(int)(floatvalue*1e6));
>
> Any help would be appreciated.
>
> I am using CCS2.1 for C6x and a C6711 target via XDS510 JTAG emulator
>
> Cheers,
> ... Gary >
As far as I can remember, Log_printf doesn't support floats. It's described
somewhere in the DSP/BIOS manual. In practice, if I remember right, it was
sort of working, but you couldn't be sure that it put out proper value or
anything at all.
Mike.




(You need to be a member of code-comp -- send a blank email to code-comp-subscribe@yahoogroups.com )