I am continuing to catch up with highlighting articles that I have had published at embedded.com. This time they are focused on C++ and on multicore embedded applications …
Operator overloading is a powerful feature of the C++ language. Used with care, it can yield readable, maintainable and efficient code. However, it is just as easy to write “clever” code which is apparently elegant, but, in reality, is hard to understand and, hence, unmaintainable. This article gives examples of good and bad practice and investigates how and where an embedded developer might make good use of operator overloading.
The replacement of a function call by a copy of the code of the function can be a very effective optimization, particularly if execution speed is the priority. This article takes a look at how inlining works, when it can be effective and how it may happen automatically in C++.
Multicore and multiple CPU embedded systems are becoming mainstream, after many years of hype. There are many articles about multicore design that address different hardware architectures (homogeneous and heterogeneous multicore) and software architectures (AMP: asymmetrical multi-processing and SMP: symmetrical multi-processing). In this article the development of an AMP system is outlined, highlighting various challenges that were addressed. What is unusual is that the design was completed in 1981!
MCAPI is a standardized API for communication and synchronization between closely distributed cores and/or processors in embedded systems, defined and maintained by the Multicore Association. This article outlines what MCAPI is, how it works and how it may be deployed in multicore systems, including review of the API.