PowerPC: *printf in non-float-tasks

Thomas Doerfler Thomas.Doerfler at imd-systems.de
Thu Mar 27 22:48:39 UTC 2003


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?

	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