RTEMS C++ examples?

Joel Sherrill joel at rtems.org
Wed Jul 24 23:25:09 UTC 2019

We don't have any great C++ examples but there are samples like cdtest.
Personally, I am in the habit of having an rtems_config.c file which does
configuration and startup and calls main. Just have a C++ main that is
called from the Init thread. Pure POSIX code in the "main()".

One open issue we don't know the right solution to is how to mix C/C++
threads with POSIX threads. The language threads don't have as many
attributes as POSIX threads including stack size and priority. Ignoring
that, the task synchronization objects in C++ should just work on RTEMS.

Maybe you can create (or port) some neat examples. And we could talk about
them on embedded.fm. :)


On Tue, Jul 23, 2019 at 12:02 AM <groups at chichak.ca> wrote:

> I’m trying to figure out how to get started with using C++ with RTEMS.
> Mostly as an academic endeavour to figure out what people are talking about
> when they say that C++ is so much better than C.
> Can anybody point me at any C++ sample code to create a couple of tasks,
> pass a message back and forth perhaps? Like a multi-task blinky.
> Thanks,
> Andrei
> _______________________________________________
> users mailing list
> users at rtems.org
> http://lists.rtems.org/mailman/listinfo/users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/users/attachments/20190724/6c7fa476/attachment-0002.html>

More information about the users mailing list