RTEMS C++ Issues
Ian Caddy
ianc at goanna.iinet.net.au
Mon Jul 9 02:26:19 UTC 2007
Hi Bob,
Robert S. Grimes wrote:
> Joel Sherrill wrote:
>> On psim at least, the cdtest sample runs fine except for the
>> global dtors.
> It is indeed the global ctors and dtors that I can't get to work!
>> It is a magic combinaton of bsp_specs and the linkcmds.
> This "magic" is what I'm lacking right now!
>> I don't know if that helps or not.
> It certainly helps in that it pinpoints the unknown! Anyone with any
> info on this?
I realise I am coming a bit late into this conversation, which I have
been loosely following, but...
Have you checked the section on C++ on the wiki:
http://www.rtems.com/wiki/index.php/Using_C_Plus_Plus
We had to get C++ working for our applications people, and these
applications run under RTEMS but are not directly linked with RTEMS, but
linked independantly using the RTEMS compiler, then our main RTEMS
system starts them up at startup.
I also had problems with the global CTORS which also causes problems
with exceptions, as these are lumped in with CTORS.
Somewhere in your code (after kernel start, but before init) call a
function that either the compiler/linker creates or your own one to init
the CTOR function handlers.
In our case we wrote our own global CTOR init, as it was being run
outside of RTEMS directly.
I hope this helps.
regards,
Ian Caddy
--
Ian Caddy
Goanna Technologies Pty Ltd
+61 8 9221 1860
More information about the users
mailing list