// FreeRTOS · ISO 14229 UDS

ISO 14229 UDS diagnostics
on FreeRTOS.

A complete, YAML-configured UDS stack that generates production C source for FreeRTOS. Same codegen engine as the Zephyr variant — switch platforms by changing one config flag. Covers all 17 UDS services, CAN ISO-TP and DoIP transports, and ASIL-B safety wrappers. GPL v2 runtime is free on GitHub.

One YAML, two RTOS targets.

EDS ships a clean platform abstraction layer. The same diagnostics_config.yaml generates a Zephyr build and a FreeRTOS build without modification. Switch targets by selecting the platform in codegen.

diagnostics_config.yaml (same for both RTOS targets)

ecu:
  name: Sensor_MCU
  platform: freertos        # or: zephyr
  addressing:
    can_id_request:  0x640
    can_id_response: 0x641

sessions:
  - default
  - extended

services:
  - id: 0x22   # ReadDataByIdentifier
  - id: 0x2E   # WriteDataByIdentifier
  - id: 0x27   # SecurityAccess
  - id: 0x19   # ReadDTCInformation
  - id: 0x14   # ClearDiagnosticInformation
  - id: 0x3E   # TesterPresent

dids:
  - id: 0xF190
    name: VIN
    length: 17
    read_sessions: [default, extended]
  - id: 0xD001
    name: Temperature_Raw
    length: 4
    read_sessions: [default, extended]

Generated FreeRTOS output

python3 tools/codegen.py \
  --config diagnostics_config.yaml \
  --platform freertos \
  --out build/ \
  --safety-wrappers \
  --asil-level B

build/
  uds_server.c/.h      # UDS dispatcher + FreeRTOS task
  uds_dids.c/.h        # DID handlers (no RTOS API)
  uds_dtcs.c/.h        # DTC storage (flash-backed)
  uds_sessions.c/.h    # session state machine
  uds_security.c/.h    # AES-128-CMAC SecurityAccess
  uds_safety.c/.h      # ASIL-B 5-step validation chain
  uds_platform_freertos.c  # FreeRTOS task + queue glue
  test_uds.py          # pytest suite

FreeRTOS task init

/* In your application startup */
#include "uds_server.h"

/* EDS creates its own task internally */
eds_init(&eds_config);

/* CAN receive hook — call from your ISR or CAN task */
void can_rx_callback(uint8_t *frame, size_t len) {
    eds_isotp_rx(frame, len);
}

FreeRTOS platform layer — what it does.

The FreeRTOS platform layer maps EDS threading primitives to FreeRTOS equivalents. No global state. No polling loop. A single UDS task owns the ISO-TP reassembly buffer and calls into the generated handlers.


FreeRTOS example ECUs included.

The Developer and Professional tiers include specialist examples. Three ship specifically for FreeRTOS targets.

  • basic_freertos — minimal FreeRTOS UDS ECU: session, TesterPresent, one DID. Starting point for new projects
  • sensor_freertos — sensor ECU with temperature/pressure DIDs, DTC storage on internal flash, FreeRTOS + CAN ISO-TP
  • safeboot_freertos — MCUboot + FreeRTOS UDS DFU: RequestDownload → TransferData → RequestTransferExit → ECUReset flow

sensor_freertos example layout

examples/sensor_freertos/
  diagnostics_config.yaml  # ECU description
  src/
    main.c                 # FreeRTOS init + eds_init()
    can_driver.c           # board-specific CAN RX/TX
    flash_backend.c        # NVM adapter for DTC storage
  build/
    uds_server.c/.h        # generated — do not edit
    uds_dids.c/.h
    uds_dtcs.c/.h
    uds_safety.c/.h
    uds_platform_freertos.c

Three tiers. Annual license. Offline after activation.

Community

Free

GPL v2 · always free · GitHub

  • Full runtime source — core/, transport/, config/, platform/
  • CAN ISO-TP + DoIP transports
  • Zephyr + FreeRTOS platform layer
  • 4 basic example ECUs (incl. basic_freertos)
  • Full CI test suite
  • Codegen templates
  • ARXML importer
  • AI assistant
  • Safety documentation

Professional

€1,990/yr · per developer

Everything in Developer, plus:

  • 68-test C integration harness (host GCC, no RTOS required)
  • ISO 26262 Safety Manual
  • HARA · Tool Qualification Argument
  • Requirements Traceability Matrix (30 ASIL-B requirements)
  • MISRA C:2012 deviation log
  • OEM key provisioning guide
  • Priority support (5 business days)
  • Commercial license (1 seat)
Blog: UDS on FreeRTOS walkthrough → Blog: ASIL-B UDS on Zephyr → Zephyr UDS landing page → TestLab — campaign runner →