Search:

Embedded C++ compiler technology

TASKING is one of the first vendors to offer a compiler that supports Embedded C++. But why an Embedded C++ when there already is C++?

The Embedded C++ Technical Committee was formed in Japan in early 1995 with the goal to produce an open standard for Embedded C++ which addresses the specific requirements of embedded system designs and to encourage commercial products to support this standard. It is a non-profitable and voluntary organization which consists of steering members, observers and a secretariat. To ensure we are aware of any EC++ activities as well as provide feedback, TASKING is a participant in the Embedded C++ Technical Committee.

C++ is a powerful language that is becoming standardized, but it is complex to use and can dramatically increase code size, particularly compared to C. It includes features such as exceptions, runtime type identification and multiple inheritance which can result in added overheads even when they are not being used. Simple expressions, such as template specializations, can generate large amounts of code or code that takes a long time to execute. Library functions, particularly input/output, may call and include much more code than necessary for basic functionality.

Major EC++ Benefits:
  • reduces code size
  • increases run-time efficiency
  • simplifies programming

Embedded C++ is a subset of C++ that includes all the required features to meet the needs of embedded systems programming, offers upward compatibility with C++, and retains all the major advantages of C++. Embedded C++ omits the following features which are useful, but not necessary in an embedded environment:

  • exceptions
  • multiple inheritance
  • virtual base classes
  • templates
  • namespaces
  • runtime type identification (RTTI)
  • new-style casts
  • virtual function tables
  • mutable specifiers

The Embedded C++ library omits features not supported by the EC++ language and seldom needed in embedded applications but also includes features more suited for embedded applications:

  • No templates indicates no Standard Template Library, no templatized string, complex or iostreams classes
  • No exceptions indicates no exception-handling functions or classes
  • No runtime type identification implies no type_info class
  • no support for wide-character input/output, locales, and long double arithmetic provides iostreams operations with the traditional names istream, ostream, ios, streambuf
  • Math functions are overload for both double and float, in both real and complex modes.
  • Provides support for class string
Magazine Article

The following magazine article provide more information on Embedded C++: