# zephyr4microchip/microchip-zephyr architecture

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

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

## Overview

Zephyr is a scalable, security-minded real-time operating system for resource-constrained devices. An embedded application uses kernel and architecture services to operate hardware through drivers; optional networking and management subsystems provide higher-level device capabilities. The graph emphasizes these runtime layers and documented examples of their interactions. Source excerpts are selective, so links between major subsystems are included only where the README or indexed source references support them; the many other drivers and architecture ports are represented at directory level.

Main entry points: [`kernel`](https://github.com/zephyr4microchip/microchip-zephyr/tree/main/kernel) (Kernel services), [`drivers/disk/nvme/nvme_controller.c`](https://github.com/zephyr4microchip/microchip-zephyr/blob/main/drivers/disk/nvme/nvme_controller.c) (NVMe controller), [`subsys/pmci/mctp/mctp_i2c_gpio_controller.c`](https://github.com/zephyr4microchip/microchip-zephyr/blob/main/subsys/pmci/mctp/mctp_i2c_gpio_controller.c) (MCTP I2C binding), [`subsys/net/lib/lwm2m/lwm2m_engine.c`](https://github.com/zephyr4microchip/microchip-zephyr/blob/main/subsys/net/lib/lwm2m/lwm2m_engine.c) (LwM2M engine)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_core["Kernel and architecture"]
  node_kernel["Kernel services"]
  node_userspace["Userspace handlers"]
  node_arch_ports["Architecture ports"]
end

subgraph group_hardware["Hardware drivers"]
  node_drivers["Device drivers"]
  node_npcx_i2c["NPCX I2C"]
  node_nvme["NVMe controller<br/>[nvme_controller.c]"]
  node_nvme_helpers["NVMe helpers<br/>[nvme_helpers.h]"]
  node_mctp_i2c["MCTP I2C binding"]
  node_rtio["RTIO interface<br/>[rtio.h]"]
end

subgraph group_network["Networking and Bluetooth"]
  node_lwm2m["LwM2M engine<br/>[lwm2m_engine.c]"]
  node_lwm2m_objects["LwM2M objects<br/>[lwm2m_object.h]"]
  node_media_shell["Media controller shell<br/>[media_controller.c]"]
  node_media_proxy["Media proxy"]
end

subgraph group_management["Device management"]
  node_updatehub["UpdateHub storage"]
  node_flash_boot["Flash and boot services"]
end

subgraph group_storage["Secure storage"]
  node_protected_storage["PSA protected storage API"]
end

node_application(("Embedded application"))

node_application -->|"uses services"| node_kernel
node_kernel -->|"runs across"| node_arch_ports
node_kernel -.->|"accesses hardware"| node_drivers
node_application -.->|"requests syscalls"| node_userspace
node_nvme -->|"uses helpers"| node_nvme_helpers
node_mctp_i2c -->|"submits transfers"| node_rtio
node_lwm2m -->|"uses object definitions"| node_lwm2m_objects
node_media_shell -->|"calls controls"| node_media_proxy
node_updatehub -->|"writes and confirms"| node_flash_boot

click node_kernel "https://github.com/zephyr4microchip/microchip-zephyr/tree/main/kernel"
click node_userspace "https://github.com/zephyr4microchip/microchip-zephyr/blob/main/kernel/userspace_handler.c"
click node_arch_ports "https://github.com/zephyr4microchip/microchip-zephyr/tree/main/arch"
click node_drivers "https://github.com/zephyr4microchip/microchip-zephyr/tree/main/drivers"
click node_npcx_i2c "https://github.com/zephyr4microchip/microchip-zephyr/blob/main/drivers/i2c/i2c_npcx_controller.c"
click node_nvme "https://github.com/zephyr4microchip/microchip-zephyr/blob/main/drivers/disk/nvme/nvme_controller.c"
click node_nvme_helpers "https://github.com/zephyr4microchip/microchip-zephyr/blob/main/drivers/disk/nvme/nvme_helpers.h"
click node_mctp_i2c "https://github.com/zephyr4microchip/microchip-zephyr/blob/main/subsys/pmci/mctp/mctp_i2c_gpio_controller.c"
click node_rtio "https://github.com/zephyr4microchip/microchip-zephyr/blob/main/include/zephyr/rtio/rtio.h"
click node_lwm2m "https://github.com/zephyr4microchip/microchip-zephyr/blob/main/subsys/net/lib/lwm2m/lwm2m_engine.c"
click node_lwm2m_objects "https://github.com/zephyr4microchip/microchip-zephyr/blob/main/subsys/net/lib/lwm2m/lwm2m_object.h"
click node_media_shell "https://github.com/zephyr4microchip/microchip-zephyr/blob/main/subsys/bluetooth/audio/shell/media_controller.c"
click node_media_proxy "https://github.com/zephyr4microchip/microchip-zephyr/blob/main/subsys/bluetooth/audio/media_proxy_internal.h"
click node_updatehub "https://github.com/zephyr4microchip/microchip-zephyr/blob/main/subsys/mgmt/updatehub/updatehub_storage.c"
click node_flash_boot "https://github.com/zephyr4microchip/microchip-zephyr/blob/main/subsys/mgmt/updatehub/updatehub_storage.c"
click node_protected_storage "https://github.com/zephyr4microchip/microchip-zephyr/blob/main/subsys/secure_storage/include/psa/protected_storage.h"

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_kernel,node_userspace,node_arch_ports toneBlue
class node_drivers,node_npcx_i2c,node_nvme,node_nvme_helpers,node_mctp_i2c,node_rtio toneAmber
class node_lwm2m,node_lwm2m_objects,node_media_shell,node_media_proxy toneMint
class node_updatehub,node_flash_boot toneRose
class node_protected_storage,node_application toneIndigo
```

## Components

### Kernel and architecture

- [Kernel services](https://github.com/zephyr4microchip/microchip-zephyr/tree/main/kernel): `kernel`
- [Userspace handlers](https://github.com/zephyr4microchip/microchip-zephyr/blob/main/kernel/userspace_handler.c): `kernel/userspace_handler.c`
- [Architecture ports](https://github.com/zephyr4microchip/microchip-zephyr/tree/main/arch): `arch`

### Hardware drivers

- [Device drivers](https://github.com/zephyr4microchip/microchip-zephyr/tree/main/drivers): `drivers`
- [NPCX I2C](https://github.com/zephyr4microchip/microchip-zephyr/blob/main/drivers/i2c/i2c_npcx_controller.c): `drivers/i2c/i2c_npcx_controller.c`
- [NVMe controller](https://github.com/zephyr4microchip/microchip-zephyr/blob/main/drivers/disk/nvme/nvme_controller.c): `drivers/disk/nvme/nvme_controller.c`
- [NVMe helpers](https://github.com/zephyr4microchip/microchip-zephyr/blob/main/drivers/disk/nvme/nvme_helpers.h): `drivers/disk/nvme/nvme_helpers.h`
- [MCTP I2C binding](https://github.com/zephyr4microchip/microchip-zephyr/blob/main/subsys/pmci/mctp/mctp_i2c_gpio_controller.c): `subsys/pmci/mctp/mctp_i2c_gpio_controller.c`
- [RTIO interface](https://github.com/zephyr4microchip/microchip-zephyr/blob/main/include/zephyr/rtio/rtio.h): `include/zephyr/rtio/rtio.h`

### Networking and Bluetooth

- [LwM2M engine](https://github.com/zephyr4microchip/microchip-zephyr/blob/main/subsys/net/lib/lwm2m/lwm2m_engine.c): `subsys/net/lib/lwm2m/lwm2m_engine.c`
- [LwM2M objects](https://github.com/zephyr4microchip/microchip-zephyr/blob/main/subsys/net/lib/lwm2m/lwm2m_object.h): `subsys/net/lib/lwm2m/lwm2m_object.h`
- [Media controller shell](https://github.com/zephyr4microchip/microchip-zephyr/blob/main/subsys/bluetooth/audio/shell/media_controller.c): `subsys/bluetooth/audio/shell/media_controller.c`
- [Media proxy](https://github.com/zephyr4microchip/microchip-zephyr/blob/main/subsys/bluetooth/audio/media_proxy_internal.h): `subsys/bluetooth/audio/media_proxy_internal.h`

### Device management

- [UpdateHub storage](https://github.com/zephyr4microchip/microchip-zephyr/blob/main/subsys/mgmt/updatehub/updatehub_storage.c): `subsys/mgmt/updatehub/updatehub_storage.c`
- [Flash and boot services](https://github.com/zephyr4microchip/microchip-zephyr/blob/main/subsys/mgmt/updatehub/updatehub_storage.c): `subsys/mgmt/updatehub/updatehub_storage.c`

### Secure storage

- [PSA protected storage API](https://github.com/zephyr4microchip/microchip-zephyr/blob/main/subsys/secure_storage/include/psa/protected_storage.h): `subsys/secure_storage/include/psa/protected_storage.h`

### Other components

- **Embedded application**

## Connections

- Embedded application → Kernel services: uses services
- Kernel services → Architecture ports: runs across
- Kernel services → Device drivers: accesses hardware
- Embedded application → Userspace handlers: requests syscalls
- NVMe controller → NVMe helpers: uses helpers (evidence: `drivers/disk/nvme/nvme_controller.c`)
- MCTP I2C binding → RTIO interface: submits transfers (evidence: `subsys/pmci/mctp/mctp_i2c_gpio_controller.c`)
- LwM2M engine → LwM2M objects: uses object definitions (evidence: `subsys/net/lib/lwm2m/lwm2m_engine.c`)
- Media controller shell → Media proxy: calls controls (evidence: `subsys/bluetooth/audio/shell/media_controller.c`)
- UpdateHub storage → Flash and boot services: writes and confirms (evidence: `subsys/mgmt/updatehub/updatehub_storage.c`)
