Hi,
You should work using subversion trunk code, 16.1 is a stable branch and will not receive any enhancement, only bug fixes.
Other questions are likely explained here: http://chibios.org/dokuwiki/doku.php?id ... tyle_guide
The document is meant for C, it could require changes in order to address C++ too.
Giovanni
C++ wrappers
- Giovanni
- Site Admin
- Posts: 14891
- Joined: Wed May 27, 2009 8:48 am
- Has thanked: 1202 times
- Been thanked: 996 times
Re: C++ wrappers
Hi,
I just stumbled over a trouble which I was expecting when rebasing to trunk.
'trunk' as svn://svn.code.sf.net/p/chibios/svn/trunk@9602 just does not compile RT-STM32F407-DISCOVER-G++,
making it hard to test my changes.
Questions 2, 4, 9 and probably 10 are still open.
Helmut
I just stumbled over a trouble which I was expecting when rebasing to trunk.
'trunk' as svn://svn.code.sf.net/p/chibios/svn/trunk@9602 just does not compile RT-STM32F407-DISCOVER-G++,
making it hard to test my changes.
Questions 2, 4, 9 and probably 10 are still open.
Helmut
Re: C++ wrappers
Hi Jovanni,
just went through the coding style (again). I just wonder: Is there a reason for pressing C89
it is just ANCIENT, it might be legitimate not to go C11, but at least I know of no single C-compiler,
that does not support C99 (which is 17 years old
)
Helmut
PS: I don't want to start a flame war here, I'm just curious.
just went through the coding style (again). I just wonder: Is there a reason for pressing C89
it is just ANCIENT, it might be legitimate not to go C11, but at least I know of no single C-compiler,
that does not support C99 (which is 17 years old
Helmut
PS: I don't want to start a flame war here, I'm just curious.
- Giovanni
- Site Admin
- Posts: 14891
- Joined: Wed May 27, 2009 8:48 am
- Has thanked: 1202 times
- Been thanked: 996 times
Re: C++ wrappers
Hi,
Products are meant to be portable, if you go outside the ARM perimeter there are proprietary compilers that do not support C99.
Giovanni
Products are meant to be portable, if you go outside the ARM perimeter there are proprietary compilers that do not support C99.
Giovanni
Re: C++ wrappers
Hi,
I'm having hard times to rebase the wrappers to trunk, stumbling over compile errors again and again ...
Helmut
I'm having hard times to rebase the wrappers to trunk, stumbling over compile errors again and again ...
Code: Select all
../../../os/hal/src/hal_usb.c: In function 'usbStop':
../../../os/hal/src/hal_usb.c:324:3: error: 'spip' undeclared (first use in this function)
spip->config = NULL;
^
../../../os/hal/src/hal_usb.c:324:3: note: each undeclared identifier is reported only once for each function it appears in
make: *** [build/obj/hal_usb.o] Error 1
helmut@daredevil:~/work/tpd02/chHALE/ChibiOS/demos/STM32/RT-STM32F746G-DISCOVERY-LWIP-FATFS-USB$
Helmut
- Giovanni
- Site Admin
- Posts: 14891
- Joined: Wed May 27, 2009 8:48 am
- Has thanked: 1202 times
- Been thanked: 996 times
- Prof. Dr. YoMan
- Posts: 57
- Joined: Thu May 24, 2012 11:00 am
- Been thanked: 1 time
Re: C++ wrappers
Hi,
I just want to point on this: https://community.arm.com/groups/tools/ ... itten-in-c
Gaining C++11 compatible threading and lots of STL functionality is really nice.
I just want to point on this: https://community.arm.com/groups/tools/ ... itten-in-c
Gaining C++11 compatible threading and lots of STL functionality is really nice.
- Giovanni
- Site Admin
- Posts: 14891
- Joined: Wed May 27, 2009 8:48 am
- Has thanked: 1202 times
- Been thanked: 996 times
Re: C++ wrappers
Interesting, still a proposal but I think we should keep an eye on it and try to influence it for the better.
I think that the core should stay written in C and provide a C++ wrapper, current approach. I don't see advantages in writing directly in C++ and it would impact portability.
Giovanni
I think that the core should stay written in C and provide a C++ wrapper, current approach. I don't see advantages in writing directly in C++ and it would impact portability.
Giovanni
Re: C++ wrappers
Giovanni wrote:Hi,
Fixed that error, it was caused by a recent change.
Giovanni
Hi,
in which commit?
... OK, just saw it its 9610, sorry.
The question now is, how is often is the github mirror updated?
Helmut
Last edited by helmut on Tue Jun 14, 2016 12:27 pm, edited 2 times in total.
- Prof. Dr. YoMan
- Posts: 57
- Joined: Thu May 24, 2012 11:00 am
- Been thanked: 1 time
Re: C++ wrappers
It is not only a proposal. Check the git-repos on github.
http://micro-os-plus.github.io/cmsis-plus/ and some others.
From what I know from Liviu it already runs in the simulator and passes the CMSIS-RTOS test suite.
And there is a working version with FreeRtos as sheduler. He is answering mails pretty fast. Maybe ask direcly (with link to this thread).
From my point of view the step to C++11 and above is the only possible solution, because this is the first "complete" version of C++ which is broadly compatible on different compilers and which got a reeeeealy got Lib and API.
Every thing is very well though. Check the books "A Tour of C++" by Stroustrup, "The C++ Standard Library" by Jusuttis and
http://isocpp.github.io/CppCoreGuidelin ... Guidelines / https://github.com/isocpp/CppCoreGuidelines
and
https://github.com/Microsoft/GSL
uC these days are big enough to handle this well and it is not true that C++ is a memory hog or that everything is done dynamically. Building on templates and C++11 STL one could easily build stuff without any dynamic memory allocation, completely checked static by compiletime.
Great for embedded stuff.
C++11 and above is the way to go.
http://micro-os-plus.github.io/cmsis-plus/ and some others.
From what I know from Liviu it already runs in the simulator and passes the CMSIS-RTOS test suite.
And there is a working version with FreeRtos as sheduler. He is answering mails pretty fast. Maybe ask direcly (with link to this thread).
From my point of view the step to C++11 and above is the only possible solution, because this is the first "complete" version of C++ which is broadly compatible on different compilers and which got a reeeeealy got Lib and API.
Every thing is very well though. Check the books "A Tour of C++" by Stroustrup, "The C++ Standard Library" by Jusuttis and
http://isocpp.github.io/CppCoreGuidelin ... Guidelines / https://github.com/isocpp/CppCoreGuidelines
and
https://github.com/Microsoft/GSL
uC these days are big enough to handle this well and it is not true that C++ is a memory hog or that everything is done dynamically. Building on templates and C++11 STL one could easily build stuff without any dynamic memory allocation, completely checked static by compiletime.
Great for embedded stuff.
C++11 and above is the way to go.