stdc++ (cout) problem with RTEMS on Sparc emulator

Courtney B. Duncan courtney.b.duncan at jpl.nasa.gov
Thu Oct 21 23:39:48 UTC 2004


I am developing code for a Sparc V7 which uses RTEMS and running it 
on a freeware emulator

(see http://www.estec.esa.nl/wsmwww/erc32/freesoft.html )

Everything in the development environment for C and C++ works when 
built with RTEMS.  I'm able to do mathematical calculations, view 
outputs via printf(), build abstract and derived classes that work, 
and so forth, as expected.  The compiler is a backend to GNU C++, 
'sparc-rtems-gcc'.

When I try to use cout, linking in -lstdc++, the build grows by about 
60K (which should be fine) and the emulator stops on an undefined 
instruction before anything else happens.  I have not been able to 
find other methods in libstdc++ that I need which don't also pull in 
cout and ostream operator<<(), etc., so I'm not able to tell if this 
is just a problem with iostream or the entire library.  Attempting to 
use vector<double> leads to the same UI stop, for example.

A colleague thought that RTEMS might not yet be robust in this area, 
for instance, there might be some processor specific code in some 
iostream related routines.

The questions are:  Am I on the right track in tracking down this 
problem?  Does C++ cout work for anybody under RTEMS?  Isn't there a 
printf() based cout implementation that ought to work in this 
situation?
-- 
courtney.duncan at jpl.nasa.gov
818-354-8336
M/S 301-125L

"We can lick gravity but sometimes the paperwork is overwhelming." 
Dr. Wernher von Braun, circa 1957.



More information about the users mailing list