Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

To start off, anything that can be done in C, C++ can also do, as previously stated, C++ is basically a superset of C. For example, in FreeROTS, FreeRTOS can work with or work alongside a C++ embedded application. All of the FreeRTOS headers are wrapped in extern "C" {}blocks to ensure correct linkage in a C++ application. Therefore, it is quite easy to get FreeRTOS to work with C++. Moreover, C++'s addition of OOP provides overloaded functions and constructors which can be considered an asset for embedded systems programming.

C++ Drawbacks

The stack memory can be an issue since it is possible that too much of it is used. An existing solution is to avoid recursive functions and stick to iterative implementations.