2 ms·
How happy are you with C++ on embedded devices? If possible, could you specify what platform you are working on and what compiler support is like? I hear its p
by revelation 14y ago
How happy are you with C++ on embedded devices? If possible, could you specify what platform you are working on and what compiler support is like?
I hear its popular among the Arduino crowd, but I've so far preferred C kernel style code for embedded.
- nanidin 14y agoI was working at Garmin - it was a mix of C and C++ on the devices. Most of Garmin's devices at the time ran Garmin's own proprietary OS, usually called GarminOS. The majority of the low level system code was written in C or ARM assembly, and the stuff in the application layer was more generally C++. There was definitely some of the C/C++ you read about too. I was happy with using C++ there - it didn't cause significant increases in code size, allowed STL container use, and was what I learned in undergrad, so it was easy. But it does present problems when you try to do everything the "C++ way" and get overzealous with OO design, then find out you now need to write a C wrapper so legacy code can call it. We used the official armcc compiler iirc, which we had binaries for linux/windows/etc. There were issues with building the code with gcc targeted at ARM and with clang I believe, it wasn't a priority to get it working but I'm sure it could have been done.