PowerPC: *printf in non-float-tasks

Joel Sherrill joel.sherrill at OARcorp.com
Fri Mar 28 00:15:55 UTC 2003

Thomas Doerfler wrote:

>with the current RTEMS version (4.6.0pre1) and tools we ran 
>into the following problem: 
>We have a home-brewn BSP based on the MPC8260ADS, but 
>including ATA/DOSFS support. During startup (before init task 
>is started) the ata driver is initialized and it uses 
>"snprintf" to gererate device name strings. We get a "floating 
>point unavailable" exception during snprintf execution.
>When we investigated further on, we found out, that the linker 
>uses libraries that are compiled with floating-point opcodes, 
>this seems reasonable in general. But the snprintf function 
>will save/restore floating point registers even when no 
>floating point formats are used for the actual *printf call.
>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 
newlib has those for some printf variants.

>	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-

More information about the users mailing list