-
Book Overview & Buying
-
Table Of Contents
C++ in Embedded Systems
By :
In Chapter 6, we discussed interoperability between C and C++. We learned about language linkage and how to use it to include C libraries in a C++ project. From the technical standpoint, that’s all we need to use C in C++.
In this chapter, we’ll focus on software development techniques for integrating C libraries into a C++ project to enhance code flexibility. Since many C++ projects still rely on vendor-provided C hardware abstraction layers (HALs), we’ll concentrate on how to effectively incorporate these C libraries into our projects.
Additionally, this chapter will cover the Resource Acquisition is Initialization (RAII) paradigm and explain why it’s particularly beneficial in embedded systems. By automatically managing resource allocation and deallocation, RAII greatly reduces the risk of leaks and other resource misuse issues, which is especially important in resource-limited embedded environments.
In this chapter...