# hyden18/zephyr architecture

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

- Interactive diagram: https://gitdiagram.com/hyden18/zephyr
- Repository: https://github.com/hyden18/zephyr

## Overview

Zephyr is a small-footprint real-time operating system for resource-constrained devices. Its principal workflow is an application using OS services that execute on a supported processor architecture and interact with board hardware through drivers. The tree also shows substantial networking, Bluetooth, storage, device-management, and inter-process communication capabilities. Source excerpts support several internal calls and dependencies, but do not expose the complete kernel/application path; those broader relationships are described only where the README documents them.

Main entry points: [`subsys/net/lib/lwm2m/lwm2m_engine.c`](https://github.com/hyden18/zephyr/blob/main/subsys/net/lib/lwm2m/lwm2m_engine.c) (LwM2M engine), [`subsys/pmci/mctp/mctp_i2c_gpio_controller.c`](https://github.com/hyden18/zephyr/blob/main/subsys/pmci/mctp/mctp_i2c_gpio_controller.c) (MCTP I²C/GPIO), [`arch`](https://github.com/hyden18/zephyr/tree/main/arch) (Architecture ports), [`drivers/disk/nvme/nvme_controller.c`](https://github.com/hyden18/zephyr/blob/main/drivers/disk/nvme/nvme_controller.c) (NVMe controller)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_core["OS core"]
  node_zephyr["Zephyr RTOS"]
  node_rtio["RTIO interface<br/>[rtio.h]"]
end

subgraph group_platform["Hardware support"]
  node_archports["Architecture ports"]
  node_boards["Board support"]
  node_i2c["NPCX I²C"]
  node_gpio["GPIO API<br/>[gpio.h]"]
  node_nvme["NVMe controller<br/>[nvme_controller.c]"]
  node_nvmeprotocol["NVMe command support"]
end

subgraph group_connectivity["Connectivity"]
  node_bluetooth["Bluetooth subsystems"]
  node_media["Media controller shell<br/>[media_controller.c]"]
  node_mediaproxy["Media proxy"]
  node_lorawan["LoRaWAN engine<br/>[engine.c]"]
  node_lorawanmac["LoRaWAN MAC<br/>[mac.h]"]
  node_lwm2m["LwM2M engine<br/>[lwm2m_engine.c]"]
  node_lwm2mobjects["LwM2M objects<br/>[lwm2m_object.h]"]
  node_lwm2mformats["LwM2M encodings"]
  node_mctp["MCTP I²C/GPIO"]
end

subgraph group_services["System services"]
  node_updatehub["UpdateHub storage"]
  node_ipc["IPC service<br/>[ipc_service.c]"]
end

subgraph group_storage["Storage"]
  node_securestorage["PSA protected storage API"]
  node_fido["FIDO2 storage<br/>[fido2_storage.c]"]
end

node_application(("Embedded application"))

node_application -->|"runs on"| node_zephyr
node_zephyr -->|"supports architectures"| node_archports
node_archports -.->|"targets supported boards"| node_boards
node_nvme -->|"uses helpers"| node_nvmeprotocol
node_media -->|"calls controls"| node_mediaproxy
node_lorawan -->|"dispatches requests"| node_lorawanmac
node_lwm2m -->|"uses object APIs"| node_lwm2mobjects
node_lwm2m -->|"uses encodings"| node_lwm2mformats
node_mctp -->|"uses GPIO API"| node_gpio
node_mctp -->|"submits transfers"| node_rtio

click node_archports "https://github.com/hyden18/zephyr/tree/main/arch"
click node_boards "https://github.com/hyden18/zephyr/tree/main/boards"
click node_i2c "https://github.com/hyden18/zephyr/blob/main/drivers/i2c/i2c_npcx_controller.c"
click node_gpio "https://github.com/hyden18/zephyr/blob/main/include/zephyr/drivers/gpio.h"
click node_nvme "https://github.com/hyden18/zephyr/blob/main/drivers/disk/nvme/nvme_controller.c"
click node_nvmeprotocol "https://github.com/hyden18/zephyr/tree/main/drivers/disk/nvme"
click node_bluetooth "https://github.com/hyden18/zephyr/tree/main/subsys/bluetooth"
click node_media "https://github.com/hyden18/zephyr/blob/main/subsys/bluetooth/audio/shell/media_controller.c"
click node_mediaproxy "https://github.com/hyden18/zephyr/blob/main/subsys/bluetooth/audio/media_proxy_internal.h"
click node_lorawan "https://github.com/hyden18/zephyr/blob/main/subsys/lorawan/native/engine.c"
click node_lorawanmac "https://github.com/hyden18/zephyr/blob/main/subsys/lorawan/native/mac/mac.h"
click node_lwm2m "https://github.com/hyden18/zephyr/blob/main/subsys/net/lib/lwm2m/lwm2m_engine.c"
click node_lwm2mobjects "https://github.com/hyden18/zephyr/blob/main/subsys/net/lib/lwm2m/lwm2m_object.h"
click node_lwm2mformats "https://github.com/hyden18/zephyr/tree/main/subsys/net/lib/lwm2m"
click node_mctp "https://github.com/hyden18/zephyr/blob/main/subsys/pmci/mctp/mctp_i2c_gpio_controller.c"
click node_rtio "https://github.com/hyden18/zephyr/blob/main/include/zephyr/rtio/rtio.h"
click node_securestorage "https://github.com/hyden18/zephyr/blob/main/subsys/secure_storage/include/psa/protected_storage.h"
click node_fido "https://github.com/hyden18/zephyr/blob/main/subsys/authentication/fido2/storage/fido2_storage.c"
click node_updatehub "https://github.com/hyden18/zephyr/blob/main/subsys/mgmt/updatehub/updatehub_storage.c"
click node_ipc "https://github.com/hyden18/zephyr/blob/main/subsys/ipc/ipc_service/ipc_service.c"

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_zephyr,node_rtio toneBlue
class node_archports,node_boards,node_i2c,node_gpio,node_nvme,node_nvmeprotocol toneAmber
class node_bluetooth,node_media,node_mediaproxy,node_lorawan,node_lorawanmac,node_lwm2m,node_lwm2mobjects,node_lwm2mformats,node_mctp toneMint
class node_updatehub,node_ipc toneRose
class node_securestorage,node_fido,node_application toneIndigo
```

## Components

### OS core

- **Zephyr RTOS**
- [RTIO interface](https://github.com/hyden18/zephyr/blob/main/include/zephyr/rtio/rtio.h): `include/zephyr/rtio/rtio.h`

### Hardware support

- [Architecture ports](https://github.com/hyden18/zephyr/tree/main/arch): `arch`
- [Board support](https://github.com/hyden18/zephyr/tree/main/boards): `boards`
- [NPCX I²C](https://github.com/hyden18/zephyr/blob/main/drivers/i2c/i2c_npcx_controller.c): `drivers/i2c/i2c_npcx_controller.c`
- [GPIO API](https://github.com/hyden18/zephyr/blob/main/include/zephyr/drivers/gpio.h): `include/zephyr/drivers/gpio.h`
- [NVMe controller](https://github.com/hyden18/zephyr/blob/main/drivers/disk/nvme/nvme_controller.c): `drivers/disk/nvme/nvme_controller.c`
- [NVMe command support](https://github.com/hyden18/zephyr/tree/main/drivers/disk/nvme): `drivers/disk/nvme`

### Connectivity

- [Bluetooth subsystems](https://github.com/hyden18/zephyr/tree/main/subsys/bluetooth): `subsys/bluetooth`
- [Media controller shell](https://github.com/hyden18/zephyr/blob/main/subsys/bluetooth/audio/shell/media_controller.c): `subsys/bluetooth/audio/shell/media_controller.c`
- [Media proxy](https://github.com/hyden18/zephyr/blob/main/subsys/bluetooth/audio/media_proxy_internal.h): `subsys/bluetooth/audio/media_proxy_internal.h`
- [LoRaWAN engine](https://github.com/hyden18/zephyr/blob/main/subsys/lorawan/native/engine.c): `subsys/lorawan/native/engine.c`
- [LoRaWAN MAC](https://github.com/hyden18/zephyr/blob/main/subsys/lorawan/native/mac/mac.h): `subsys/lorawan/native/mac/mac.h`
- [LwM2M engine](https://github.com/hyden18/zephyr/blob/main/subsys/net/lib/lwm2m/lwm2m_engine.c): `subsys/net/lib/lwm2m/lwm2m_engine.c`
- [LwM2M objects](https://github.com/hyden18/zephyr/blob/main/subsys/net/lib/lwm2m/lwm2m_object.h): `subsys/net/lib/lwm2m/lwm2m_object.h`
- [LwM2M encodings](https://github.com/hyden18/zephyr/tree/main/subsys/net/lib/lwm2m): `subsys/net/lib/lwm2m`
- [MCTP I²C/GPIO](https://github.com/hyden18/zephyr/blob/main/subsys/pmci/mctp/mctp_i2c_gpio_controller.c): `subsys/pmci/mctp/mctp_i2c_gpio_controller.c`

### System services

- [UpdateHub storage](https://github.com/hyden18/zephyr/blob/main/subsys/mgmt/updatehub/updatehub_storage.c): `subsys/mgmt/updatehub/updatehub_storage.c`
- [IPC service](https://github.com/hyden18/zephyr/blob/main/subsys/ipc/ipc_service/ipc_service.c): `subsys/ipc/ipc_service/ipc_service.c`

### Storage

- [PSA protected storage API](https://github.com/hyden18/zephyr/blob/main/subsys/secure_storage/include/psa/protected_storage.h): `subsys/secure_storage/include/psa/protected_storage.h`
- [FIDO2 storage](https://github.com/hyden18/zephyr/blob/main/subsys/authentication/fido2/storage/fido2_storage.c): `subsys/authentication/fido2/storage/fido2_storage.c`

### Other components

- **Embedded application**

## Connections

- Embedded application → Zephyr RTOS: runs on
- Zephyr RTOS → Architecture ports: supports architectures
- Architecture ports → Board support: targets supported boards
- NVMe controller → NVMe command support: uses helpers (evidence: `drivers/disk/nvme/nvme_controller.c`)
- Media controller shell → Media proxy: calls controls (evidence: `subsys/bluetooth/audio/shell/media_controller.c`)
- LoRaWAN engine → LoRaWAN MAC: dispatches requests (evidence: `subsys/lorawan/native/engine.c`)
- LwM2M engine → LwM2M objects: uses object APIs (evidence: `subsys/net/lib/lwm2m/lwm2m_engine.c`)
- LwM2M engine → LwM2M encodings: uses encodings (evidence: `subsys/net/lib/lwm2m/lwm2m_engine.c`)
- MCTP I²C/GPIO → GPIO API: uses GPIO API (evidence: `subsys/pmci/mctp/mctp_i2c_gpio_controller.c`)
- MCTP I²C/GPIO → RTIO interface: submits transfers (evidence: `subsys/pmci/mctp/mctp_i2c_gpio_controller.c`)
