C , C++ , EC+
Green Hills Software has been the leader in embedded optimizing compilers for almost three decades. Green Hills compilers consistently outperform competing compilers in certified results on industry standard benchmarks, such as those published by Embedded Microprocessor Benchmark Consortium (EEMBC).
Green Hills C and C++ compilers generate highly optimized code while strictly adhering to industry-standard language requirements. They support a variety of userselectable features, including programming language, target architecture, performance level, debugging level, and much more. They include a command-line interface for easy automation and a tight integration with the MULTI® IDE for easy customization and project visibility.
Performance
By applying hundreds of advanced optimization strategies, the Green Hills compilers can significantly increase program execution speed and decrease program size. Link time and inter-module optimizations tune the program further. For example, the CodeFactor™ linker optimization reduces the overall program size by identifying and removing redundant segments of code from object files. This often translates to lower power consumption and a reduced cost per unit. Code size optimizations produce the most efficient code with a minimal footprint, to allow users to include more functionality in the same amount of memory.
Flexibility
Green Hills compilers work closely with the rest of the Green Hills Tool Chain—which includes the Macro Assembler, Librarian, Linker and Utility Programs—to create programs for a variety of host, language, and target configurations. They consist of a Language-Specific Front-End, a Global Optimizer, and a Target-Specific Optimizer and Code Generator. The Global Optimizer applies the latest optimizations independent of the language or the target. Some examples are loop optimization, tail recursion, and function inlining. This allows new architectures to take advantage of the most advanced optimization techniques developed over the last several years.
The Target-Specific Optimizer applies additional optimizations based on the target architecture, such as peephole optimizations and multiple issue instruction pipeline scheduling. Green Hills compilers use the same Target-Specific Optimizers and Code Generators regardless of programming language, giving the developer additional flexibility in implementation.
Compatibility
Click here for a larger view.
Green Hills Software’s conformance to key industry standards offers developers increased compatibility across different projects and source code files.
K&R Mode and Extensions to ANSI C—Green Hills compilers support the version of C described in The C Programming Language by Kernighan and Ritchie, including the many versions of the Portable C Compiler (PCC) implementation. The PCC includes hundreds of extensions required to compile the UNIX operating system and many existing C application programs.
Japanese Automotive C—Green Hills compilers support a unique set of extensions to ANSI C used by Japanese automobile manufacturers.
GNU C/C++ Extensions—Green Hills compilers are so compatible with GNU C/C++ extensions that they have been used to build the entire Linux kernel.
MISRA C—Undefined and implementation-defined constructs in the C language consistently trip up even the best programmers and result in bugs. For software developers, this means a large amount of time spent finding bugs. For managers, this often means the single largest risk to their project. MISRA C is a formal set of guidelines published by the Motor Industry Software Reliability Association (MISRA) that identifies aspects of the C language to be avoided due to their ambiguity and susceptibility to common programming mistakes. Green Hills compilers provide automated enforcement of MISRA C programming guidelines. Green Hills Software is uniquely qualified to support the largest number of MISRA C rules through its optimizing compilers and Advanced Run-time Error Detection.
C++ Support—Green Hills Software enables developers to use a single compiler for several unique dialects of the C++ programming language. This increases portability for new projects, existing projects, and legacy projects. Unlike other compilers, the Green Hills compilers support each dialect in full, including C++ conformance for namespaces and templates. The Green Hills C++ libraries are scalable and tuned for the specific level of C++ support requested.
Standard (ANSI/ISO) C++
C++ as defined by The Annotated C++ Reference Manual (ARM), by Ellis & Stroustrop
Embedded C++ (EC++)
Embedded C++ with Templates
Green Hills EC++ is a proper subset of ANSI C++ intended to meet the needs of embedded application developers. EC++ offers the same object-oriented benefits of C++, but with smaller code size, deterministic behavior, and a simpler user interface.
MISRA C
MISRA C is a formal set of guidelines for programming in the C language. These guidelines, published by the Motor Industry Software Reliability Association (MISRA), identify aspects of the C language that should be avoided due to their ambiguity and susceptibility to common programming mistakes. Each guideline is documented with background reasoning, examples, and justification.
By following this well-researched set of rules and documented set of safe programming practices, the risk of writing bad or error-prone code can be significantly reduced. As a result, a better, safer system can be developed and the time lost finding bugs can be reduced.
The cost of flexibility
The C language is probably the most widely-used highlevel language in embedded systems today. This is largely due to its incredible flexibility: C is available for a huge range of systems and can implement virtually any type of software application.
This flexibility comes at a cost however. Ambiguities in the C language, along with certain syntaxes, consistently trip up even the best programmers and result in bugs. For software developers, this means a large amount of unexpected time spent finding bugs. For managers, this often means the single largest risk to their project.
Achieving productivity
While MISRA C is a set of guidelines for a software developer, it is not a specification for a compiler. Therefore, developers can painstakingly enforce these rules themselves through inspection. But to realize true productivity, these manual steps must be automated and consistently enforced.
The MULTI Integrated Development Environment offers this exact capability.
Extensive coverage
Green Hills Software supports MISRA C in standard release of all 32- and 64-bit products, including MULTI for ARM, V850, Power Architecture, MIPS, Intel Architecture and others.
Green Hills is also uniquely qualified to support the largest number of MISRA C rules for embedded development through its Optimizing Compilers and Advanced Run-time Error Detection.
Green Hills supports MISRA-C:1998 as well as the latest MISRA specification: MISRA-C:2004.
Example of C's Ambiguity
if (flag && (total=num++))
The programmer here originally intended to compare total and num++. But instead, an unexpected assignment was done and a completely different Boolean expression was evaluated.
Furthermore, even if = was changed to ==, will num be incremented? If flag is false, it wouldn't.
The MULTI Integrated Development Environment
MULTI provides a host-based (Windows, Solaris, and Linux) graphical environment for embedded target development.
MULTI offers a comprehensive set of advanced development tools. While, these tools provide powerful capabilities separately, their real strength is derived from their tight integration. Changes made in one component are automatically reflected in every other, enhancing developer productivity and resulting in higher-quality code.
Optimizing compilers
MULTI features
- Source Level Debugger
- Graphical Project Builder
- Text Editor
- Version Control System
- Graphical Browser
- Performance Profiler
- Run-time Error Checking
- TimeMachine Debugging Suite
- DoubleCheck Source Code Analysis
- Remote Target Connection
MULTI for MISRA C
With MULTI, developers can select exactly which MISRA C rule to enforce. The selection can be done graphically or from the command line. At compile time, violations of MISRA C rules are reported. Violations that can only be detected at run-time are automatically detected and reported by Green Hills advanced run-time error detection.
Across industries
MISRA C has been developed to address the critical need for reliable systems in the automotive industry. It achieves this by formally identifying good programming practices and types of C code susceptible to error. Implementing these guidelines has a direct effect on the reliability of a final system. Regardless of the industry or application, the ability to consistently detect and reduce errors will significantly reduce time spent debugging.
Ada
Green Hills Optimizing Ada 95 Compilers
Green Hills Software offers the industry's first, fully validated family of Ada 95 Cross Compilers for real-time targets. Green Hills industrial strength Ada 95 compiler family offers powerful new Ada language features that deliver maximum efficiency and reliability. The Ada 95 Compilers are available for the following runtime implementations:
- INTEGRITY® Real-Time Operating System
- VxWorks®/Tornado® Real-Time Operating System
- Bare Board Ada Runtime
- RT Secure™ Real-Time Operating System
TOOL CHAIN
Green Hills' Tool Chains consist of a Macro Assembler, Librarian, Linker and Utility Programs. The Macro Assembler assembles compiler-generated or user-coded assembly language files into object files. The Librarian manages object file libraries. The Linker links object files and object file libraries into executable programs.
VALIDATION
Green Hills Optimizing Ada 95 Compilers were the first 32-bit embedded compilers to successfully pass the ACVC 2.1 validation tests, and are conformance certified by the ACAA.
Ada 95 Options
Green Hills Ada 95 contains many specific language options so code can meet specific needs. These options add additional extensions or select aspects of the Ada language which are not defined by the language specification. These options include:
- Library Directories - Allows additional library paths to be incorporated into the program.
- Ada83 Analysis Mode- Provides an analysis on converting Ada 83 code to Ada 95 code.
- Suppress All Runtime Checks - Reduces code size by suppressing all automatic run-time checking including numeric checking.
- Suppress Numeric Runtime Checks - Reduces code size by suppressing two kinds of Numeric Checks for the entire compilation: divsion_check and overflow_check.
- Generate Cross Reference - Generates a cross reference listing containing a line-numbered listing, following by a cross reference table.
- Source Listing - Will generate Always, Only if Errors, or Never source listings.
- Listing Format - Displays either all source lines, all source lines numbered, and only error lines
- Diagnostics - Informs the Program Builder what to display in the progress window when building the application. Options include "Suppress Errors", "Suppress Warnings", "Suppress Informative Msgs", and "Suppress Implementation Dependent Msgs."