-
What is C++ Hiding?
11/20/2015 at 17:22 • 0 commentsDevelopers who are new to or uncertain about C++ become concerned about the many details involved in using classes. Some of those details appear to be hidden costs. Actually C++ brings to light aspects of code that need to be considered. They've always existed but when you create a user defined class you're now responsible for everything. That's what the most recent article CODE CRAFT-EMBEDDING C++: HIDDEN ACTIVITIES? addresses.
-
C++ Virtual Function Are Fast
11/13/2015 at 17:46 • 0 commentsVirtual functions are not a problem for embedded systems. Their raw performance nearly matches normal C calls and in an overall system performance can actually be a faster. CODE CRAFT – EMBEDDING C++: TIMING VIRTUAL FUNCTIONS measures C function calls, C pointer to function calls, and C++ virtual calls and finds them taking the same amount of time, for pratical purposes.
-
Using Classes - No Code Bloat
11/06/2015 at 18:24 • 0 commentsThis article CODE CRAFT – EMBEDDING C++: CLASSES provides a short overview of C++ classes. It compares the code size for equivalent C and C++ versions of Arduino Uno and Due code. The finding is that classes do not increase the size of the code, which is what the article was intended to show.
-
Using Eclipse
10/31/2015 at 03:15 • 3 commentsThe Arduino IDE has limited capabilities. It is basically a text editor with some additional capabilities to add the tool chains for various Arduino boards and call them to build the executable.
An alternative is Eclipse since it has a plugin that uses the Arduino directories to control the Eclipse project. But Eclipse adds many capabilities for working with C++ (and C!) that make it a better choice than the Arduino IDE. If you have features of Eclipse that you like that weren't mentioned that's what comments are for.
There are other options to chose from and the article's comments list some of them. I'll try to remember to make a list of them somewhere in this project. Feel free to add comments here about other IDEs. No flame wars, please. Just factual descriptions of what works, how well, etc.
I'm going to be using Eclipse since I am used to working with it.
-
#Define Considered...
10/31/2015 at 03:10 • 0 commentsThis article is not directly related to this Embedding C++ project. It was written before the project began. But it is applicable because when switching to C++ the need to use macros (#define) is reduced considerably. As the article mentions, this was a specific goal of Bjarne Stroustrup as he developed the language.