rtems++ failure help....

Charles-Antoine Gauthier charles.gauthier at nrc.ca
Mon May 29 13:34:44 UTC 2000


Joel Sherrill wrote:
> 
> 
> "John S. Gwynne" wrote:
> >
> > | > I'm trying to make progress in understanding why the rtems++ test program
> > | > (beta3) fails on the efi332 (m68332) target.
> >
> > <delete>
> >
> > | > The virtual pointer table (_vptr) is zero, which leads to my "bus
> > | > error" when the virtual function task->body is resolved and
> > | > executed (I think :).
> > |
> > | Looking at the code, Task1 is a global object. If you do not run static
> > | constructors this test will fail. Maybe the test code should check for
> > | this case.
> >
> > And that is indeed the case.  Turns out bootcard was not calling _init
> > which was not calling the appropriate constructor... easy fix... add
> > "AM_CPPFLAGS = -DUSE_INIT_FINI" to startup/Makefile. Now onto the
> > problem in sp28...
> 
> Does this mean that ALL m68k BSPs need to have this turned on?

I would think that all m68k ELF targets require this. Given that ELF is
now the default, the answer is: probably. You still have support for
COFF. I don't remember if COFF targets insert a call to __main in main,
and if any users have a requirement to produce COFF images. If COFF
doesn't use _init/_fini, then you have to arrange to not call these when
COFF output is produced.

In the beginning, I had switched on the __ELF__ compiler predefined
rather than on the USE_INIT_FIN RTEMS compile time constant. I still
think that its a better idea to "query" the compiler rather than code
the selection in RTEMS. If you want to switch on USE_INIT_FINI, the
predefine could be added to the rtems.h files under
egcs/gcc/config/<target>.

Just my 0.02$

> 
> Comments appreciated before I do something broad. :)
> 
> > john gwynne
> 
> --
> 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

-- 
Charles-Antoine Gauthier
Institute for Information Technology   Institut de technologie de
l'information
National Research Council of Canada    Conseil national de recherches du
Canada



More information about the users mailing list