DEENESPTFRRUARHIKOZHNL

AUTOSAR Classic Runtime Environment (RTE)

Cluster guideAI-GENERATED

Mediates typed communication of software components and controls scheduling of the Basic Software modules.
AI-GENERATED unreviewed Model: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: 72e8e2f22679 Provenance
Causal anchor: R20-11 Valid from R20-11 Synthesized for this specification release.
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original

Mediates typed communication of software components and controls scheduling of the Basic Software modules.

The Runtime Environment (RTE) module cluster implements the AUTOSAR Virtual Functional Bus on the ECU and provides standardized APIs for typed sender-receiver and client-server communication of software components [SWS_Rte_01091], [SWS_Rte_01102]. It integrates the Basic Software Scheduler (SchM) for cyclic scheduling of the Basic Software modules and interfaces with OS/IOC and the communication stack (COM, LdCom) [SWS_Rte_01376], [SWS_Rte_04546]. In doing so, the RTE guarantees data consistency and deterministic mode transitions through configurable protection areas, buffering, and defined 10-step transition sequences [SWS_Rte_02665], [SWS_Rte_03504].

The Runtime Environment (RTE) module cluster forms the implementation of the Virtual Functional Bus (VFB) at ECU level. It completely decouples AUTOSAR software components (SWCs) from the underlying Basic Software and coordinates the scheduling of BSW modules via the Basic Software Scheduler (SchM) [SWS_Rte_04546], [SWS_Rte_05165]. The cluster handles both intra-partition accesses and cross-partition data flows via the OS-IOC as well as the ECU bus via the COM and LdCom modules [SWS_Rte_01376], [SWS_Rte_02736], SWS_RTE p. 106.

RteArchitecture cluster_app Applikationsschicht (Application Layer) cluster_rte_cluster Runtime Environment Cluster (RTE / SchM) cluster_bsw Basissoftware (BSW) SWC_A Software Component A (Runnable Entities) RTE_Core RTE Engine (S/R, C/S, Invalidation, PIM) SWC_A->RTE_Core Rte_Read / Rte_Write Rte_Call / Rte_Switch SWC_B Software Component B (Runnable Entities) SWC_B->RTE_Core Rte_IRead / Rte_IWrite Rte_Result COM COM Module (Com_SendSignal, Callbacks) RTE_Core->COM Com_SendSignal Com_SendSignalGroup LdCom LdCom Module (Large Data Path) RTE_Core->LdCom LdCom_Transmit OS AUTOSAR OS / IOC (Tasks, ISRs, Spinlocks, IOC Buffer) RTE_Core->OS IOC Transfer Exclusive Areas NvM NVRAM Manager (NvM) (RAM Block Dirty Flags) RTE_Core->NvM Dirty Flags (DF_*) SchM_Core Basic Software Scheduler (SchM) (BswMainFunctions, Mode Control) SchM_Core->COM Com_MainFunctionTx Com_MainFunctionRx SchM_Core->OS Task Activation OS Resources COM->RTE_Core Rte_COMCbk... (Rx Notifications)

Context diagram: Embedding of the RTE and SchM cluster between application layer (SWCs), OS/IOC, and Basic Software services. Sources: [SWS_Rte_05165], [SWS_Rte_02736], [SWS_Rte_01376], SWS_RTE p. 106.

Communication relies on sender-receiver and client-server patterns: S/R data is transmitted implicitly consistently via buffer copies (`Rte_IRead`/`Rte_IWrite`) or explicitly directly and buffered (`Rte_Read`/`Rte_Write`/`Rte_Receive`) [SWS_Rte_01091], [SWS_Rte_02521], [SWS_Rte_06000]. In the event of failure or invalid signals, mechanisms such as `initValue` substitution or `handleInvalid` strategies take effect [SWS_Rte_05030], [SWS_Rte_06009]. In the case of asynchronous execution, client-server calls (`Rte_Call`, `Rte_Result`) are synchronized via FIFO queues on server and client sides and uniquely assigned using transaction handles [SWS_Rte_01102], [SWS_Rte_02527], [SWS_Rte_02649].

In task and lifecycle management, the RTE ensures reentrancy through code sharing and protects critical sections via configurable locking mechanisms such as interrupt locks, OS resources, or OS spinlocks [SWS_Rte_03015], [SWS_Rte_03504]. Mode switches undergo a strict 10-step sequence from OnExit, OnTransition to OnEntry activations and are completed in an orderly fashion via acknowledgment events [SWS_Rte_02665], [SWS_Rte_02679].

System Architecture & Role of the Module Cluster

The Runtime Environment (RTE) module cluster forms the functional and communicative backbone of the AUTOSAR Classic Platform. It represents the concrete implementation of the Virtual Functional Bus (VFB) on an ECU and completely decouples software components (SWCs) from the underlying Basic Software (BSW) as well as the microcontroller hardware SWS_RTE p. 106. Within the cluster, the actual RTE handles the mediation of application-related inter- and intra-ECU communication, while the integrated Basic Software Scheduler (SchM) controls execution control, consistency assurance, and cyclic scheduling of the BSW modules [SWS_Rte_04546], [SWS_Rte_05165].

The architecture establishes standardized interfaces between application SWCs, sensor/actuator components, and the BSW layers. For vehicle-wide networking, the RTE cluster relies directly on the communication stack: signal-oriented messages are passed to the COM module, while large volumes of data are handled via the LdCom module (Large Data COM) [SWS_Rte_01376], [SWS_Rte_04527]. Process and memory isolation across partition and core boundaries is provided by the AUTOSAR operating system (OS) and its Inter-OS-Application-Communication mechanism (IOC) [SWS_Rte_02736]. Calibration data and memory blocks interface with the NVRAM Manager (NvM) and calibration tools via standardized descriptors [SWS_Rte_03961], [SWS_Rte_05118].

RteArchitecture cluster_app Applikationsschicht (Application Layer) cluster_rte_cluster Runtime Environment Cluster (RTE / SchM) cluster_bsw Basissoftware (BSW) SWC_A Software Component A (Runnable Entities) RTE_Core RTE Engine (S/R, C/S, Invalidation, PIM) SWC_A->RTE_Core Rte_Read / Rte_Write Rte_Call / Rte_Switch SWC_B Software Component B (Runnable Entities) SWC_B->RTE_Core Rte_IRead / Rte_IWrite Rte_Result COM COM Module (Com_SendSignal, Callbacks) RTE_Core->COM Com_SendSignal Com_SendSignalGroup LdCom LdCom Module (Large Data Path) RTE_Core->LdCom LdCom_Transmit OS AUTOSAR OS / IOC (Tasks, ISRs, Spinlocks, IOC Buffer) RTE_Core->OS IOC Transfer Exclusive Areas NvM NVRAM Manager (NvM) (RAM Block Dirty Flags) RTE_Core->NvM Dirty Flags (DF_*) SchM_Core Basic Software Scheduler (SchM) (BswMainFunctions, Mode Control) SchM_Core->COM Com_MainFunctionTx Com_MainFunctionRx SchM_Core->OS Task Activation OS Resources COM->RTE_Core Rte_COMCbk... (Rx Notifications)

Context diagram: Embedding of the RTE and SchM cluster between application layer (SWCs), OS/IOC, and Basic Software services. Sources: [SWS_Rte_05165], [SWS_Rte_02736], [SWS_Rte_01376], SWS_RTE p. 106.

Interplay & Interaction Paths Between the Modules

The interaction within the RTE cluster strictly distinguishes between sender-receiver (S/R) and client-server (C/S) communication. For S/R communication, the RTE supports both implicit and explicit read and write semantics: With implicit access (`Rte_IRead`, `Rte_IWrite`), the RTE creates a local copy at the start of runnable execution that is kept consistent throughout the entire runtime [SWS_Rte_06000], [SWS_Rte_03744]. With explicit access (`Rte_Read`, `Rte_Write`, `Rte_Send`, `Rte_Receive`), data exchange takes place directly synchronously or via queues [SWS_Rte_01091], [SWS_Rte_01092]. For queued events (`swImplPolicy = queued`), the RTE sets up FIFO queues on the receiver side; if such a buffer overflows, the element is discarded and an error state is set [SWS_Rte_02521], [SWS_Rte_02523].

If the data path crosses ECU boundaries (inter-ECU), the RTE transforms and serializes composite data structures and calls `Com_SendSignal` or `Com_SendSignalGroup` to ensure atomic PDU transmission in the COM module [SWS_Rte_04527]. For large data arrays, the RTE alternatively resorts to `LdCom_Transmit` and, in the case of transport protocols (TP), locks the associated buffer until confirmation via callbacks [SWS_Rte_01377], [SWS_Rte_01379]. On the receiver side, the RTE receives data asynchronously via COM callbacks and derives activation events for application runnables from them [SWS_Rte_03530], [SWS_Rte_03531]. If no bus data has arrived yet, the RTE provides configured initial values [SWS_Rte_06009], [SWS_Rte_06010].

Expliziter Sender-Receiver Kommunikationsablauf (Inter-ECU)Sender SWCSender RTECOM ModulReceiver RTEReceiver SWCUse Case: InitialisierungsphaseRte_Read(data)No data received yet: return of initValueRTE_E_OK (initValue)Use Case: Explicit transmission and signalingRte_Write_p_o(data)Com_SendSignal(SignalId, data)RTE_E_OKUse Case: Network reception and forwardingRte_COMCbkRxIndication(SignalId)Buffering the new signal valueValidity check / range checkRte_Read_p_o(data)RTE_E_OK (neuer Datenwert)

Sequence diagram: Explicit sender-receiver data flow across ECU boundaries with buffering and initial value output. Sources: [SWS_Rte_06010], [SWS_Rte_04527], [SWS_Rte_03530], AUTOSAR_SWS_RTE p. 148.

For client-server communication, the RTE generates `Rte_Call` for synchronous calls and separate invocation and query APIs (`Rte_Call`, `Rte_Result`) for asynchronous calls [SWS_Rte_01102], [SWS_Rte_01111]. If calls cannot be resolved directly as a C function in the same context, the RTE buffers requests at the server level in FIFO queues and responses at the client level in a queue of depth 1 [SWS_Rte_02527], [SWS_Rte_02528]. For cross-partition or cross-ECU C/S calls, the RTE uses transaction handles composed of a client ID and sequence counter to precisely correlate responses to the original caller [SWS_Rte_02649], [SWS_Rte_03885].

Synchronization, reentrancy and task contexts

The execution of program code in the RTE cluster takes place within OS tasks or ISR contexts. The RTE distinguishes between basic runnables (category 1 without blocking OS calls) and extended runnables (category 2 with wait points) that are woken up from the `WaitPoint` state by events such as `DataReceivedEvent` or COM callbacks [SWS_Rte_03532], SWS_RTE p. 304. Concurrent activation of the same instance of a runnable entity is strictly prohibited unless the attribute `canBeInvokedConcurrently` is explicitly set to `TRUE` [SWS_Rte_03523]. For multi-instantiated SWCs, AUTOSAR consistently relies on code sharing: Multiple instances share the same executable code, but access separate data and per-instance memory (PIM) via instance-specific descriptors [SWS_Rte_02002], [SWS_Rte_03015], [SWS_Rte_02301].

To protect critical sections, the RTE generates so-called exclusive areas (`Rte_Enter`, `Rte_Exit`). The underlying synchronization mechanism is configured via the parameter `RteExclusiveAreaImplMechanism` [SWS_Rte_03504]. Five defined strategies are available here:

  • ALL_INTERRUPT_BLOCKING: Global disabling of all hardware interrupts [SWS_Rte_03504].
  • OS_INTERRUPT_BLOCKING: Selective disabling of OS-specific interrupts (category 2) [SWS_Rte_03504].
  • OS_RESOURCE: Use of OSEK/AUTOSAR operating system resources with priority ceiling protocol [SWS_Rte_03504].
  • OS_SPINLOCK: Multi-core synchronization via OS spinlocks for coordination between tasks and ISRs of different cores [SWS_Rte_03504].
  • NONE: Omission of internal locks, provided that data consistency is already ensured by strict task prioritization or scheduling [SWS_Rte_03504].
When data is passed between different memory protection partitions, the RTE checks pointer parameters in order to prevent unauthorized memory accesses from untrusted partitions [SWS_Rte_02752], [SWS_Rte_02753].

Typical lifecycles and operating modes

The system lifecycle is subject to a strict division of phases between initialization, normal operation, and controlled shutdown. During system startup, the SchM part is initialized first: The EcuM calls `SchM_Start` on each processor core before BSW modules such as the BswM are started [SWS_Rte_04546], [SWS_Rte_04548]. Subsequently, `SchM_StartTiming` activates the periodic BSW events and MainFunctions [SWS_Rte_04549], [SWS_Rte_04551]. According to the design constraint, `SchM_Start` and `SchM_StartTiming` may be called exactly once per core SWS_RTE p. 928. After that, `Rte_Start` enables the application RTE; if internal resource allocation fails, initialization aborts with `RTE_E_LIMIT` [SWS_Rte_01261], [SWS_Rte_01262].

Operating modes are represented via mode declaration groups. If a mode manager triggers a mode switch via `Rte_Switch`, it is queued in a FIFO queue [SWS_Rte_02631], [SWS_Rte_02718], [SWS_Rte_02719]. Each mode machine undergoes a mandatory 10-step sequence during the transition [SWS_Rte_02665]: First, mode disabling for the target mode is activated and executing entities are awaited (steps 1–2). This is followed by the sequential execution and termination of OnExit (steps 3–4), OnTransition (steps 5–6), and OnEntry executable entities (steps 7–8). Finally, the disabling of the previous mode is removed and the new mode is activated (step 9) before the mode switch is acknowledged via `ModeSwitchedAckEvent` or `Rte_SwitchAck` (step 10) [SWS_Rte_02665], [SWS_Rte_02679], [SWS_Rte_02725]. Via `RteModeToScheduleTableMapping`, operating modes can also be coupled directly to OS schedule tables [SWS_Rte_05146].

10-step sequence of a mode switch (SWS_Rte_02665)Mode ManagerRTE / Mode MachineMode User (SWC/BSW)Use Case: Mode switch requestRte_Switch(Mode)Eintragen in Mode FIFO QueueRTE_E_OKUse Case: 10-Stufen-Transitionssequenz1. Activation mode deactivations next mode2. Wait for termination of affected entities3. Execution of OnExit executable entities4. Wait for termination of all OnExit entities5. Execution of OnTransition executable entities6. Wait for termination of all OnTransition entities7. Execution of OnEntry executable entities8. Wait for termination of all OnEntry entities9. Deaktivierung bisheriger Modus & Aktivierung neuer ModusUse Case: Quittierung10. Trigger ModeSwitchedAckEvent / Rte_SwitchAck

Sequence diagram: Standardized 10-step sequence of an AUTOSAR mode switch with acknowledgement. Sources: [SWS_Rte_02665], [SWS_Rte_02679], EXP_ModeManagementGuide p. 16.

Deinitialization occurs at the beginning of the shutdown phase via `Rte_Stop`. Following this call, the RTE blocks activating, starting, or releasing further runnables on the respective core [SWS_Rte_02538]. Incoming S/R data as well as C/S requests are discarded and ignored while the RTE is in the stopped state [SWS_Rte_02535], [SWS_Rte_02536].

Error Handling, Status Monitoring, and Data Validation

Error states and interface statuses are uniformly returned to the caller in the RTE via the scalar type `Std_ReturnType` [SWS_Rte_01034], SWS_RTE p. 586. The RTE differentiates between application errors (error values 1–63), immediate infrastructure errors (values 128–255), and overlaid status bits such as data loss (`RTE_E_LOST_DATA = 64`) or obsolescence (`RTE_E_MAX_AGE_EXCEEDED = 64`) SWS_RTE p. 586. Typical infrastructure return values include stopped communication (`RTE_E_COM_STOPPED = 128`), communication and response timeouts (`RTE_E_TIMEOUT = 129`), missing data (`RTE_E_NO_DATA = 131`), and resource limits (`RTE_E_LIMIT = 130`) [SWS_Rte_01060], [SWS_Rte_01061], [SWS_Rte_01064]. With active value range checking, the RTE reports range violations with `RTE_E_OUT_OF_RANGE` [SWS_Rte_03845], [SWS_Rte_03846].

To handle implausible or faulty signals, the RTE provides mechanisms for data invalidation. On the sender side, `Rte_Invalidate` marks the signal with a defined replacement value [SWS_Rte_01206], [SWS_Rte_05024]. On the receiver side, the attribute `handleInvalid` controls the replacement strategy: With `keep`, the previous value is retained and a `DataReceiveErrorEvent` is triggered, whereas with `replace`, automatic substitution by `initValue` occurs [SWS_Rte_05030], [SWS_Rte_05049]. Communication failures at the network level are monitored via `aliveTimeout`; if the monitoring time expires, the COM module reports a reception timeout to the RTE via `Rte_COMCbkRxTOut`, whereupon dependent components are notified or fallback values are activated [SWS_Rte_08061].

Context and references: This guide is based exclusively on the AUTOSAR specification of the RTE module (R20-11/R25-11) and the AUTOSAR Mode Management Guide.

Die Runtime Environment (RTE) realisiert den Virtual Functional Bus (VFB) auf einer konkreten ECU und vermittelt alle Inter- und Intra-ECU-Kommunikationsverbindungen zwischen Software-Components (SW-Cs) und Basis-Software.

Module im Cluster

AUTOSAR RTE

The RTE realizes the Virtual Functional Bus (VFB) on a specific ECU, providing communication between Software Components and basic software.

BSW ID 2 13 APIs (10 Funktionen, 3 Typen) #include "Rte.h"

Rte

Performs invocation of server runnables, hard error runnables, ASCR runnables and triggered runnables via a transformer".

void <name of the Invocation Handler> (void);

Rte_Rips_SchM_Deinit deinitializes those RTE Implementation Plug-In parts which are relevant for the SchM related operations.

void Rte_Rips_SchM_Deinit (void);
Rte_Start function

Rte_Start is intended to allocate and initialize system resources and communication resources used by the RTE.

Std_ReturnType Rte_Start (void);

Rte_StartTiming API is intended to release the activation of RunnableEntitys triggered by TimingEvents and BackgroundEvents after the last call of a Rte_Init function.

void Rte_StartTiming (void);
Rte_Stop function

Rte_Stop is used to finalize the RTE on the core it is called. This service releases all system and communication resources allocated by the RTE on that core.

Std_ReturnType Rte_Stop (void);
SchM_Deinit function

SchM_Deinit is used to finalize Basic Software Scheduler part of the RTE of the core on which it is called. This service releases all system resources allocated by the Basic Software Scheduler part on that core.

void SchM_Deinit (void);

Returns the version information of the Basic Software Scheduler.

void SchM_GetVersionInfo (Std_VersionInfoType* versioninfo);
SchM_Init function

SchM_Init is intended to allocate and initialize system resources used by the Basic Software Scheduler part of the RTE for the core on which it is called.

void SchM_Init (const SchM_ConfigType* ConfigPtr);
SchM_Start function

Basic Software Scheduler initialized. Shall be called before BswM_Init().

void SchM_Start (void);

Start periodical events for BSW/SWCs. SchM_Init() has to be called before.

void SchM_StartTiming (void);

Status of the enqueue operation on a distributed shared mode queue

Status of the en- and dequeue operation on a mode queue Tags: atp.Status=draft

Reference to the SwAddrMethod for which software calibration support shall be enabled. Multiplicity 0..* Type Foreign reference to SW-ADDR-METHOD Post-Build Variant Multiplicity false Post-Build Variant Value false Multiplicity Configuration Class Pre-compile time X All Variants Link time – Post-build time – Value Configuration Class Pre-compile time X All Variants Link time – Post-build time – Scope / Dependency scope: local No Included Containers 8.7 Implicit communication configuration Figure 8.22: Configuration of the implicit communication SWS Item [ECUC_Rte_09034] Container Name