Embedded C++ for Tornado

Partners - Ada 95/AdaMULTI for Tornado

Embedded C++ (EC++) is a subset of ANSI C++ that is designed to meet the needs of embedded systems developers, offer full compatibility with C++, and retain all the major object-oriented advantages of C++. Compared to ANSI C++, EC++ also offers reduced code size, increased deterministic behavior, and ease of use - making it far more appropriate for embedded development.
 
Many ANSI C++ features can result in added code size and performance overheads even if they are not used in an application. Simple expressions such as template specialization can generate code that is large or that takes a long time to execute. Library functions, particularly input-output, may call and include much more code than necessary for basic functions. EC++ removes these limitations by omitting nonessential C++ features that would otherwise increase code size and impair the run-time efficiency of most embedded applications.
WindLink Partner
True EC++ compilers vs. coding style
A true EC++ compiler, such as the one from Green Hills Software, is required in order to achieve the maximum benefits of the EC++ language. For example, simply coding within the reduced syntax of EC++ and compiling with an ANSI C++ compiler will not produce reduced code size to the extent that a true EC++ compiler will. Furthermore, EC++ libraries are required to avoid unintentional code bloat and inefficiency, both of which result from the use of ANSI C++  libraries, even if you are coding within the EC++ subset.


EC++/Tornado solution
Green Hills Software's EC++ compiler is seamlessly integrated with Wind River Systems' Tornado™ development environment. This gives embedded developers the option of engineering applications in EC++, while utilizing all of the powerful features of Tornado. The EC++/Tornado integration results in a comprehensive and fully integrated EC++ software development environment with support for thread-safe exception handling.  In addition to an EC++ cross compiler, Green Hills' MULTI® integrated development environment includes a graphical class browser, a text editor, run-time error checking, and version control.


Powerful tools for real-time development
Tornado is the premier development environment for complex real-time and embedded applications. Tornado includes a complete set of tools and hypertext-based, on-line documentation for both programming tools and Wind River's VxWorks® run-time environment.  EC++ omits the following nonessential ANSI C++ features: multiple inheritance, virtual base classes, exceptions, run-time type identification, virtual function tables, templates, namespaces, new-style casts, and mutable specifiers.

Multiple inheritance, exceptions, and run-time type identification are the biggest contributors to C++ run-time overhead. Moreover, the overhead associated with these facilities is incurred even if they are not used in the target application. Features such as mutable specifiers, by contrast, add little overhead to the run-time environment, but needlessly complicate compiler design and embedded systems programming. Eliminating these features enables EC++ to achieve substantial reductions in the size of class libraries and corresponding improvements in run-time efficiency. It also helps simplify programming.


EC++ library
The Embedded C++ library has been pared down to contain just those features needed for embedded applications. These include:

  • Iostreams operations with the traditional names istream, ostream, ios, streambuf
  • Math functions are overloaded for both double and float, in both real and complex modes
  • Support for class string

Typical ANSI C++ features not included:

  • No standard template library, no templatized string, complex, or iostreams classes
  • No exception-handling functions or classes
  • No type_info class
  • No support for wide-character input/output, locals, or long double arithmetic

Improvement in code size
The Green Hills EC++ compiler can achieve improvements ranging from 30 to 90 percent in code size and run-time efficiency over ANSI C++, particularly for applications containing I/O of any kind.

Complies with EC++ standard
Green Hills' new EC++ compiler is fully compatible with the draft specification produced by the EC++ Technical Committee. The committee was formed in early 1995 with the goal of producing an open standard for Embedded C++ that addresses the specific requirements of embedded system designs. Green Hills Software is a technical advisor on the Embedded C++ Technical Committee.


Features

  • Retains major object-oriented benefits of C++
  • Significantly improves size and efficiency of code
  • Achieves the memory and execution efficiency of C
  • Easy for average C programmer to learn and use
  • Meets major requirements of embedded system design
  • Avoids excessive memory consumption
  • Does not to produce unpredictable responses
  • Makes code ROMable

Green Hills' EC++ Compiler is available directly from Green Hills Software, Inc. Green Hills Software provides training, support, and product upgrades.

Supported targets

  • n68000, PowerPC, SH, MIPS, ColdFire, V800

Supported hosts

  • Solaris 2.5*, HP/UX 10.0, Windows 95/NT

*Produces native code for workstations running Solaris 2.5.