Image

Compiling for Automotive Safety and Performance

April 17, 2017
Green Hills Software’s optimizing C and C++ compilers handle C++11 and autovectorization for ARM NEON support.

Download the PDF of this article.

C and C++ compilers tend not to be sexy, but they’re used to build the embedded infrastructure from the cloud down to motor control systems. They compile the code for self-driving cars and medical devices, which tend to require a bit more oversight than the code for the latest remote light switch or voice-activated cloud portals. Then again, those Internet-of-things (IoT) devices could be a little safer and more secure.

LLVM’s Clang and GNU Project’s gcc compilers make up the bulk of C and C++ compilers in the open-source space, and they are also bundled with many integrated development environments (IDE) available from chip and system vendors. These are useful for a wide range of applications, but things get a bit more difficult when systems need to meet the highest levels of functional safety levels like ISO 26262 ASIL D (automotive), IEC 61508 SIL 4 (industrial) and EN 50128 SWSIL 4 (railway) standards.

Image courtesy of Thinkstock

One compiler toolchain that meets these strict requirements is Green Hills Software’s latest Optimizing Compiler 2017. It also incorporates single-pass MISRA-C adherence checker. Static analysis features like this should not be overlooked by developers in general: It’s not just for automotive applications. Less than half of the developers in our 2017 Embedded Revolution survey employed tools like this.

Having a fast, efficient feature like this in the compiler makes adoption more likely. The argument type checking available with Green Hills compilers can catch mismatches across modules.

The compiler supports 32-bit and 64-bit embedded processor architectures, including ARM, Intel, and Power Architecture. It has C++11 support and takes advantage of hardware acceleration like ARM’s 28-bit SIMD (Single Instruction, Multiple Data) NEON vector unit with autovectorization support. On Intel platforms, the compiler supports the latest Intel Streaming SIMD Extensions (SSE4) instructions. It handles the Power Architecture e200 processor, including new DSP and SPE2 instructions.

The Optimizing Compiler 2017 support is integrated with Green Hill’s MULTI IDE, which also supports its INTEGRITY RTOS. In addition, INTEGRITY addresses safety and security applications meeting the following standards: DO-178B, Level A (INTEGRITY-178 RTOS); EAL 6+ High Robustness Common Criteria; SKPP; FDA: Class II and Class III medical device approval; 50128 SWISL 4 railway control; IEC: 61508 SIL 3-certified industrial control systems; and ISO 26262.

Making sure the compiler generates object code based on the source code is part of the critical aspect of Green Hills’ solution, but performance is also a prime reason for choosing its tools. That is one reason why many vendors choose it for benchmarking using EEMBC’s embedded benchmarks like CoreMark and ULP Bench. The latter tests power efficiency.

Memory efficiency is another area that embedded developers place high on their checklist for compilers. Green Hills’ Optimizing Compiler 2017 does well in this area. Some customers have seen as much as a 30%improvement in memory requirements. This can allow an application to fit into a smaller, less costly platform.

About the Author

William G. Wong | Senior Content Director - Electronic Design and Microwaves & RF

I am Editor of Electronic Design focusing on embedded, software, and systems. As Senior Content Director, I also manage Microwaves & RF and I work with a great team of editors to provide engineers, programmers, developers and technical managers with interesting and useful articles and videos on a regular basis. Check out our free newsletters to see the latest content.

You can send press releases for new products for possible coverage on the website. I am also interested in receiving contributed articles for publishing on our website. Use our template and send to me along with a signed release form. 

Check out my blog, AltEmbedded on Electronic Design, as well as his latest articles on this site that are listed below. 

You can visit my social media via these links:

I earned a Bachelor of Electrical Engineering at the Georgia Institute of Technology and a Masters in Computer Science from Rutgers University. I still do a bit of programming using everything from C and C++ to Rust and Ada/SPARK. I do a bit of PHP programming for Drupal websites. I have posted a few Drupal modules.  

I still get a hand on software and electronic hardware. Some of this can be found on our Kit Close-Up video series. You can also see me on many of our TechXchange Talk videos. I am interested in a range of projects from robotics to artificial intelligence. 

Sponsored Recommendations

Comments

To join the conversation, and become an exclusive member of Electronic Design, create an account today!