C++ wrappers

This forum is dedicated to feedback, discussions about ongoing or future developments, ideas and suggestions regarding the ChibiOS projects are welcome. This forum is NOT for support.
User avatar
Korken
Posts: 270
Joined: Wed Apr 02, 2014 4:09 pm
Location: Luleå, Sweden
Has thanked: 5 times
Been thanked: 6 times
Contact:

Re: C++ wrappers

Postby Korken » Fri Jul 29, 2016 5:59 pm

I did the change to use namespaced functions rather than static classes, please have a look.
There was no difference in size or binary of the tests I made - it should be equivalent to static classes, but following recommended practices.
Attachments
cpp-wrapper-patch-20160729.zip
(21.15 KiB) Downloaded 285 times

User avatar
Korken
Posts: 270
Joined: Wed Apr 02, 2014 4:09 pm
Location: Luleå, Sweden
Has thanked: 5 times
Been thanked: 6 times
Contact:

Re: C++ wrappers

Postby Korken » Wed Aug 17, 2016 1:11 pm

Any updates on this?
No comments so far, so I assume it to be ok.

User avatar
Giovanni
Site Admin
Posts: 14444
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 1074 times
Been thanked: 921 times
Contact:

Re: C++ wrappers

Postby Giovanni » Wed Aug 17, 2016 7:07 pm

I have not reviewed it yet but it will happen after I am back to work.

Giovanni

User avatar
Korken
Posts: 270
Joined: Wed Apr 02, 2014 4:09 pm
Location: Luleå, Sweden
Has thanked: 5 times
Been thanked: 6 times
Contact:

Re: C++ wrappers

Postby Korken » Mon Oct 03, 2016 7:45 pm

Hi again!
Any news on this and the FatFS updates?

User avatar
Giovanni
Site Admin
Posts: 14444
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 1074 times
Been thanked: 921 times
Contact:

Re: C++ wrappers

Postby Giovanni » Mon Oct 03, 2016 7:51 pm

In queue.

I am struggling through all the opened bugs, this is next :)

Giovanni

User avatar
Korken
Posts: 270
Joined: Wed Apr 02, 2014 4:09 pm
Location: Luleå, Sweden
Has thanked: 5 times
Been thanked: 6 times
Contact:

Re: C++ wrappers

Postby Korken » Mon Oct 03, 2016 7:55 pm

Thanks for the update, sounds good!
I just saw all the "bumped" in the bugs section, you have quite some work in queue. :)

User avatar
Giovanni
Site Admin
Posts: 14444
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 1074 times
Been thanked: 921 times
Contact:

Re: C++ wrappers

Postby Giovanni » Mon Oct 03, 2016 8:01 pm

I need to close a release with all bugs fixed before moving to next major step, 17.1 probably...

Giovanni

helmut
Posts: 18
Joined: Thu Apr 07, 2016 9:06 am
Has thanked: 1 time
Been thanked: 3 times

Re: C++ wrappers

Postby helmut » Wed Oct 05, 2016 5:26 pm

Hi,

it just took too long incorporating the C++ wrappers, so I lost interest a bit (No offense, Giovanni!)
We aren't currently using C++ for our product anymore, so ...

Just a few points (I reviewed Korken's changes a bit):

1) static inlines allow the compiler to optimize a function for each compilation unit individually and forget
about the function afterwards, so you better keep them!
2) passing arguments as const when they are passed by value anyway (like size_t) won't make any difference, there is
no point in having a local copy that is not modifiable (it might even hinder implementation).
3) BaseStaticThread is just no 'good' name for a class: both base and static have multiple meanings depending on
the context, just as ThreadReference was (reference being C++ (and other languages) lingo). Pulling the thread
context out of the thread class makes it necessary to use 2 lines instead of 1 line of code for instantiation, but renders the ThreadReference
class unnecessary, it ends up being a reference to a Thread (&Thread) as expected. Some ChibiOs functions return C-pointers
to threads which would conflict with a Thread in C++ having a workspace member!

Point 3 was one of the largest changes of the C++ wrappers and made the interface a lot more convenient.

Helmut

User avatar
ilg-ul
Posts: 1
Joined: Mon Jul 04, 2016 7:42 pm

Re: C++ wrappers

Postby ilg-ul » Sun Oct 23, 2016 9:58 pm

> Interesting, still a proposal

As Prof. Dr. YoMan mentioned, µOS++/CMSIS++ (http://micro-os-plus.github.io) is more than a proposal, it is a fully functional RTOS running an Cortex-M devices and on POSIX synthetic platforms.

Some demo projects are available from https://github.com/micro-os-plus/eclipse-demo-projects.

The native APIs are C++, all objects that require dynamic memory use standard allocators, full static builds are possible, basic memory management is handled by C++17 style memory managers, and many more. In addition it has a fully functional C API, built as a 1:1 wrapper for C++ calls.

The current stable version is 6.3.9; the user manual is currently work in progress.

User avatar
Korken
Posts: 270
Joined: Wed Apr 02, 2014 4:09 pm
Location: Luleå, Sweden
Has thanked: 5 times
Been thanked: 6 times
Contact:

Re: C++ wrappers

Postby Korken » Sat Jan 28, 2017 2:34 pm

It seems that we are more or less in agreement on the C++ wrapper.
I will bump it so it is not forgotten. *bump*


Return to “Development and Feedback”

Who is online

Users browsing this forum: Bing [Bot] and 11 guests