RES: RTEMS with C++

Fabrício de Novaes Kucinskis fabricio at dea.inpe.br
Wed Oct 11 17:09:46 UTC 2006


Angelo, Leon, Chrises (Welch and Johns ;-)

Thank you for your answers.

Good to know that I'm wrong about RTEMS and C++, but I have to convince some
other people here too.

We'll start developing new software for the space area in C. We already have
experience with software for satellites, but using assembly - ok, *I* don't
have; I'm the new guy here.

We tend to keep the software as simple as possible. A study was made here
some years ago, and it pointed that the C++ compiler could generate a less
reliable executable than "pure" C. I think today there are more cases of
success, and this study can be outdated. I know NASA and ESA already use C++
embedded in their spacecrafts. Although we are a little bit far from them,
maybe we could start using C++ carefully - without its exception handling
and RTTI, for example.

I'm used to write C applications with RTEMS, but not with C++. As the
examples that come with RTEMS don't focus on OO (I found just two little
examples), I'd like to get some more examples. Things like using a method as
an entry point to a task and the proper C++ makefile for RTEMS are not clear
to me yet. Are there more "RTEMS++" examples available? Were can I get them?

Thank you all again and best regards,


Fabrício.



-----Mensagem original-----
De: rtems-users-bounces at rtems.org
[mailto:rtems-users-bounces at rtems.org]Em nome de Chris Welch
Enviada em: segunda-feira, 9 de outubro de 2006 16:52
Para: 'RTEMS Users'
Assunto: RE: RTEMS with C++


I've used it heavily specifically for code reuse.

I used RTEMS and C++ for a generator controller.

One example of where I found C++ perfect was for a fault class.  All of the
faults for the system inherit from a common fault object.  Once I had the
basic fault object working, I knew that any problems I was having with a
specific fault was due to specialization.

The basic fault class set up properties such as:

1) Delay before going to monitoring
2) Delay before going active
3) Setting up UI fault signaling
4) Fault reset
5) Alarm reporting

This made adding and maintianing faults in the system trivial.  Very little
code is required for the fault specialization.

This is just one example.  If you code decently, there is very little
overhead involved.  Extremely critical sections can be done in straight C as
you can work back and forth with out any problems.

We have had significantly fewer bugs with this system then the previous
three that were built using straight C.

----
Chris Welch, Neumes Consulting, PC and UNIX Solutions
mailto:cwelch at neumes.com (613)797-7831 FAX:(613)838-5602
http://www.neumes.com

-----Original Message-----
From: rtems-users-bounces at rtems.org [mailto:rtems-users-bounces at rtems.org]
On Behalf Of Fabrício de Novaes Kucinskis
Sent: Monday, October 09, 2006 1:59 PM
To: RTEMS - Mailing List
Subject: RTEMS with C++

Hello all,


I'd like to know if someone here uses C++ with RTEMS.

What are the advantages? I see just disadvantages, such as the obvious
overhead.

I don't see a good use for objects instantiated inside only one task (maybe
the encapsulation of the code?), and since the communication between objects
in different tasks should be done through the RTEMS managers, I think
there's no reason to use C++ and OO in a RTEMS application. But I'd like to
be convinced that C++ in RTEMS is something good.

One more question: does the "librtems++" switch link the OO wrappers to the
managers?
Thanks in advance,


Fabrício de Novaes Kucinskis - DEA / INPE
-----------------------------------------
Grupo de Supervisão de Bordo - SUBORD
Divisão de Eletrônica Aeroespacial
Instituto Nacional de Pesquisas Espaciais

_______________________________________________
rtems-users mailing list
rtems-users at rtems.com
http://rtems.rtems.org/mailman/listinfo/rtems-users


_______________________________________________
rtems-users mailing list
rtems-users at rtems.com
http://rtems.rtems.org/mailman/listinfo/rtems-users




More information about the users mailing list