Tech, ExplainedCloud platforms and developer tools
Scene

Embedded software

Code in the brakes must answer on time.

1 Draw the model2 Write chip code3 Check the rules4 Run on timegenerates C codesends every changepasses the checked codeModel-based design+AI for embedded software+Static analysis forsafety-critical code+Real-time operatingsystem (RTOS)+Microcontroller (MCU)↗ ANALOG AND EMBEDDED CHIPSCI/CD pipeline↗ DEVOPSAutomotive safety electronics↗ AUTOMOTIVE TECHNOLOGYAn engineer at an automotive supplier in PuneABS software approved and loaded into thebraking unitEvery later change, even one line, is checked and approved again before it reaches motorcycles on the road.CONCEPTS IN THIS SCENEFirmwareTime series dataShift left securityAI coding agents1 Draw the model2 Write chip code3 Check the rules4 Run on timegenerates C codesends every changepasses the checked codeModel-baseddesign+AI forembedded software+Static analysisforsafety-criticalcode+Real-timeoperatingsystem (RTOS)+Microcontroller(MCU)↗ ANALOG ANDEMBEDDED CHIPSCI/CD pipeline↗ DEVOPSAutomotivesafety electronics↗ AUTOMOTIVETECHNOLOGYAn engineer at an automotivesupplier in PuneABS software approved and loadedinto the braking unitEvery later change, even one line, is checked and approved again before it reaches motorcycles on the road.CONCEPTS IN THIS SCENEFirmwareTime series dataShift left securityAI coding agentsAn engineer at an automotive supplier in Pune1 Draw the modelModel-based design+↓ generates C code2 Write chip codeAI for embedded software+Microcontroller (MCU)↗ ANALOG AND EMBEDDED CHIPS↓ sends every change3 Check the rulesStatic analysis forsafety-critical code+CI/CD pipeline↗ DEVOPS↓ passes the checked code4 Run on timeReal-time operating system (RTOS)+Automotive safety electronics↗ AUTOMOTIVE TECHNOLOGY→ ABS software approved andloaded into the braking unitEvery later change, even one line, is checkedand approved again before it reachesmotorcycles on the road.CONCEPTS IN THIS SCENEFirmwareTime series dataShift left securityAI coding agents
A Pune engineer's motorcycle ABS software is drawn as a model, connected to its chip, checked against the safety coding rules and run on time by a real-time operating system.
opens a page inside this one a page in the same scene a page in another scene a concept page a label only, with no page

Embedded software is software that runs on a chip built into a machine, such as a car's braking unit, an aircraft's flight controller, a ventilator or a washing machine. The person using the machine never sees it as software. Much of it is firmware, software stored on the device that starts and controls its hardware.

Embedded software differs from an ordinary app in three ways. First, it often must answer on time. A braking unit that makes the right decision 50 milliseconds too late has failed. Software that must finish its work within a fixed time is called real-time software. Second, it runs on small chips, such as a microcontroller, with very little memory. Third, a mistake can hurt people. So in cars, aircraft, trains and medical devices, the software must meet a safety standard and be approved before it is used. The page on safety certification explains these standards.

India has large teams that build this software, in Bengaluru, Pune, Chennai and Hyderabad. They build it for car makers and their suppliers, aircraft and defence programmes, the railways and medical device companies.

Take, for example, an engineer at an automotive supplier in Pune who is building the anti-lock braking system (ABS) software for a motorcycle. ABS stops a wheel from locking when the rider brakes hard, so that the motorcycle does not skid. The software reads the speed of each wheel 100 times a second. If one wheel slows down much faster than the motorcycle, that wheel is about to lock. The software then releases the brake pressure on that wheel for a moment, and applies it again.

She starts with a drawing, not with code. In a model-based design tool, she draws the control logic as connected blocks. She runs it against a simulated motorcycle braking on a wet road. When the model behaves correctly, the tool turns it into code in the C language. Some teams now also use AI for embedded software. It writes the code that connects the logic to one particular chip, such as the code that reads the wheel-speed sensors.

Every change to the code then passes through static analysis for safety-critical code. These tools read the code without running it. They flag anything that breaks the coding rules expected under ISO 26262, the safety standard for car electronics.

Finally, the code runs on the braking unit's chip, under a real-time operating system (RTOS). The RTOS makes sure that the wheel-speed check runs every 10 milliseconds, before any less urgent task. Before the real braking unit is ready, the team tests the software on an ordinary computer that pretends to be the device. This is called embedded system simulation.

The same steps are followed for other machines: for the software in a train's automatic train protection system, which brakes the train if the driver passes a red signal, or for an infusion pump in a hospital.

Tech, Explained is a part of ingrid.fyi. Every page explains one piece of technology in plain words.