# parai/opensar architecture

> Architecture diagram of the GitHub repository parai/opensar, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-14). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/parai/opensar
- Repository: https://github.com/parai/opensar

## Overview

Arctic Core is an open-source AUTOSAR embedded platform, with application software, communication and diagnostic services, memory services, and OS/runtime support. Its main runtime domain includes application-facing communication and diagnostics, while PduR visibly dispatches routed PDUs to upper-layer modules. The repository also includes OpenSAR configuration tooling and a GUI-based simulator. Several subsystems are represented by their source directories because their implementation details were not sampled; connections are limited to documented or excerpt-visible relationships.

Main entry points: [`communication/PduR/PduR_Routing.c`](https://github.com/parai/opensar/blob/master/communication/PduR/PduR_Routing.c) (PDU routing), [`tools/OpenSAR/main.py`](https://github.com/parai/opensar/blob/master/tools/OpenSAR/main.py) (OpenSAR Studio), [`app/src/app.c`](https://github.com/parai/opensar/blob/master/app/src/app.c) (AUTOSAR app), [`diagnostic/Dcm/Dcm_Dsp.c`](https://github.com/parai/opensar/blob/master/diagnostic/Dcm/Dcm_Dsp.c) (Diagnostic services)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_application["Application"]
  node_app["AUTOSAR app<br/>[app.c]"]
  node_app_features["App features"]
end

subgraph group_communication["Communication"]
  node_com["COM signals<br/>[Com.c]"]
  node_pdur["PDU routing<br/>[PduR_Routing.c]"]
  node_canif["CAN interface<br/>[CanIf.c]"]
  node_cantp["CAN transport<br/>[CanTp.c]"]
  node_can_nm["CAN networking<br/>[CanNm.c]"]
  node_can_sm["CAN state manager<br/>[CanSM.c]"]
  node_comm["Com management<br/>[ComM.c]"]
  node_nm["Network management<br/>[Nm.c]"]
  node_j1939["J1939 transport<br/>[J1939Tp.c]"]
end

subgraph group_diagnostics["Diagnostics"]
  node_dcm["Diagnostic services<br/>[Dcm_Dsp.c]"]
  node_dem["Event diagnostics<br/>[Dem.c]"]
  node_det["Development errors<br/>[Det.c]"]
end

subgraph group_memory["Memory Services"]
  node_nvm["Nonvolatile manager<br/>[NvM.c]"]
  node_fee["Flash emulation<br/>[Fee.c]"]
  node_ea["EEPROM abstraction<br/>[Ea.c]"]
  node_memif["Memory interface<br/>[MemIf.c]"]
end

subgraph group_runtime["OS Runtime"]
  node_os_kernel["OSEK kernel<br/>[application.c]"]
  node_freertos["FreeRTOS tasks<br/>[tasks.c]"]
  node_ecum["ECU management<br/>[EcuM.c]"]
  node_drivers["Hardware drivers"]
  node_types["AUTOSAR interfaces<br/>[Std_Types.h]"]
end

subgraph group_tools["Configuration &amp; Simulation"]
  node_opensar["OpenSAR Studio<br/>[main.py]"]
  node_arxml["ARXML handling<br/>[Arxml.py]"]
  node_argen["Configuration generation<br/>[ArGen.py]"]
  node_simulator["GUI simulator<br/>[main.py]"]
  node_sim_components["Simulation components"]
  node_gtk_drivers["GTK hardware simulation"]
end

node_user(("Application user"))

node_user -.->|"uses"| node_app
node_pdur -->|"dispatches"| node_com
node_pdur -->|"dispatches"| node_dcm
node_pdur -->|"dispatches"| node_cantp
node_dcm -.->|"may query"| node_dem
node_dem -.->|"may persist"| node_nvm
node_app -.->|"uses"| node_app_features
node_opensar -->|"uses"| node_arxml
node_opensar -->|"uses"| node_argen
node_simulator -->|"loads"| node_sim_components

click node_app "https://github.com/parai/opensar/blob/master/app/src/app.c"
click node_app_features "https://github.com/parai/opensar/tree/master/app/src"
click node_com "https://github.com/parai/opensar/blob/master/communication/Com/Com.c"
click node_pdur "https://github.com/parai/opensar/blob/master/communication/PduR/PduR_Routing.c"
click node_canif "https://github.com/parai/opensar/blob/master/communication/CanIf/CanIf.c"
click node_cantp "https://github.com/parai/opensar/blob/master/communication/CanTp/CanTp.c"
click node_can_nm "https://github.com/parai/opensar/blob/master/communication/CanNm/CanNm.c"
click node_can_sm "https://github.com/parai/opensar/blob/master/communication/CanSM/CanSM.c"
click node_comm "https://github.com/parai/opensar/blob/master/communication/ComM/ComM.c"
click node_nm "https://github.com/parai/opensar/blob/master/communication/Nm/Nm.c"
click node_j1939 "https://github.com/parai/opensar/blob/master/communication/J1939Tp/J1939Tp.c"
click node_dcm "https://github.com/parai/opensar/blob/master/diagnostic/Dcm/Dcm_Dsp.c"
click node_dem "https://github.com/parai/opensar/blob/master/diagnostic/Dem/Dem.c"
click node_det "https://github.com/parai/opensar/blob/master/diagnostic/Det/Det.c"
click node_nvm "https://github.com/parai/opensar/blob/master/memory/NvM/NvM.c"
click node_fee "https://github.com/parai/opensar/blob/master/memory/Fee/Fee.c"
click node_ea "https://github.com/parai/opensar/blob/master/memory/Ea/Ea.c"
click node_memif "https://github.com/parai/opensar/blob/master/memory/MemIf/MemIf.c"
click node_os_kernel "https://github.com/parai/opensar/blob/master/system/kernel/application.c"
click node_freertos "https://github.com/parai/opensar/blob/master/system/FreeRTOS/Source/tasks.c"
click node_ecum "https://github.com/parai/opensar/blob/master/system/EcuM/EcuM.c"
click node_drivers "https://github.com/parai/opensar/tree/master/arch/arm/arm_cm3/drivers"
click node_types "https://github.com/parai/opensar/blob/master/include/Std_Types.h"
click node_opensar "https://github.com/parai/opensar/blob/master/tools/OpenSAR/main.py"
click node_arxml "https://github.com/parai/opensar/blob/master/tools/OpenSAR/Arxml.py"
click node_argen "https://github.com/parai/opensar/blob/master/tools/OpenSAR/ArGen.py"
click node_simulator "https://github.com/parai/opensar/blob/master/tools/simulator/main.py"
click node_sim_components "https://github.com/parai/opensar/tree/master/tools/simulator"
click node_gtk_drivers "https://github.com/parai/opensar/tree/master/arch/generic/gtk/drivers"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_app,node_app_features,node_user toneBlue
class node_com,node_pdur,node_canif,node_cantp,node_can_nm,node_can_sm,node_comm,node_nm,node_j1939 toneAmber
class node_dcm,node_dem,node_det toneMint
class node_nvm,node_fee,node_ea,node_memif toneRose
class node_os_kernel,node_freertos,node_ecum,node_drivers,node_types toneIndigo
class node_opensar,node_arxml,node_argen,node_simulator,node_sim_components,node_gtk_drivers toneTeal
```

## Components

### Application

- [AUTOSAR app](https://github.com/parai/opensar/blob/master/app/src/app.c): `app/src/app.c`
- [App features](https://github.com/parai/opensar/tree/master/app/src): `app/src`

### Communication

- [COM signals](https://github.com/parai/opensar/blob/master/communication/Com/Com.c): `communication/Com/Com.c`
- [PDU routing](https://github.com/parai/opensar/blob/master/communication/PduR/PduR_Routing.c): `communication/PduR/PduR_Routing.c`
- [CAN interface](https://github.com/parai/opensar/blob/master/communication/CanIf/CanIf.c): `communication/CanIf/CanIf.c`
- [CAN transport](https://github.com/parai/opensar/blob/master/communication/CanTp/CanTp.c): `communication/CanTp/CanTp.c`
- [CAN networking](https://github.com/parai/opensar/blob/master/communication/CanNm/CanNm.c): `communication/CanNm/CanNm.c`
- [CAN state manager](https://github.com/parai/opensar/blob/master/communication/CanSM/CanSM.c): `communication/CanSM/CanSM.c`
- [Com management](https://github.com/parai/opensar/blob/master/communication/ComM/ComM.c): `communication/ComM/ComM.c`
- [Network management](https://github.com/parai/opensar/blob/master/communication/Nm/Nm.c): `communication/Nm/Nm.c`
- [J1939 transport](https://github.com/parai/opensar/blob/master/communication/J1939Tp/J1939Tp.c): `communication/J1939Tp/J1939Tp.c`

### Diagnostics

- [Diagnostic services](https://github.com/parai/opensar/blob/master/diagnostic/Dcm/Dcm_Dsp.c): `diagnostic/Dcm/Dcm_Dsp.c`
- [Event diagnostics](https://github.com/parai/opensar/blob/master/diagnostic/Dem/Dem.c): `diagnostic/Dem/Dem.c`
- [Development errors](https://github.com/parai/opensar/blob/master/diagnostic/Det/Det.c): `diagnostic/Det/Det.c`

### Memory Services

- [Nonvolatile manager](https://github.com/parai/opensar/blob/master/memory/NvM/NvM.c): `memory/NvM/NvM.c`
- [Flash emulation](https://github.com/parai/opensar/blob/master/memory/Fee/Fee.c): `memory/Fee/Fee.c`
- [EEPROM abstraction](https://github.com/parai/opensar/blob/master/memory/Ea/Ea.c): `memory/Ea/Ea.c`
- [Memory interface](https://github.com/parai/opensar/blob/master/memory/MemIf/MemIf.c): `memory/MemIf/MemIf.c`

### OS Runtime

- [OSEK kernel](https://github.com/parai/opensar/blob/master/system/kernel/application.c): `system/kernel/application.c`
- [FreeRTOS tasks](https://github.com/parai/opensar/blob/master/system/FreeRTOS/Source/tasks.c): `system/FreeRTOS/Source/tasks.c`
- [ECU management](https://github.com/parai/opensar/blob/master/system/EcuM/EcuM.c): `system/EcuM/EcuM.c`
- [Hardware drivers](https://github.com/parai/opensar/tree/master/arch/arm/arm_cm3/drivers): `arch/arm/arm_cm3/drivers`
- [AUTOSAR interfaces](https://github.com/parai/opensar/blob/master/include/Std_Types.h): `include/Std_Types.h`

### Configuration & Simulation

- [OpenSAR Studio](https://github.com/parai/opensar/blob/master/tools/OpenSAR/main.py): `tools/OpenSAR/main.py`
- [ARXML handling](https://github.com/parai/opensar/blob/master/tools/OpenSAR/Arxml.py): `tools/OpenSAR/Arxml.py`
- [Configuration generation](https://github.com/parai/opensar/blob/master/tools/OpenSAR/ArGen.py): `tools/OpenSAR/ArGen.py`
- [GUI simulator](https://github.com/parai/opensar/blob/master/tools/simulator/main.py): `tools/simulator/main.py`
- [Simulation components](https://github.com/parai/opensar/tree/master/tools/simulator): `tools/simulator`
- [GTK hardware simulation](https://github.com/parai/opensar/tree/master/arch/generic/gtk/drivers): `arch/generic/gtk/drivers`

### Other components

- **Application user**

## Connections

- Application user → AUTOSAR app: uses
- PDU routing → COM signals: dispatches (evidence: `communication/PduR/PduR_Routing.c`)
- PDU routing → Diagnostic services: dispatches (evidence: `communication/PduR/PduR_Routing.c`)
- PDU routing → CAN transport: dispatches (evidence: `communication/PduR/PduR_Routing.c`)
- Diagnostic services → Event diagnostics: may query
- Event diagnostics → Nonvolatile manager: may persist
- AUTOSAR app → App features: uses
- OpenSAR Studio → ARXML handling: uses (evidence: `tools/OpenSAR/main.py`)
- OpenSAR Studio → Configuration generation: uses (evidence: `tools/OpenSAR/main.py`)
- GUI simulator → Simulation components: loads (evidence: `tools/simulator/main.py`)
