AI Coding Assistants in Automotive Software Development: Practical Applications and Considerations

    Domain knowledge can make AI coding assistants more useful in automotive software engineering. This article examines how standards-based knowledge retrieval, expert role prompts, and reusable task workflows support compliance reviews and code fixes, while highlighting the need for human oversight, maintained knowledge bases, and integration with existing verification tools.

    1. Why Automotive Software Development Is Slow and Expensive

    Automotive software development faces two competing pressures. Vehicle intelligence and electrification are driving rapid growth in software complexity, while strict industry requirements demand careful control throughout development.

    In a typical electronic control unit (ECU) software project, engineers must address several constraints simultaneously:

    • Functional safety: ISO 26262 sets stringent requirements for requirements traceability, verification, and validation.
    • Coding standards: Compliance with standards such as MISRA-C is generally non-negotiable.
    • Cybersecurity: ISO/SAE 21434 requires threat analysis and cybersecurity management throughout the lifecycle.
    • Process assessment: Automotive SPICE (ASPICE) requires documented, auditable development activities.

    Together, these requirements consume substantial engineering time. Engineers must consult standards, interpret clauses, complete checklists, run static analysis, and review individual findings. That leaves less time for designing and implementing core functionality.

    General-purpose large language models offer limited help on their own. Their knowledge comes largely from public sources, and they may lack a detailed understanding of automotive standards, internal development processes, or specific modules such as battery management systems (BMS), door controllers, and diagnostic protocols. Their answers can sound plausible without being usable in practice.

    2. Bringing Domain Knowledge into AI Coding Assistants

    A practical approach is to provide automotive knowledge and rules explicitly rather than expect a general-purpose model to understand automotive engineering unaided. Standards and engineering practices become context that guides the assistant’s answers and actions.

    This approach typically has three components.

    Build a Domain Knowledge Base

    Organize relevant clauses, explanatory notes, and representative examples from standards such as ISO 26262, AUTOSAR, MISRA-C, and ISO/SAE 21434 into a structured knowledge base. Retrieval-augmented generation (RAG) allows the assistant to retrieve this material as needed.

    Define Expert Roles

    Use role prompts to capture different engineering perspectives:

    • A functional safety engineer focuses on hazard analysis and safety goals.
    • An AUTOSAR developer focuses on software component (SWC) interfaces and runtime environment (RTE) interactions.
    • A cybersecurity engineer focuses on threat modeling.

    Selecting the appropriate role for each task helps direct the assistant’s attention to the relevant concerns.

    Create a Reusable Skills Library

    Turn common tasks—such as checking MISRA compliance, writing unit tests, and organizing diagnostic requirements—into reusable workflow templates.

    These templates encourage the assistant to follow a defined procedure rather than improvise.

    The central benefit is a shift from generic answers based on scattered online information toward traceable outputs grounded in authoritative standards.

    3. Practical Applications: From Compliance Review to Code Fixes

    An illustrative door lock and unlock module shows how this approach can streamline routine engineering work.

    Scenario 1: Coding Standards Review

    An engineer asks the assistant to review the module for compliance with MISRA-C:2012.

    With the relevant standards available as context, the assistant can compare the code against individual rules and produce a report resembling a static analysis report. Each finding includes:

    • The rule identifier
    • The location of the issue
    • The reason for the violation
    • A suggested correction

    Commercial static analysis licenses can represent a substantial upfront expense. Token-based, on-demand assistance may offer a more accessible option for smaller teams, particularly for reviewing and explaining potential issues.

    However, this assistance complements rather than replaces the established static analysis toolchain.

    Scenario 2: Assisted Code Repair

    After the review, the engineer can ask the assistant to apply the proposed fixes. The assistant makes changes one at a time, with the engineer reviewing and approving each operation before it proceeds.

    In the illustrative scenario, an SWC containing three .c files and two .h files has more than a dozen coding-standard issues addressed within a few minutes. Handling the same work manually can take over an hour, with repetitive edits also creating opportunities for mistakes.

    The following example illustrates a proposed change from implicit conversion to explicitly expressed integer arithmetic:

    1. // Before: implicit type conversion, raising MISRA-C:2012 Rule 10.x concerns
    2. uint16_t speed = sensor_raw * 0.05;
    3. // After: explicit conversion and integer arithmetic make the intent clearer
    4. uint16_t speed = (uint16_t)((uint32_t)sensor_raw * 5u / 100u);

    Such changes still require engineering review and verification; an AI-generated edit is not, by itself, evidence of compliance.

    4. Implementation Priorities and Risks

    Keep Engineers in Control

    Engineers must review AI-generated fixes, especially changes to safety-related code. Automated modifications should have version-control history and review records.

    This oversight also supports the assessment of confidence in software tools required by functional safety processes.

    Maintain the Knowledge Base

    The quality of the knowledge base sets the ceiling for the assistant’s usefulness. Accurate interpretations of standards and well-documented internal practices directly influence the quality of its output.

    Building the knowledge base is not a one-time exercise. It requires ongoing maintenance.

    Integrate with the Existing Toolchain

    Static analysis, unit testing, and requirements management tools remain the foundation of the development process.

    The assistant’s role is to reduce repetitive work and accelerate the check–fix–verify cycle, not to replace those tools or the evidence they produce.

    5. Conclusion

    Systematically incorporating industry standards, development processes, and expert experience into AI coding assistants is a practical way to make large language models more useful in specialized engineering domains.

    For automotive software engineers, this can mean less time spent searching standards, completing checklists, and interpreting routine findings—and more time available for architecture and core development.

    The opportunity is to modernize automotive software workflows while preserving the review, traceability, and verification that the industry requires.