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. :) --joel On Tue, Jul 23, 2019 at 12:02 AM <gro...@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@rtems.org > http://lists.rtems.org/mailman/listinfo/users
_______________________________________________ users mailing list users@rtems.org http://lists.rtems.org/mailman/listinfo/users