How shiivamgupta/autosar-software-demo works
1. Repository purpose
- This is a small AUTOSAR Classic demo that illustrates the standard ECU software layering: Application SWC → ECU Abstraction → MCAL.
- It is not a complete production AUTOSAR stack; it is a teaching/demo repo showing how the layers fit together.
2. Top-level architecture
- The repo is organized by AUTOSAR layer:
- ASW: application software component
- ECUAbstraction: hardware-facing abstraction layer
- MCAL: low-level microcontroller drivers
- Interfaces: shared AUTOSAR interface/type definitions
- Composition.arxml: system/component assembly metadata
3. Application layer
- ASW/ApplicationSWC.c and ASW/ApplicationSWC.arxml represent the application software component.
- This is where feature logic lives; it should not talk directly to hardware.
- In an AUTOSAR diagram, this box is the topmost functional block and depends on abstract interfaces rather than concrete peripherals.
4. ECU abstraction layer
- ECUAbstraction/EcuAbstraction.c and ECUAbstraction/EcuAbstraction_swc.arxml sit between the application and the drivers.
- This layer hides board/peripheral details and exposes a more stable, ECU-oriented API to the application.
- It is the main boundary that converts application intent into hardware-related operations.
5. MCAL drivers
- MCAL/ADCDriver/Adc.c and Adc.h provide ADC access.
- MCAL/DIODriver/Dio.c and Dio.h provide digital I/O access.
- These are the lowest software layer in the repo and represent the point where software touches microcontroller peripherals directly.
6. Interfaces and types
- Interfaces/Interfaces.arxml defines shared AUTOSAR interfaces/ports used between components.
- Interfaces/PlatformTypes.arxml provides common platform data types used across layers.
- These files are the contract layer: they keep the application, abstraction, and driver code aligned on data types and communication signatures.
7. Composition and wiring
- Composition.arxml describes how the SWCs are assembled into a system.
- In an architecture diagram, this is the block that connects the application component to the abstraction component through AUTOSAR-defined ports/interfaces.
- It represents integration/configuration more than executable logic.
8. Primary data flow
- The intended flow is ApplicationSWC → EcuAbstraction → MCAL drivers → hardware.
- Read/write operations on sensors or actuators would be requested by the application, translated by the ECU abstraction, and executed by ADC/DIO drivers.
- This direction is the key abstraction boundary for the diagram.
9. Boundary between logic and hardware
- The application layer should remain hardware-independent.
- Hardware-specific details are concentrated in MCAL and partially in ECU Abstraction.
- This separation is the main architectural point of the repo and is the most important thing to show visually.
10. AUTOSAR configuration artifacts
- The .arxml files are central to the architecture because AUTOSAR relies heavily on model/configuration data.
- They likely define component interfaces, ports, and composition wiring that would normally be processed by AUTOSAR tooling.
- This repo demonstrates that AUTOSAR architecture is as much configuration/modeling as it is C code.
11. Tooling/runtime context
- The README notes AUTOSAR tooling such as DaVinci Configurator/Developer as the typical way these components are generated and integrated.
- That matters architecturally because the repo reflects a tool-driven AUTOSAR workflow rather than a manually wired embedded project.
12. What to emphasize in a diagram
- Draw three software layers with clear arrows downward:
- Application SWC
- ECU Abstraction
- MCAL (ADC, DIO)
- Put Interfaces/PlatformTypes alongside as shared contracts.
- Show Composition.arxml as the system integrator that binds components together.
Main entry points: Interfaces.arxml Interfaces · ApplicationSWC.arxml App ARXML · EcuAbstraction_swc.arxml ECU ARXML · PlatformTypes.arxml Platform Types
Components 10
Application
Top-level AUTOSAR application logic
ECU Abstraction
Hardware-oriented translation layer
- ECU Abstraction · Converts application intent into ECU-oriented operations
ECUAbstraction/EcuAbstraction.c - ECU ARXML · Abstraction component configuration and ports
ECUAbstraction/EcuAbstraction_swc.arxml
MCAL
Low-level microcontroller drivers
- ADC Driver · Analog-to-digital conversion driver
MCAL/ADCDriver/Adc.c - DIO Driver · Digital input/output driver
MCAL/DIODriver/Dio.c
Interfaces
Shared AUTOSAR contracts and types
- Interfaces · Shared ports and communication contracts
Interfaces/Interfaces.arxml - Platform Types · Common platform data types used across layers
Interfaces/PlatformTypes.arxml
Composition
Assembly and wiring configuration
- Composition · Assembles components and their AUTOSAR ports
Composition.arxml
Other components
- Hardware · Physical ADC and DIO resources behind the drivers
Connections 16
- Composition → App ARXML: assembles · Composition wires the application component into the system
- Composition → ECU ARXML: assembles · Composition wires the ECU abstraction component into the system
- Composition → Interfaces: uses · Composition depends on shared AUTOSAR interfaces
- App ARXML → Interfaces: requires · Application ports are defined by shared interfaces
- App ARXML → Platform Types: types · Application configuration uses shared platform types
- App SWC → ECU Abstraction: calls · Application logic invokes the abstraction layer
- ECU ARXML → Interfaces: requires · Abstraction ports are defined by shared interfaces
- ECU ARXML → Platform Types: types · Abstraction configuration uses shared platform types
- ECU Abstraction → ADC Driver: reads · Abstraction delegates sensor access to ADC
- ECU Abstraction → DIO Driver: controls · Abstraction delegates actuator or I/O control to DIO
- ADC Driver → Hardware: drives · ADC driver talks to physical peripheral registers
- DIO Driver → Hardware: drives · DIO driver talks to physical pins and registers
- Interfaces → App ARXML: contracts · Shared interface definitions constrain the application
- Interfaces → ECU ARXML: contracts · Shared interface definitions constrain the abstraction
- Platform Types → ADC Driver: types · Driver code uses common platform data types
- Platform Types → DIO Driver: types · Driver code uses common platform data types