How openautosar/classic-platform works
Project Type and Purpose
• This is an embedded AUTOSAR Basic Software (BSW) platform (a fork of Arctic Core 3.1).
• It provides a complete AUTOSAR stack: from Microcontroller Abstraction Layer (MCAL) through ECU Abstraction, Services, Communication, Diagnostics, OS and RTE to the application.
File‐Structure Analysis
• Top‐level layers:
• Peripherals & arch: low-level hardware abstraction (MCAL stubs & real drivers)
• drivers/: MCU peripheral drivers (CAN, Flash, Wdg, etc.)
• memory/: EEPROM/Flash abstraction (Ea, Fee, NvM, etc.)
• communication/: AUTOSAR COM stack (CanIf, PduR, Com, TcpIp, SoAd, DoIP, etc.)
• diagnostic/: DEM, DCM, DET, DLT, FiM
• system/: system services (EcuM, Os, BswM, SchM, StbM, Cpl, Cal, LinuxOs port, Rtos)
• safety_security/: safety libraries (SafeLib, WdgIf, WdgM)
• common, clib, datastructures, testCommon: utility & test scaffolding
• lwip-2.0.3: third-party TCP/IP port used by TcpIp/SoAd/DoIP
• /, integration/: RTE memory maps, common types, RTE headers
• scripts/: build, toolchain, code generation, docs
README Insights
• Confirms this is an open-source AUTOSAR BSW platform replacing proprietary Arctic Core.
a. Main Components (Arrange vertically by abstraction level)
1. Hardware Layer
– Physical ECU: CPU, buses, transceivers, I/O ports (arch/, Peripherals/)
2. Microcontroller Abstraction Layer (MCAL)
– drivers/ (CanTrcv, Eep, Fls, Fr, Wdg, If, etc.)
3. ECU Abstraction & I/O Hardware Abstraction
– Peripherals/IoHwAb
– boards/ (board-specific configs)
4. Services Layer (BSW Services)
– memory/ (Ea, Fee, MemIf, NvM, RamTst)
– system/Cal, Cpl (crypto), StbM, SchM
– safety_security/SafeLib, WdgIf, WdgM
5. Communication & Network Management
– communication/*: CanIf, CanTp, PduR, Com, ComM, SoAd, DoIP, TcpIp, EthIf, EthSM, EthTSyn, LinIf/LinTp, FrIf/FrTp, J1939Tp, UdpNm, Xcp, SD, SecOC
– lwip-2.0.3 (stack used by TcpIp, SoAd)
6. Diagnostic & DLT
– diagnostic/Dem, Dcm, Det, Dlt, FiM
7. System Manager & ECU Manager
– system/EcuM, system/BswM
8. Operating System & RTE
– system/Os: OSAL (Linux, generic), RTOS kernel, integration, conformance to AUTOSAR OS
– include/rte, integration/MemMap.h (RTE memory mapping)
– common/tcf, shell, console (debug access)
9. Application Layer (not included here – user code sits on top of RTE)
b. Relationships & Data Flows
– Hardware ↔ MCAL drivers: control and status registers
– MCAL ↔ ECU Abstraction: uniform APIs for higher layers
– Services modules consume ECU Abstraction for memory, timing, watchdog
– Communication modules: data flow from Com → PduR → lower-If → driver → bus
– Diagnostic modules hook into Communication and Services (Dem reports faults, Dcm processes requests over DoIP or CAN)
– OS schedules all modules; SchM enforces statistics and locking protocols
– RTE dispatches calls from application to BSW modules
c. Architectural Patterns & Principles
– Layered architecture (MCAL, ECU Abstraction, Services, Communication, Diagnostics, OS, RTE)
– Memory and timing determinism (static configs under boards/, scripts/)
– Separation of concerns: safety/security libs separate from functional COM stack
– Hardware independence: board-specific configs under boards/, generic code under arch/ and drivers/
d. Key Technologies & Frameworks
– GNU Make & custom makefile modules (mod.mk)
– Third-party lwIP TCP/IP stack
– Python, shell scripts for code generation & MemMap injection
– Trace32, PLS UDE integration for debugging
– AUTOSAR OS, RTE, MemMap, BswM, EcuM services
Essential Elements to Capture
– Board-to-MCAL boundary (real vs. stubbed drivers)
– MCAL → ECU Abstraction → Service APIs
– PduR central router between upper (Com, Dcm, SoAd) and lower (CanIf, EthIf, LinIf, FrIf) layers
– Dcm ↔ DoIP/CanTp for network diagnostic
– EcuM for system initialization & shutdown
– Os for task scheduling, alarms, resources
– RTE as the glue for application components (shown as a layer above OS)
– Third-party code in lwIP used by TCP/IP-based modules