Contents

Boot & security firmware on the MCU-based ECU

This firmware checks that an ECU starts authorized software and installs updates, using hardware-protected keys and a controlled recovery path.

What runs here

On an MCU-based brake, steering or battery-management ECU, this layer controls startup and reprogramming before the normal application runs. Secure boot checks software authenticity and integrity; the flash bootloader receives and installs replacement software. They cooperate but have distinct responsibilities.

Component Role
Protected first boot stage Establishes the initial trust decision using immutable ROM or suitably protected code and trust anchors.
Flash bootloader Handles programming requests, validates images, erases and writes flash, and selects an eligible application.
Hardware security module (HSM) firmware Provides controlled cryptographic operations and protects secret keys, subject to the device’s capabilities and configuration.
Boot metadata and recovery logic Tracks image validity, installation progress and permitted versions so interrupted updates have a defined outcome.

The exact split between boot ROM, host CPU and HSM is silicon-specific. An HSM does not automatically establish secure boot: provisioning, boot configuration and verification coverage must agree. Some devices also require installation of security firmware before its services are available; see NXP’s MCU secure-boot application note.

Why it looks like this

These ECUs combine limited memory with demanding startup and control requirements. A compact bootloader reduces flash consumption and the amount of privileged code requiring review. Embedded-flash geometry, erase behavior and execution restrictions determine whether updates need RAM-resident routines, separate banks or external staging storage. Two complete application slots are an architectural choice, not an assumed capability.

Verification takes time, so startup analysis must include image checking, HSM readiness, watchdog handling and the deadline for providing the control function. Authentication must finish before the protected software can influence safety-relevant outputs.

For functions allocated requirements up to ASIL D, boot failures and interrupted programming need an explicitly justified vehicle response. Secure boot does not establish functional correctness or confer an ASIL rating. Safety requirements determine the required development evidence and failure behavior; ISO 26262-6 addresses software-level development.

Boot firmware typically changes less often than application software, but still needs a secure maintenance strategy. Its replacement must preserve a trusted recovery route.

How it connects

Below, boot firmware uses reset logic, flash controllers, memory protection, watchdogs and HSM interfaces. Above, it hands control to the application image containing the OS, basic software and application components. The handover contract defines entry address, interrupt state, memory layout, reset information and peripheral ownership.

An AUTOSAR Classic application may access cryptography through Crypto Service Manager (Csm), Crypto Interface (CryIf) and Crypto Driver. The bootloader may use a smaller integration; it need not start the application’s full RTE or OS. AUTOSAR’s Csm specification describes the application-side cryptographic service interface.

Reprogramming commonly uses UDS over CAN or CAN FD, sometimes through a gateway. A workshop tester or vehicle update coordinator transfers the image; the ECU enforces its own acceptance rules. Diagnostic authorization permits programming operations, while image authentication establishes software trust. With asymmetric signing, the signing private key stays outside the ECU; the ECU protects the integrity of its verification trust anchor.

Compared with other node classes

  • HPC application processor: The chain commonly covers more stages, external storage and OS images; a trusted execution environment may provide additional isolated services.
  • HPC safety island: Boot must also coordinate reset, readiness and failure dependencies with the surrounding SoC.
  • Zone controller: Similar MCU mechanisms apply, with additional attention to attached loads and network availability during programming.
  • Smart node / LIN slave: Resource limits may favor ROM or a simple bootloader; update and authentication capabilities require explicit confirmation.

Best practices

  • Authenticate executable images and security-relevant metadata before use; bind acceptance to the intended hardware and software configuration.
  • Protect the first verifier, trust anchors and debug lifecycle; plan provisioning, key replacement and recovery together.
  • Make activation metadata resilient to interrupted writes; test power loss during erase, programming, verification and activation.
  • Define anti-rollback policy separately from recovery: an authentic older image may still contain a known vulnerability.
  • Validate startup timing and safe output behavior across reset causes, failed authentication and HSM faults.
  • Specify programming preconditions, watchdog behavior and diagnostic timeouts with the vehicle update coordinator.

Common pitfalls

  • Treating encryption or a CRC as proof that software came from an authorized publisher.
  • Protecting application images while leaving boot configuration, recovery paths or downloaded flash routines able to bypass authentication.
  • Advancing rollback counters before a recoverable installation is secured, potentially making every available image ineligible.
  • Assuming a programming session alone guarantees that the vehicle is safe to update.

What it means for your discipline

  • Cybersecurity Core

    Defines the chain of trust, image acceptance policy, key lifecycle and debug restrictions. Reviews whether recovery and programming paths preserve those controls.

  • Base software Core

    Implements startup, flash programming, HSM integration and application handover. Owns memory-layout constraints, watchdog behavior and interrupted-update recovery.

  • Software update & OTA Core

    Defines and verifies image transfer, acceptance, activation and recovery behavior with the bootloader team. Tests interrupted flashing, programming preconditions and rollback policy so workshop and OTA updates leave an authenticated, recoverable ECU.

  • Diagnostics & lifecycle Partial

    Defines programming sessions, access checks, transfer behavior and tester-visible failures. Coordinates bootloader timing and recovery with workshop and vehicle update tools.

  • Functional safety Partial

    Allocates startup and programming safety requirements and defines acceptable failure responses. Assesses whether boot and recovery behavior support the ECU’s safety argument.

No direct stake: E/E architecture · HPC & application software · Hardware & silicon · Networks & communication

Where it sits in the software stack

Generic layered software of a central HPC (application processor with hypervisor, plus a safety island) and of a classic MCU-based ECU (AUTOSAR Classic). Highlighted modules matter for this topic. Click any module to open its page.

HPC · application processor (MPU) and safety island (MCU)

Not directly involved on this node type.

MCU-based ECU · AUTOSAR Classic
  • Flash bootloader · secure boot — Boot firmware authenticates images, controls flash programming and activation, and preserves recovery after interrupted updates.
  • Microcontroller · HSM — Protected boot code, flash controls and HSM resources anchor image verification and protect cryptographic keys.