PowerPC: *printf in non-float-tasks
Joel Sherrill
joel.sherrill at OARcorp.com
Fri Mar 28 12:37:04 UTC 2003
Thomas Doerfler wrote:
>Hello,
>
>
>
>>>I am a bit confused, this would mean that in a standard
>>>environment I can't perform *printf call on a MPC8260 from
>>>non-float tasks, or I have to tweak the linker to always use
>>>non-float libraries.
>>>
>>>Any hints what would be the "clean" way to deal with this?
>>>
>>>
>>>
>>>
>>Is there an alternate "integer only" version of this with a name line
>>"sniprintf"?
>>newlib has those for some printf variants.
>>
>>
>
>I can fix the current situation by using siprintf (it's not
>identical, but the length limit of "snprintf" is not really
>needed in ata.c). But still my question remains: According to
>this behaviour I either must use the "non-floating-point" libs
>with my applications or can't use printf in non-floating
>tasks. This seems a bit strange to me.
>
>
We saw this problem on the base printf a few years ago. It declares
float variables at the top of the function which are only needed in a
few format specifiers. If you move the variables to a more local
spot, it should avoid the problem.
Or modify newlib to compile this printf variant for integer only also.
>wkr,
> Thomas.
>
>
>
>
>>>wkr,
>>> Thomas Doerfler.
>>>--------------------------------------------
>>>IMD Ingenieurbuero fuer Microcomputertechnik
>>>Thomas Doerfler Herbststrasse 8
>>>D-82178 Puchheim Germany
>>>email: Thomas.Doerfler at imd-systems.de
>>>PGP public key available at: http://www.imd-
>>>systems.de/pgp_keys.htm
>>>
>>>
>>>
>>>
>>>
>>
>>
>
>--------------------------------------------
>IMD Ingenieurbuero fuer Microcomputertechnik
>Thomas Doerfler Herbststrasse 8
>D-82178 Puchheim Germany
>email: Thomas.Doerfler at imd-systems.de
>PGP public key available at: http://www.imd-
>systems.de/pgp_keys.htm
>
>
>
More information about the users
mailing list