-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
C++ on the boards #1323
Comments
Family: ARM compile tests
|
ping @BytesGalore : do we have any progress on this ? ;-) |
no, I haven't tested the implementation for some time if something changed 😊 |
For AVR I think I can say that there seems is currently no real C++ support on the side of avr-libc. Especially |
Arch Linux comes with |
@N8Fear It is not really viable to expect a full libstdc++ or similar on a microcontroller platform because of flash and RAM considerations, but there are lighter alternatives for a C++ template library if just the C++ support is there, e.g. http://msharov.github.io/ustl/ (I haven't tried that one yet, but I have been meaning to do it for some time) |
Ok - in this case: If C++ support means "there is a compiler" AVR should be fine.. ;-) |
@N8Fear : at least we want some basic object-oriented programming can be done, after that we can consider the support for other stuffs like STL (after evaluate the resource needed and real-time capacity on uCs ). ;-)
IMHO, I think it's the problem with C++ support on that platform in general not specific RIOT. I guess our main goal should be providing the build system to build C++ easily and making sure our source code don't do anything to violate C/C++ compatibility. In other words, it's something like "if some people can use C++ on a platform then they can use C++ with RIOT like normal because our build system can mix their code with RIOT and we don't mess anything up with C/C++ compatibility" ;-)
Therefore, if the "normal situation on a specific platform" has some difficulties with C++ then provide the better C++ support for that platform should be nice to have for RIOT but not mandatory. :-) BTW, arduino can do some C++ programming on avr, right? |
Honestly I don't know, but since the AVR arduinos use avr-libc themselves I guess that if it is possible, it's limited the same way as for us (no stdlib). |
@gebart : I also haven't tried this one but it looks really nice. I have a C++ project on RIOT with stm32 so I'll try it out. ;-) |
yeah, I have looked into some forums, it seems to be quite limited. I guess when we have time, we should get one and find out by ourselves. :D |
Because the deadline of my thesis is closing in, I will postponed the C++ support for msp430 and avr for several weeks, and the C++ support for these platforms probably can't make it into next release. I'll come back with this topic in 2, 3 weeks. |
Just successfully tested for the |
@dangnhat good luck for your thesis! |
@haukepetersen : good new! :D |
@dangnhat The Red hat one. |
hi i am a new comer , can you help me on how to get started with this issue ? few links or what am i looking to resolve ? |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If you want me to ignore this issue, please mark it with the "State: don't stale" label. Thank you for your contributions. |
This should have had tracking Issue Tag, should not have been closed. Re-open. |
For AVR, this guys did an awesome job. It generates a fairly complete C++ lib for the target, and they are focused on performance. It could be a good companion for RIOT. The only annoying thing is their extensive use of C++17 features, forcing the use of avr-gcc v7+; all major distros are stuck at v5.4 or alike, so a custom toolchain must be built. They distribute a pre-made v9.2 toolchain tough. |
@mfp20 would you be interested in looking into porting this e.g. as a package? The caveats can be dealt with later as long as there is documentation on it. |
Basic C++ support on RIOT is working on pretty much every board (except native on FreeBSD or so?). With the ETL package even a usable standard template lib exists. More native C++ wrappers for the C APIs that do make use of C++ features such as OOP, RAII, etc. where sensible would be nice, but that is orthogonal to this issue. Also, some platforms are still missing a C++ standard lib, at least AVR does. For AVR https://github.com/modm-io/avr-libstdcpp could be used. But I personally do not feel the itch to package that to just tick a box. If there would be users actually needing this, I could be motivated to do so. IMO this issue can be closed. Even thought there are still areas of improvement for C++ users, IMO new issues that are more explicit and focused on a single issue should be opened instead. But if someone disagrees: Feel free to reopen. |
@miri64 I apologize, I must have missed the notification mail of your message in 2020. I've just noted the thread now, on closing by @maribu. I am currently not using RIOT, relying on readily available firmware for my application, just for simple time/money availability constraints (in my life). So no, can't develop anything isn't a paid commercial project. But I hope to be able to change this whenever possible. |
RIOT now provides a seamless c and c++ handling in the RIOT build system for user applications.
But using c++ on specific boards requires adjustments, e.g. (un)set specific compiler and linker flags, provide/change system calls or even provide a custom tweaked compiler.
Here we can track the progression of board support and discuss related issues.
The text was updated successfully, but these errors were encountered: