Compilers Are Getting Safety Conscious
At this year’s Embedded World, in Nuremberg, Germany, lots of activity around toolchains and compilers addressed functional safety for the automotive market, reports Caroline Hayes.
Booths at German trade shows are always well represented by the automotive sector. Regardless of the discipline of the companies occupying booths in the halls, there will be a vehicle, or automotive-related theme in many. (I think the ratio may even be stipulated in the exhibition rule-book!) Embedded World 2017 was no exception, and in an industry that is eagerly anticipating driverless cars, the Advanced Driver Assistance Systems (ADAS) and autonomous vehicle themes were prevalent around the halls.
IAR Systems announced that it was increasing its focus on customers within the automotive industry, to work with customers to deliver Human Machine Interfaces (HMIs), instrument clusters, multi-media and control functions to vehicles. Kiyofumi Uemura, Global Automotive Director, IAR Systems, points out that with the C/C++ compiler and debugger toolchain IAR Embedded Workbench supports processors that target automotive applications. That includes the Renesas RH850, V850 and RL78 microcontroller families as well as major 32-bit ARM microcontrollers, such as the automotive-qualified NXP S32K. Functional safety versions of IAR Embedded Workbench are also available. They are certified by TÜV SÜD according to IEC 61508, for functional safety, and ISO 26262, for automotive safety-related systems.
The company hosted technical seminars at its booth and launched the latest version of IAR Embedded Workbench for ARM, with C11 and C++14 language support.
Latest Programming Standards
Version 8.10 looks to the future, maintaining the IAR C/C++ Compiler and adding compliance with the latest C language standard ISO/IEC 9899:2011 and ISO/IEC 14882:2014, the latest C++ standard. The Integrated Development Environment (IDE) has been enhanced with improved window management and docking, designed to improve the efficiency of workflows. There are also new tutorials addressing quick project starts, trace filtering and navigation.
The IDE consists of the compiler, an assembler, a linker and the C-SPY Debugger. Add-ons and integrations include debugging and trace probes and integrated tools for static analysis and runtime analysis.
Referring to the C program language updates, Lotta Frimanson, Product Manager at IAR Systems, said: Thanks to support for C11 (ISO/IEC 9899:2011) and C++14 (ISO/IEC 14882:2014), customers choosing version 8.10 of IAR Embedded Workbench for ARM get a complete development toolchain that serves their needs of today and tomorrow.”
“The added language standards support aids developers in writing code for the future. For those who are using older C language standards, they are future-proofed for upcoming projects,” she adds.
Of the updates, improved window management and docking, Frimanson notes, “These enhancements enable more efficient workflows in the day-to-day work of the developer.” Together with the easier trace filtering and navigation to find and investigate bugs quickly, and new tutorials, she adds: “All these enhancements boost the developer’s experience of the tools. With features for more efficient workflows and ease of the daily work, the new version will further drive new innovations and products to market faster and easier.”
Future-proofing means that the scope for market applications is broad. “We have customers all over the world in all segments. Some major segments are industrial automation, medical and health, consumer electronics, telecommunications, Internet of Things, and automotive applications,” says Frimanson.
Just before Embedded World, ARM® announced added functional safety for its C/C++ compilation tool, the ARM Compiler 6 (Figure . It will be available as a standalone product and included in ARM DS-5 Development Studio Ultimate (serving all ARM architectures) and Keil MDK-Professional (Cortex-M devices), from Q2 2017.
Assessed by TÜV SÜD, the ARM Compiler 6 will meet tool qualification requirements for ISO 26262, the functional safety standard for automotive design, IEC 61508, the functional safety standard for industrial systems, EN 50128, which addresses railway communications, signalling and processing systems, and IEC 62304, the international standard for medical software and software used in medical devices.
The package consists of the safety-certified ARM Compiler toolchain, compiler qualification kit, and long-term support and maintenance service. Focusing on the ISO 26262 certification, Tony Smith, Senior Director of Marketing, Development Solutions Group, ARM, explains, “The ARM Compiler 6 safety package simplifies safety certification while also giving developers at automakers and autonomous system OEMs the most efficient C and C++ code-generation tool for their ARM-based hardware platforms.”
The compiler supports optimized code generation for all ARM Cortex processors and architectures from ARMv6-M to ARMv8-A 64-bit. It uses a compiler front-end, called armclang, that is based on Clang (the Low-Level Virtual Machine [LLVM] native C/C++/Objective-C compiler). According to ARM, this front-end technology extends source code compatibility, with code bases written for the GNU Compiler Collection (GCC), allowing developers to change toolchains for a specific project without lock-in penalties.
While not all legacy code can be directly built, code can be migrated from earlier ARM Compiler generations smoothly, by virtue of the backwards-compatible license.
The compiler combines microarchitecture-specific instruction scheduling, whole-program optimization strategies, and finely tuned libraries to accelerate execution. Of particular interest are the link-time optimizations that eliminate unused and redundant code. The ARM C MicroLib library can provide up to a 50 percent reduction in code size compared to the full standard C library.
Smith cited the performance increases offered with the new compiler: “On particular synthetic automotive and industrial workloads, for instance, code built with ARM Compiler 6 runs as much as 30 percent faster than when built with its previous generation, ARM Compiler 5. Moreover, further improvements to code size optimization, and the tiny C MicroLib library, enable toolchain use in even the most tightly memory-constrained embedded applications.”
Based on the LLVM framework, the compiler provides access to libraries and tools to build compilers, and compiler-related programs, such as optimizers and just-in-time code generators. The LLVM operates on a single, language-independent virtual instruction set and is source-language independent. Academic research and commercial projects alike are using the compiler.
The compiler qualification kit contains a set of instructions, safety manual and reports. The certified compiler branch will receive stability patches and bug fixes over an extended maintenance period, over the lifetime of safety systems.
Adding IoT Support
Compilers for 32- and 64-bit ARM, Intel® and Power Architecture® processor architectures were announced at Embedded World by Green Hills Software. The Optimizing C and C++ Compilers 2017 support C++11 to speed time-to-market for new designs. It offers new language features and standardized threading support, all supported on the company’s Integrity Real-Time Operating System (RTOS), although they can be customized to work on other OS.
There is also updated support for functional safety levels for automotive (ISO 26262 Automotive Safety Integrity Level (ASIL) D), and for industry (IEC 61508 SIL4) and CENELEC (the European Committee for Electrotechnical Standardisation) EN 50128 SWSIL 4, for railway control and protection systems. The compiler also has a Motor Insurance Software Reliability Association (MISRA) C adherence checker, which addresses the software development of the C programming language for automotive use for higher-quality code to be developed.
Another introduction is NEON auto-vectorization. The ARM NEON general-purpose Single Instruction Multiple Data (SIMD) technology is an architecture extension for the ARM Cortex™-A series processors. It can accelerate multimedia and signal processing algorithms, such as 2D/3D graphics, image processing and sound synthesis for video, hi-fi audio and computing graphics applications.
This compiler update also extends support for the Intel Streaming SIMD Extensions (SSE4), which boosts the dynamic range of computational power available across workloads. There are also updates for over 100 new Digital Signal Processing (DSP) instructions for efficient vector processing in automotive and industrial projects.
Enhancements include argument-type checking to control mismatches across link modules and multiple options to control the trade-off between floating point accuracy and speed.
Upgraded support comes in the form of standardized C++ threading, enabling developers to write portable, multi-threaded application code, and standard C++ libraries. Together with simplified template meta-programming and additional options for controlling the linker sections, are all designed to increase code performance and productivity.
As microprocessors increase in complexity the need for an efficient and dynamic IDE, which includes compilers that meet safety and performance requirements becomes more evident. The industry is stepping up to the challenge and making sure that developers have the tools and support needed to meet the next-generation of embedded system design.
Caroline Hayes has been a journalist covering the electronics sector for more than 20 years. She has worked on several European titles, reporting on a variety of industries, including communications, broadcast and automotive.