This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: C++ Exception Handling under eCos


>From: Andrew Lunn <andrew.lunn@ascom.ch>
>To: Jonathan Larmour <jlarmour@redhat.com>
>CC: Rosimildo daSilva <rosimildo@hotmail.com>, 
>ecos-discuss@sources.redhat.com
>Subject: Re: [ECOS] C++ Exception Handling under eCos
>
>Could you point me towards some documentation as to what is
>required. eCos already has mutex and per thread data storage, so at
>least that part is done.


As far I can tell, the docs for this is the GCC source code. :-)

Look at: gcc/configure.in

Study what is done with 'thread_file'. This variable
is set to the proper header file when the option

./configure  --enable-threads

is given. So, a ecos dependent header needs to be added.
Study the posix header file:

   gcc/gthr-posix.h

or others RTOS' ones, such as VxWorks if you are familiar with it.

A couple trick things:

  + Remember that you do not have the Ecos header files
at the time that you are building the toolset.

  + I would suggest to make all typedefs 'opaque' using
'void *' to avoid dependency on eCos header files.

  + Add an API layer, similar to POSIX, that make calls
to the implementation that will be provided by Ecos
libraries. A default implementation would be emtpy functions
( when no kernel is configured ) for GDB stubs compilation.
Another reason to do this, is that you cab change, fix, optimize,
etc, the implementation on Ecos wihtout worring about
GCC releases.

  + If you want examples, look at the RTEMS or vxWorks implementations. But, 
you would need a very recent
snapshot of GCC.

...

Take care. As I said before, this is not a picnic
at the park. :-)

Rosimildo.

_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]