If your embedded application is safety-critical, it’s only natural you’d want to do everything humanly possible to make sure it’s 100% tested and free of bugs. So you test, test and test again at every stage of software development, until you’re finally ready to compile and test the application on your target hardware. The problem here is that you have to rely on the compiler doing its work as diligently as you. Yet the compiler itself is a hugely complex application. So how do you know the compiler doesn’t make mistakes?

Like you, compiler developers do everything they can to make sure their compilers generate error-free code, but it’s unlikely they tested it using the specific configuration you are using. That’s one of the reasons why California-based Peloton Technology, a leader in automated vehicle technology, uses SuperTest to verify the compiler they use. Peloton deploys advanced vehicle-to-vehicle communication and control technologies to platoon one truck behind another with a separation distance of just 20 meters, without relying on the following truck driver’s reaction time to avert collisions. That makes it really safety-critical. The advantage is a combined 7% reduction in fuel consumption, which helps to lower haulage costs and reduce emissions.

Peloton need to make sure that the GCC C++11 compiler they use is validated according to the qualification process specified in the ISO 26262 functional safety standard. GCC does come with its own test suite, but it’s not by any means qualified for automotive use or guaranteed to meet the standards in all areas. According to Peloton’s software development team, SuperTest has already pinpointed shortcomings in the compiler, allowing them to modify their code review standards so that problem areas are avoided. What’s also important to Peloton is that with SuperTest they can check compiler compliance by running directly on the target hardware.

Accelerate ‘hardware-in-the-loop’ compiler testing with parallel execution

Running generated code on your target hardware (hardware-in-the-loop testing) is one of the best ways to verify your compiler, because it’s as close as possible to your final system setup. The downside is that it can slow down the validation process because of the overhead associated with managing the remote target board, loading the executable, and fetching results. To speed up the process, SuperTest supports parallel host testing. So instead of running one host to verify a compiler, SuperTest can control two or more host+target PCs and run multiple tests in parallel.

No compiler is perfect

Testing the compiler isn’t just an optional ‘extra step’ in ensuring that your applications meet safety standards. We believe it’s a necessity. In our experience, no compiler is perfect. There is always something wrong. And even if errors can’t be fixed, knowing the weak spots allows you to take preventive measures or implement work-arounds. If there is any place where it’s better to be safe than sorry, it’s in the world of functional safety.

If you happen to be in Berlin attending the Operational-Safe-Systems event (September 25-27), come over for a quick chat and we’ll show you how easy it is to run SuperTest.

Subscribe to our monthly blog!