How ziad-abdelkarim/autosar-com-stack works
Project type and purpose
• This is an AUTOSAR-based ADAS (Adaptive Cruise Control) application targeting the TI TM4C123GH6PM microcontroller.
• It is structured as an embedded, full-stack control system: you have host-side Code Composer Studio (CCS) workspaces for building/debugging, a set of AUTOSAR Basic Software (BSW) modules, and a top-level application (“App(Main)”) implementing the cruise control logic.
File-tree analysis
• Top-level folders:
• Application(Windows): CCS project files and build outputs for Windows-hosted CCS execution.
• Application: CCS workspace containing demo/test projects (ApplicationCanDRVTest, freertos_demo, dvt).
• BSWs: contains all AUTOSAR BSW modules plus the actual App(Main) code.
• AUTOSAR BSW modules (under BSWs):
• CanDrv (MCAL driver)
• CanIf (CAN Interface)
• PduR (Protocol Data Unit Router)
• Com (Communication module)
• CanSM (CAN State Manager)
• Det (Development Error Tracer)
• App(Main): Setup.c/h and main.c implement the ACC application.
• Several build/configuration files (tm4c123*.cmd, CCS project definitions, linker scripts).
Key README insight
• “Autosar based ADAS application (graduation project)” tells us to use a layered AUTOSAR architectural view, even if RTE isn’t explicit in the tree.
a. Main components
• Hardware block: TM4C123GH6PM MCU, CAN transceiver, sensors/actuators (radar, throttle/brake interface).
• MCAL layer: CanDrv (driver directly talking to the CAN peripheral).
• ECU abstraction & services: CanIf → PduR → Com → Det.
• Application SWC: App(Main) containing the ACC algorithm (Setup.c/h + main.c).
• Host PC (CCS IDE): represents build/debug environment, flashing via JTAG.
b. Relationships & interactions
• Application issues actuator commands back down the same chain (→ Com → PduR → CanIf → CanDrv → Hardware).
• Host PC uses JTAG to flash/debug both Application(Windows) projects and BSWs.
c. Architectural patterns & principles
• Layered AUTOSAR architecture (MCAL / ECU-Abstraction / Services / RTE / Application).
• Separation of concerns: each BSW module in its own layer, clean interfaces via headers in BSWs/.../Inc.
• Test harness separation: CAN-driver test and FreeRTOS demo live in their own CCS subprojects.
d. Key technologies & frameworks
• TI Tiva C Series TM4C123GH6PM microcontroller
• Code Composer Studio project structure (Eclipse + CDT)
• AUTOSAR BSW modules (CanDrv, CanIf, PduR, Com, CanSM, Det)
• FreeRTOS (demo only, optional if ACC runs on RTOS)
• Linker scripts & CCS build files (tm4c123gh6pm.cmd, .cproject, .launches)