Getting C++ to work on ARM
Joel Sherrill <joel@OARcorp.com>
joel.sherrill at OARcorp.com
Fri Oct 21 15:42:05 UTC 2005
Jay Monkman wrote:
> I'm trying to run a C++ program on ARM. I suspect C++ has never worked on ARM in
> RTEMS, but I'm not positive. I'm using a fairly recent checkout of the CVS HEAD
> (about 2 weeks old). I've tested this on Coldfire and it works fine, so I'm
> pretty sure the problem lies within the ARM specfic code.
>
> I'm running the iostream sample program on ARM, and it crashes. It dies
> somewhere within
> std::cout << "\n\n*** HELLO WORLD TEST ***" << std::endl;
>
>>From what I can tell _M_streambuf within the output stream is never getting set,
> so later when something is sent to the stream, a NULL pointer get dereferenced
> and BOOM!
>
>
> Can anyone give me any pointers to how to start debugging this?
http://www.rtems.org/wiki/index.php/Using_C_Plus_Plus is a good starting
point. There were some formatting errors in it from the PhpWiki
conversion but I tried to fix them. If you see more feel, free to edit
and fix. Mostly they mess up code examples with _.
The trick it to have a properly constructure init and fini section.
That usually requires magic inthe bsp_specs and linkcmds. Look at what
gcc does by default (no -qrtems) and the linker scripts installed in the
toolset.
> Thanks.
--
Joel Sherrill, Ph.D. Director of Research & Development
joel at OARcorp.com On-Line Applications Research
Ask me about RTEMS: a free RTOS Huntsville AL 35805
Support Available (256) 722-9985
More information about the users
mailing list