4 ms·
The Arduino and friends can run on C++. The Arduino “IDE” uses “C almost ++”, but C++ compilers for AVR and ARM boards do exist.
by colejohnson66 5y ago
The Arduino and friends can run on C++. The Arduino “IDE” uses “C almost ++”, but C++ compilers for AVR and ARM boards do exist.
- nine_k 5y agoCertainly you can write C++ for MCUs; the question is, should you, and does the ecosystem encourage that. OTOH a bigger ARM core can very well be found on a small embedded computer, and it's capable enough to run something like a browser. At this scale, pure C becomes burdensome, and libraries (like a browser engine, or Qt) are in C++ anyway.
- pjmlp 5y agoARM has a C++ based OS, so there are customers that care.
- colejohnson66 5y ago> and does the ecosystem encourage that. In the case of Arduinos? Yes. As I said, the original Arduino IDE has partial C++ support. Classes are used by almost every library. The AVR series originally targeted are 8 bit MCUs, and they run fine despite the ATMega328p, for example, having only 32 KB of flash.