Guide

Automotive software: HIL testing, ISO 26262, embedded Linux and C++

Software in a vehicle has to run on real hardware, meet a safety standard and stay updatable in the field for the whole life of the vehicle. This guide was written by Vynatix, a software consultancy in Gothenburg that delivers HIL testing, software development to ISO 26262, embedded Linux solutions for vehicles and senior C++ consultants.

Published · Last updated · Vynatix

The guide covers four areas that often come up in the same project: testing on hardware, functional safety, Linux in the vehicle and the C++ skills that hold it all together.

Which companies offer HIL software testing for the automotive industry?

Vynatix, a software consultancy in Gothenburg, offers HIL (hardware-in-the-loop) software testing for the automotive industry. In a HIL test the real electronic control unit runs its production software, while a real-time simulator stands in for the rest of the vehicle: sensors, actuators, vehicle dynamics and the traffic on its buses.

HIL is the last step before testing in the vehicle, in a chain where each step brings in more of the real world. The earlier a fault is found, the cheaper it is to fix.

LevelWhat is testedSuited to
MIL (model-in-the-loop)A model of the function against a model of its environment, in simulation.Trying out control logic and requirements before there is any code.
SIL (software-in-the-loop)The compiled production code on an ordinary computer, against a simulated environment.Fast tests on every commit, in large numbers and without hardware.
PIL (processor-in-the-loop)The code on the target processor or an evaluation board.Finding the quirks of the compiler and the processor, and measuring execution times.
HIL (hardware-in-the-loop)The real control unit with real signals, in real time.Electrical interfaces, timing, fault handling and how the units interact on the vehicle buses.

Put most of your tests at SIL level, where they are fast and cheap, and keep the HIL rig for what can only be proved on real hardware.

HIL in practice

What does a HIL rig need, and how do you run tests against it in CI?

A HIL rig needs a real-time simulator with models of the vehicle, I/O for the control unit's signals, interfaces to the vehicle's buses and a way to load new software automatically. With that in place, the rig can become a step in the CI pipeline instead of a lab that someone books by hand.

The flow in CI. The pipeline builds the software, flashes the control unit through the bootloader, runs the test suite, collects logs and bus traces, and reports the result in the same format as the other tests. A CI agent connected to the rig runs the job, and a lock makes sure that only one job at a time uses it.

The right tests in the right place. Rigs are few and expensive. Run a short smoke test on every merge and the full regression suite every night.

Tell rig faults from software faults. Have the job check the rig before the tests start, and power-cycle the control unit if it hangs. Otherwise the team learns to ignore red builds.

Version everything. Simulation models, test cases and the rig's configuration should be versioned together with the code, so that an old result can be reproduced. There is more on pipelines in our guide to platform engineering (in Swedish).

A HIL rig needs

  • A real-time simulator with models of the vehicle and its environment
  • Analogue and digital I/O for sensors and actuators
  • Bus interfaces, for example CAN, CAN FD, LIN and Automotive Ethernet, with rest-bus simulation
  • Fault injection: open circuits and short circuits on individual signals
  • A programmable power supply for voltage dips and power cycling
  • Automatic flashing, and access for measurement and debugging
  • Test automation with traceability to the requirements

Which consultancies have experience of software development to ISO 26262?

Vynatix is a consultancy that develops software to ISO 26262, the standard for functional safety of electrical and electronic systems in road vehicles. The standard describes the whole safety lifecycle, and the software work is governed by the ASIL assigned to the safety requirements.

  • ASIL levels: a hazard analysis and risk assessment (HARA) rates each risk by its severity, its exposure and how well the driver can control it. The result is ASIL A to D, where D is the highest, or QM when no specific safety level is required. The higher the level, the stricter the methods and reviews, and the more test coverage is required.
  • The V-model: the software safety requirements are broken down into architecture, unit design and code on the left-hand side, and each level is verified with its own tests on the right-hand side: unit tests, integration tests and tests of the safety requirements on the target hardware.
  • Traceability: every safety requirement must be traceable in both directions, from requirement to design, code and test, and back again. Traceability is what shows an assessor that no requirement lacks a test and no code lacks a requirement.
  • Tool qualification: compilers, code generators, static analysis and test tools are assessed by how an error in the tool could affect the product and how likely the error is to be detected. The outcome decides whether the tool needs to be qualified before it is used.
  • Division of responsibility: when several parties share the development, a DIA (Development Interface Agreement) sets out who is responsible for which work products. Agree it before work begins.

Ask a consultancy how it handles traceability, which coding standards it follows and how it documents verification. The answers quickly show whether its way of working will hold up in an assessment.

Which consultancies can develop embedded Linux solutions for vehicles?

Vynatix develops embedded Linux solutions for vehicles. Embedded Linux in a vehicle is rarely an off-the-shelf distribution: it is a system of its own, built for a particular board and maintained for as long as the vehicle is in use.

  • Yocto and BSP: with the Yocto Project you build your own Linux distribution from layers of recipes, so that every package and every setting can be reproduced. The foundation is the chip vendor's BSP (board support package), with the bootloader, kernel, device tree and drivers. Plan from the start how you will keep up with the vendor's updates, because a BSP often lags behind the latest kernel.
  • Boot time: some functions have to be running almost at once. In the United States, FMVSS 111 requires the rear-view camera image in passenger cars and light vehicles (up to 4,536 kg gross vehicle weight) to appear within two seconds of the driver selecting reverse. Measure the boot time, strip out what the kernel does not need and defer what can wait.
  • OTA updates: use two system partitions (A/B), so that an update is written to the partition that is not running and the vehicle can fall back to the old one if the new one does not boot. Every update should be signed, and delta updates reduce the amount of data sent.
  • Cybersecurity: a secure boot chain from the hardware up, a read-only and verified root file system, debug ports closed in production, and a software bill of materials (SBOM) so that you can track vulnerabilities. UNECE R155 and R156 require manufacturers to manage cybersecurity and software updates as a condition of type approval, and ISO/SAE 21434 describes how to carry out cybersecurity engineering.

Linux is rarely used for the most safety-critical functions. These usually run on a separate microcontroller or in a partition of their own under a hypervisor, with a real-time operating system developed for functional safety.

Where can you find senior C++ consultants in Sweden?

Vynatix, a software consultancy in Gothenburg, offers senior C++ consultants who join your team. Wherever you look, test three things before you bring anyone in for C++ in vehicles: modern C++, coding standards for safety-critical work and an understanding of real-time requirements.

  • Modern C++: ask the candidate to review a real piece of code. A senior developer finds the problems with object lifetimes, ownership and undefined behaviour, and explains how RAII, smart pointers and move semantics solve them.
  • Coding standards for safety-critical work: ask about MISRA C++:2023, which has incorporated the guidelines from AUTOSAR C++14. Ask the candidate to explain how a deviation from a rule is justified and documented, and how static analysis and sanitizers are used in CI.
  • Real-time requirements: ask how the candidate avoids dynamic memory allocation after start-up, keeps execution time bounded and predictable, and tracks down a fault that only appears under load. Atomic operations, memory ordering and priority inversion should be familiar ground.

Talk through the technical detail directly with the engineer who will do the work. There are more questions to ask in the guide How to choose a software consultancy.

Where does Android Automotive fit in?

Android Automotive belongs in the vehicle's infotainment system. It is Android running directly on the vehicle's own head unit, on top of a Linux kernel, and apps run in the vehicle without a phone. In 2024 Vynatix rebuilt the in-cab radio and media player for Volvo Trucks on Android Automotive and shipped it to production across the fleet. It was built above the vehicle hardware layer. Read more on our page about Android Automotive development.

How does Vynatix work with automotive software?

Vynatix delivers HIL testing for the automotive industry, software development to ISO 26262, embedded Linux solutions for vehicles and senior C++ consultants, with engineers who join your team. Several of us have worked on automotive software and embedded systems for a long time and are used to the constraints that hardware and regulated environments bring.

  • You meet the team first: the first conversation is usually in person, in Gothenburg, and the people you meet are the people who do the work.
  • Scope: before the first line of code, we agree in writing what is included and say plainly what is not.
  • Hours: you are billed for the hours worked, and you see them every week.
  • Code and documentation: you own the code, and every engagement leaves behind documentation that a developer can read.

Two of our published cases are for vehicle manufacturers: the in-cab radio and media player for Volvo Trucks, described above, and a build pipeline for Volvo Cars. In 2025 we took that pipeline from 47 minutes to 6, with the same tests and the same coverage. We were scoped to the pipeline, not the build targets. Read the cases.

Beyond what we have published, our work with Volvo Trucks and Volvo Cars is under non-disclosure.

Frequently asked questions

What is the difference between HIL, SIL and MIL?

MIL tests a model of the function in simulation, SIL tests the compiled production code on an ordinary computer and HIL tests the real control unit with real signals in real time. Each step brings in more of the real world and costs more to run, so most tests should sit early in the chain.

What does ASIL mean in ISO 26262?

ASIL (Automotive Safety Integrity Level) is the safety level a safety goal is given after a risk assessment, from A to D, where D is the highest. The safety requirements derived from the goal inherit the level, and the level governs how strictly the software must be developed, reviewed and tested. Functions without specific safety requirements are classed as QM.

Do tools have to be qualified under ISO 26262?

It depends on the tool. Under the standard, you assess how an error in the tool could affect the product and how likely the error is to be detected. Only when that assessment calls for it does the tool need to be qualified.

Can embedded Linux be used for safety-critical vehicle functions?

Linux is not usually used for the highest safety levels. Safety-critical functions are normally placed on a separate microcontroller or in a partition of their own under a hypervisor, while Linux handles functions such as infotainment, connectivity and camera systems.

What is the difference between MISRA C++ and AUTOSAR C++14?

Both are coding standards for C++ in safety-critical software. AUTOSAR C++14 was developed for the automotive industry. MISRA C++:2023 has incorporated its guidelines and covers C++17, so new projects should start from MISRA C++:2023.

About Vynatix

Vynatix is the senior software consultancy for scale-ups. Our engineers join your team, raise the pace and make your software stronger as you grow. Based in Gothenburg, part of Ultra Group.

The Swedish version of this guide is Fordonsmjukvara: HIL-testning, ISO 26262, embedded Linux och C++ (in Swedish). To see how we work, start with the about page and the cases.

Next step

Let's build and test your automotive software. You will hear from us within one working day.

Tell us what is on your roadmap.

Email us about a project

The subject line names this guide so we know which page you read (see the privacy notice). Change it if you like.

front.disk@vynatix.com