Jump to content

Embedded C++

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by InternetArchiveBot (talk | contribs) at 05:11, 20 September 2017 (Rescuing 2 sources and tagging 0 as dead. #IABot (v1.5.2)). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

Embedded C++ (EC++) is a dialect of the C++ programming language for embedded systems. It was defined by an industry group led by major Japanese central processing unit (CPU) manufacturers, including NEC, Hitachi, Fujitsu, and Toshiba, to address the shortcomings of C++ for embedded applications. The goal of the effort [1] is to preserve the most useful object-oriented features of the C++ language yet minimize code size while maximizing execution efficiency and making compiler construction simpler. The official website states the goal as "to provide embedded systems programmers with a subset of C++ that is easy for the average C programmer to understand and use".[2]

Differences from C++

Embedded C++ is a proper subset of C++. The following language features have been removed:

Some compilers (such as Green Hills and IAR Systems) allows specific features in the above list to be re-enabled if desired, an implementation called "extended embedded C++".[3]

In addition, many users of Embedded C++ avoid the Standard Template Library with its use of dynamic memory allocation.[4]

Compilation

An EC++ program can be compiled with any C++ compiler. But, a compiler specific to EC++ may have an easier time doing optimization.

Compilers specific to EC++ are provided by companies such as:

Criticism

The language has had a poor reception with many expert C++ programmers. In particular, Bjarne Stroustrup says, "To the best of my knowledge EC++ is dead (2004), and if it isn't it ought to be."[8] In fact, the official English EC++ website has not been updated since 2002. Nevertheless, a restricted subset of C++ (based on Embedded C++) has been adopted by Apple, Inc. as the exclusive programming language to create all I/O Kit device drivers for Apple's Mac OS X and iOS operating systems of the popular MacBook, iPhone, and iPad products.[9] Apple engineers felt the exceptions, multiple inheritance, templates, and runtime type information features of standard C++ were either insufficient or not efficient enough for use in a high-performance, multithreaded kernel.[10]

See also

References

  1. ^ "EC++ Rationale".
  2. ^ EC++ Questions and Answers
  3. ^ "Embedded and Extended Embedded C++". Archived from the original on 21 May 2013. Retrieved 9 December 2012. {{cite web}}: Unknown parameter |deadurl= ignored (|url-status= suggested) (help)
  4. ^ "Use STL or not?". Retrieved 9 December 2012.
  5. ^ "IAR Systems - Compilers and debuggers". IAR Systems website.
  6. ^ "Embedded C++ compiler technology". Tasking website. Archived from the original on 2009-01-01. {{cite web}}: Unknown parameter |deadurl= ignored (|url-status= suggested) (help)
  7. ^ "Green Hills Optimizing C/C++/EC++ Compilers". Green Hills Software website. Archived from the original on 2008-10-25. {{cite web}}: Unknown parameter |deadurl= ignored (|url-status= suggested) (help)
  8. ^ "What do you think of EC++?". Bjarne Stroustrup's FAQ.
  9. ^ "What is Mac OS X?". Amit Singh.
  10. ^ "The libkern C++ Runtime". IOKit Device Driver Design Guidelines.