tenbaht / sduino

An Arduino-like programming API for the STM8
http://tenbaht.github.io/sduino/
GNU Lesser General Public License v2.1
349 stars 213 forks source link

Any plans to add C++ Support? #62

Closed bmitov closed 5 years ago

bmitov commented 5 years ago

I am looking if I can add support for the STM8 in Visuino. I already have added some support for STM32 and expanding it, and support most other modules - Nordic, Teensy, PIC32, AVR and many more. To add the support I will need to have C++ however since all Visuino libraries are written in C++ using the advanced C++ features to reduce dramatically the generated code. The automatic code generation is specifically optimized to generate shockingly small memory footprint, but for this it requires C++. Is there any chance that C++ support will be available in the future so I can add support in Visuino? https://www.visuino.com

bmitov commented 5 years ago

BTW: When I add it to Visuino, it will automatically get support all the Visuino libraries for all the hundreds of sensors, Displays and other modules that I have written ... well all written in highly optimized C++ (Much smaller footprint than the traditional Arduino libraries ;-) )

tenbaht commented 5 years ago

Unfortunately not. C++ is a basic requirement for Arduino as well and the lack of a C++ compiler for the STM8 is the whole point of this project here - it is a C port of a C++ based development environment. This requires some compromises and it is not a drop-in replacement, but it is pretty close.

bmitov commented 5 years ago

What is the reason C++ is not supported?

ElDominio commented 5 years ago

There is no compiler for C++ code for the STM8 line.

suprimex commented 5 years ago

it is. IAR Embedded Workbench. Free with 8 Kbyte code size limitation. https://www.iar.com/iar-embedded-workbench/#!?architecture=STM8

ElDominio commented 5 years ago

IAR is not open source

zoomx commented 5 years ago

STM has released an STM8 core for Arduino IDE some months ago. Since there is not any free compiler it uses Cosmic but you have to register and get a free license for one year. I believe that when the year license end you have to request again.