AUTOSAR & Automotive Platform Software

Classic AUTOSAR Debugging Guide

A practical engineering model for locating defects across ARXML, RTE, BSW, MCAL, communication modules, diagnostics, and integrated ECU behavior.

Engineering model

How Classic AUTOSAR fits together

Classic AUTOSAR debugging is the process of separating configuration, interface, implementation, and integration faults across a statically configured ECU software stack. The visible symptom may appear in an application interface, communication path, or diagnostic response while the cause resides in ARXML consistency, RTE mapping, BSW configuration, MCAL behavior, or an incorrectly connected module. Effective investigation follows the data and control path from the observed behavior through each configured boundary rather than treating the first failing module as the root cause.

Core concepts

The parts of a practical Classic AUTOSAR setup

01

Configuration as an executable system model

ARXML and generated configuration define many of the connections, identifiers, directions, and parameters that determine how Classic AUTOSAR behaves. A debugging investigation therefore checks model consistency before assuming that source code is defective.

02

Layered interface ownership

RTE, BSW, and MCAL divide responsibility across application-facing interfaces, middleware services, and microcontroller peripherals. Identifying which layer owns each transition prevents changes in one layer from masking a defect in another.

03

Communication path continuity

A signal or diagnostic message must remain consistently connected as it crosses COM, PduR, CanTp, and lower communication boundaries. Matching identifiers, directions, and transport expectations is central to isolating communication failures.

04

Diagnostic event and communication separation

DCM handles diagnostic communication while DEM manages diagnostic events and trouble-code status. A diagnostic symptom can therefore result from a communication path problem, an event-state problem, or an incorrect connection between the two responsibilities.

05

Evidence-driven fault isolation

Debugging becomes repeatable when the engineer states the expected behavior, identifies the first boundary where it differs, and tests one dependency at a time. This approach distinguishes configuration defects from implementation and integration defects.

Build a layered fault model

Start by translating the symptom into a path through the Classic AUTOSAR architecture.

Describe the observed behavior in terms of an input, an expected transition, and an actual result. Then identify the narrowest path that should carry that behavior. For a software-component interaction, this commonly begins at the RTE. For a signal-oriented communication issue, follow the configured path through COM and PduR. For segmented communication, include CanTp. For a diagnostic issue, separate the DCM communication path from DEM event handling.

  1. 01

    State the expected behavior

    Record the expected interface, direction, value or request, response, and relevant operating condition without assuming which module is at fault.

  2. 02

    List the configured boundaries

    Map the behavior across ARXML-defined interfaces and the involved RTE, BSW, or MCAL responsibilities.

  3. 03

    Find the first divergence

    Determine the earliest boundary where the actual behavior differs from the expected behavior; later symptoms may only be consequences.

  4. 04

    Test one dependency at a time

    Change or inspect a single configuration, interface, or implementation assumption before drawing a conclusion about the complete path.

Use ARXML and generated configuration as primary evidence

Many Classic AUTOSAR defects are consistency problems between exchanged models, configured parameters, and existing source code.

Treat ARXML as an engineering input to review, not merely as a file passed through a generation step. Compare the relevant interfaces, directions, identifiers, references, and module relationships against the requirements and interface specification. Then verify that the generated configuration and existing source code use the same assumptions. A source-level investigation can be misleading when the generated connections do not represent the intended model.

  • Check that the participating interfaces are present and connected in the intended direction.
  • Compare identifiers and references across the modules that produce, route, and consume the behavior.
  • Confirm that configuration values agree with the requirements and interface specification rather than relying on names alone.
  • Separate an ARXML modeling error from a generated-configuration issue and from an implementation defect.
  • Review changes at the configuration boundary before attributing an integration symptom to middleware behavior.

Trace communication through its configured path

Communication debugging is most effective when each layer is checked for the same message intent and boundary contract.

LayerPrimary responsibilityDebugging question
COMSignal-oriented communication servicesAre the intended signals associated with the expected communication object and direction?
PduRRouting between upper and lower communication layersDoes the configured route connect the intended source and destination without a mismatched reference?
CanTpSegmented communication over CANDo the transport expectations match the message path and the observed request or response behavior?
MCALAbstraction of microcontroller peripheralsDoes the lowest configured software boundary expose the expected peripheral behavior to the upper layers?

When a communication path fails, begin with the first layer whose expected handoff is absent or incorrect. Do not infer that PduR is defective simply because an upper-layer message is missing; an incorrect COM association can prevent the expected route from ever being selected. Likewise, a transport symptom should be analyzed against CanTp expectations before changing unrelated signal configuration.

Separate DCM behavior from DEM event state

Diagnostic investigations need two parallel questions: can the diagnostic communication path process the interaction, and is the underlying event state correct?

DCM is responsible for diagnostic communication, while DEM manages diagnostic events and trouble-code status. A request that does not receive the expected response may indicate a DCM path or configuration issue. A response that reports an unexpected event state may instead require examination of DEM event handling and its configured relationships. Treat these as related but distinct investigations until evidence connects them.

  1. 01

    Classify the symptom

    Decide whether the failure concerns diagnostic communication itself, event status, or the relationship between the diagnostic result and an event.

  2. 02

    Check the DCM path

    Review the configured diagnostic interface, request handling expectations, and response behavior without assuming a particular unsupported service or response code.

  3. 03

    Check the DEM event path

    Verify that the intended event is defined, connected, and updated according to the requirements and existing implementation.

  4. 04

    Compare the two results

    Determine whether DCM is exposing an incorrect DEM state or whether the diagnostic interaction fails before event information can be evaluated.

Distinguish RTE, BSW, and MCAL defects

Layer ownership provides a disciplined way to choose the next inspection point without prematurely changing lower-level software.

  • Investigate the RTE when the configured connection between software components and basic software does not match the intended interface behavior.
  • Investigate BSW when a configured service, route, communication function, or diagnostic responsibility does not perform its expected middleware role.
  • Investigate MCAL when the upper layers request an expected peripheral interaction but the lowest abstraction boundary does not reflect the required behavior.
  • Investigate integration when each individual artifact appears plausible but their identifiers, directions, references, or assumptions do not agree.
  • Investigate existing source code when the configured path is consistent and the first divergence occurs inside an implementation responsibility.

The same symptom can cross several layers. For example, an absent value at an application-facing boundary does not by itself establish an RTE defect; the producing path may be misconfigured or an underlying BSW or MCAL boundary may not provide the expected input. Record the first failed contract and preserve the evidence that rules out earlier boundaries.

A repeatable debugging workflow

Use a controlled sequence that reduces the risk of correcting a downstream symptom while leaving the actual defect unchanged.

  1. 01

    Define the failure precisely

    Write the expected and actual behavior using the relevant interface, message, event, or diagnostic interaction.

  2. 02

    Collect the authoritative inputs

    Use the applicable requirements, interface specification, ARXML, and existing source code as the reference set.

  3. 03

    Draw the responsibility path

    Place the involved RTE, BSW modules, communication modules, diagnostic modules, and MCAL boundary in their expected order.

  4. 04

    Check static consistency

    Compare names, identifiers, directions, references, and parameter assumptions across the path.

  5. 05

    Locate the first failed handoff

    Use observations at each boundary to determine where the expected behavior stops being preserved.

  6. 06

    Apply the smallest justified correction

    Change the artifact that owns the failed contract, then reassess the complete path rather than only the original symptom.

  7. 07

    Document the result

    Record the evidence, rejected hypotheses, changed configuration or source code, and remaining uncertainty in engineering documentation.

This workflow is intentionally conservative. In a statically configured system, a local change can affect generated interfaces or routing assumptions elsewhere, so the final check should include all connected boundaries rather than only the edited module.

Review evidence and document integration assumptions

A debugging result is more useful when another engineer can reproduce the reasoning from the same artifacts.

Evidence categoryWhat to recordWhy it matters
RequirementExpected behavior and operating conditionDefines what correctness means before implementation details influence the conclusion.
Interface specificationNames, directions, message or API expectations, and participating componentsProvides the contract used to compare ARXML and source code.
ARXMLRelevant model elements, references, and configured relationshipsShows whether the intended architecture is represented in the exchanged model.
Existing source codeImplementation branch, ownership, and assumptions at the first failed boundaryHelps distinguish an implementation defect from a configuration mismatch.
Integration resultObserved behavior after the correction and remaining limitationsPrevents a local fix from being mistaken for proof that every connected path is correct.

Keep conclusions proportional to the evidence. A confirmed mismatch at one interface supports a specific correction, but it does not establish that all related modules are correct. Mark unresolved dependencies explicitly so later testing and integration work can target them.

Engineering pitfalls

Common mistakes

  1. Starting with the most visible module

    An error observed through DCM, COM, or the RTE does not prove that module owns the defect. Trace backward to the first failed contract and inspect configuration and upstream inputs.

  2. Treating successful generation as semantic validation

    ARXML can be structurally acceptable while expressing the wrong connection, direction, or identifier. Review the model against requirements and the interface specification.

  3. Changing several layers at once

    Simultaneous edits to RTE, BSW, and MCAL remove the evidence needed to identify which assumption was wrong. Make the smallest justified change and reassess the path.

  4. Conflating diagnostic communication with event state

    DCM communication behavior and DEM event status have different responsibilities. Analyze whether the interaction failed or whether the returned event state is incorrect.

  5. Ignoring integration boundaries

    Individually plausible artifacts can still disagree at their interfaces. Compare references, directions, and ownership across the complete configured path.

  6. Assuming a local symptom is a local cause

    A missing value or unexpected diagnostic result may be a downstream effect of an earlier routing or configuration defect. Locate the earliest divergence before modifying implementation code.

FAQ

Classic AUTOSAR questions

What should be checked first in a Classic AUTOSAR debugging investigation?
Define the expected and actual behavior, identify the complete configured path, and compare the relevant ARXML and interface specification before changing source code. The first failed boundary is usually more informative than the module where the symptom is visible.
How can ARXML cause a runtime integration defect?
ARXML defines relationships, references, directions, and configuration assumptions used by the integrated system. A model can be accepted by the configuration process yet still connect the wrong interfaces or identifiers, producing behavior that appears to be a middleware or implementation defect.
How do COM, PduR, and CanTp differ during debugging?
COM provides signal-oriented communication services, PduR connects upper and lower communication layers, and CanTp handles segmented communication over CAN. Check each module against its own responsibility and then verify that the configured handoffs between them agree.
How should DCM and DEM be debugged together?
First classify whether the failure is in diagnostic communication or event state. Check DCM for the interaction path and response handling, check DEM for event definition and status handling, and only then determine whether the two paths are connected incorrectly.
When does a symptom point toward MCAL rather than an upper AUTOSAR layer?
MCAL becomes a stronger candidate when the RTE and BSW configuration are consistent, the expected request reaches the lowest abstraction boundary, and the resulting peripheral behavior still differs from the requirement. That conclusion should remain limited to the evidence at the boundary under test.

Engineering support

Discuss a Classic AUTOSAR Project

Use focused engineering support to investigate Classic AUTOSAR configuration, integration, and debugging issues across firmware modules and engineering documentation.