# puranjaymohan/wee-os architecture

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

- Interactive diagram: https://gitdiagram.com/puranjaymohan/wee-os
- Repository: https://github.com/puranjaymohan/wee-os
- Video tour (about a minute): https://gitdiagram.com/puranjaymohan/wee-os/video

## Overview

WeeOs is a small Cortex-M3/M4 RTOS. An application uses the WeeOs API to create and manage tasks; the kernel provides scheduling, system-call, and mutex facilities, with startup and CMSIS support for four documented microcontroller targets. The excerpts do not show internal calls among kernel modules or the application, so those links are omitted; documented API usage is shown from the README.

Main entry points: [`src/App/main.c`](https://github.com/puranjaymohan/wee-os/blob/master/src/App/main.c) (Application entry), [`src/Kernel/Include/weeOs.h`](https://github.com/puranjaymohan/wee-os/blob/master/src/Kernel/Include/weeOs.h) (WeeOs API), [`src/Kernel/Src/weeOs.c`](https://github.com/puranjaymohan/wee-os/blob/master/src/Kernel/Src/weeOs.c) (Kernel core)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Application"]
  node_app_main["Application entry<br/>[main.c]"]
end

subgraph group_kernel["RTOS kernel"]
  node_api["WeeOs API<br/>[weeOs.h]"]
  node_kernel_core["Kernel core<br/>[weeOs.c]"]
  node_scheduler["Scheduler<br/>[sched.c]"]
  node_system_calls["System calls<br/>[system_call.c]"]
  node_mutex["Mutex<br/>[mutex.c]"]
  node_sched_api["Scheduler interface<br/>[sched.h]"]
  node_syscall_api["System-call interface<br/>[systemcall.h]"]
  node_mutex_api["Mutex interface<br/>[mutex.h]"]
end

subgraph group_platform["Hardware support"]
  node_stm32["STM32L476RG support"]
  node_tm4c["TM4C123 support"]
  node_lm3s["LM3S811 support"]
  node_mk64["MK64F12 support"]
end

node_user(("Application developer"))

node_user -->|"adds application"| node_app_main
node_app_main -->|"uses features"| node_api
node_api -.->|"exposes features"| node_kernel_core

click node_app_main "https://github.com/puranjaymohan/wee-os/blob/master/src/App/main.c"
click node_api "https://github.com/puranjaymohan/wee-os/blob/master/src/Kernel/Include/weeOs.h"
click node_kernel_core "https://github.com/puranjaymohan/wee-os/blob/master/src/Kernel/Src/weeOs.c"
click node_scheduler "https://github.com/puranjaymohan/wee-os/blob/master/src/Kernel/Src/sched.c"
click node_system_calls "https://github.com/puranjaymohan/wee-os/blob/master/src/Kernel/Src/system_call.c"
click node_mutex "https://github.com/puranjaymohan/wee-os/blob/master/src/Kernel/Src/mutex.c"
click node_sched_api "https://github.com/puranjaymohan/wee-os/blob/master/src/Kernel/Include/sched.h"
click node_syscall_api "https://github.com/puranjaymohan/wee-os/blob/master/src/Kernel/Include/systemcall.h"
click node_mutex_api "https://github.com/puranjaymohan/wee-os/blob/master/src/Kernel/Include/mutex.h"
click node_stm32 "https://github.com/puranjaymohan/wee-os/tree/master/device/stm32l476rg"
click node_tm4c "https://github.com/puranjaymohan/wee-os/tree/master/device/TM4C123GH6PM"
click node_lm3s "https://github.com/puranjaymohan/wee-os/tree/master/device/lm3s811"
click node_mk64 "https://github.com/puranjaymohan/wee-os/tree/master/device/MK64F12"

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_main toneBlue
class node_api,node_kernel_core,node_scheduler,node_system_calls,node_mutex,node_sched_api,node_syscall_api,node_mutex_api toneAmber
class node_stm32,node_tm4c,node_lm3s,node_mk64 toneMint
class node_user toneIndigo
```

## Components

### Application

- [Application entry](https://github.com/puranjaymohan/wee-os/blob/master/src/App/main.c): `src/App/main.c`

### RTOS kernel

- [WeeOs API](https://github.com/puranjaymohan/wee-os/blob/master/src/Kernel/Include/weeOs.h): `src/Kernel/Include/weeOs.h`
- [Kernel core](https://github.com/puranjaymohan/wee-os/blob/master/src/Kernel/Src/weeOs.c): `src/Kernel/Src/weeOs.c`
- [Scheduler](https://github.com/puranjaymohan/wee-os/blob/master/src/Kernel/Src/sched.c): `src/Kernel/Src/sched.c`
- [System calls](https://github.com/puranjaymohan/wee-os/blob/master/src/Kernel/Src/system_call.c): `src/Kernel/Src/system_call.c`
- [Mutex](https://github.com/puranjaymohan/wee-os/blob/master/src/Kernel/Src/mutex.c): `src/Kernel/Src/mutex.c`
- [Scheduler interface](https://github.com/puranjaymohan/wee-os/blob/master/src/Kernel/Include/sched.h): `src/Kernel/Include/sched.h`
- [System-call interface](https://github.com/puranjaymohan/wee-os/blob/master/src/Kernel/Include/systemcall.h): `src/Kernel/Include/systemcall.h`
- [Mutex interface](https://github.com/puranjaymohan/wee-os/blob/master/src/Kernel/Include/mutex.h): `src/Kernel/Include/mutex.h`

### Hardware support

- [STM32L476RG support](https://github.com/puranjaymohan/wee-os/tree/master/device/stm32l476rg): `device/stm32l476rg`
- [TM4C123 support](https://github.com/puranjaymohan/wee-os/tree/master/device/TM4C123GH6PM): `device/TM4C123GH6PM`
- [LM3S811 support](https://github.com/puranjaymohan/wee-os/tree/master/device/lm3s811): `device/lm3s811`
- [MK64F12 support](https://github.com/puranjaymohan/wee-os/tree/master/device/MK64F12): `device/MK64F12`

### Other components

- **Application developer**

## Connections

- Application developer → Application entry: adds application (evidence: `README.md`)
- Application entry → WeeOs API: uses features (evidence: `README.md`)
- WeeOs API → Kernel core: exposes features
