# kyungjae-lee/freertos-projects architecture

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

- Interactive diagram: https://gitdiagram.com/kyungjae-lee/freertos-projects
- Repository: https://github.com/kyungjae-lee/freertos-projects

## Overview

This repository is a set of STM32F4/FreeRTOS learning projects, not one deployed application. The examples progress from basic task creation to timing, notifications, ISR interaction, priority and idle-hook behavior, then queues and software timers. Application entry points configure the board and start the scheduler; FreeRTOS supplies task and synchronization services, while the STM32 HAL exposes peripheral access. SEGGER SystemView supports realtime recording. Source excerpts are partial, so links between individual example handlers and kernel services are shown only where supported by the index or excerpts.

Main entry points: [`Workspace/01_Tasks/ThirdParty/FreeRTOS/tasks.c`](https://github.com/kyungjae-lee/freertos-projects/blob/main/Workspace/01_Tasks/ThirdParty/FreeRTOS/tasks.c) (Task scheduler), [`Workspace/09_Queues_and_Timers/Core/Src/main.c`](https://github.com/kyungjae-lee/freertos-projects/blob/main/Workspace/09_Queues_and_Timers/Core/Src/main.c) (Queues and timers), [`Workspace/Common/ThirdParty/FreeRTOS/include/task.h`](https://github.com/kyungjae-lee/freertos-projects/blob/main/Workspace/Common/ThirdParty/FreeRTOS/include/task.h) (Task API), [`Workspace/01_Tasks/Core/Src/main.c`](https://github.com/kyungjae-lee/freertos-projects/blob/main/Workspace/01_Tasks/Core/Src/main.c) (Task basics)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_examples["Learning projects"]
  node_basic["Task basics<br/>[main.c]"]
  node_ledtasks["LED tasks<br/>[main.c]"]
  node_delay["Delayed tasks<br/>[main.c]"]
  node_periodic["Periodic tasks<br/>[main.c]"]
  node_notify["Notifications<br/>[main.c]"]
  node_button["Button ISR<br/>[main.c]"]
  node_priority["Task priority<br/>[main.c]"]
  node_idle["Idle hook<br/>[main.c]"]
  node_queues["Queues and timers<br/>[main.c]"]
  node_handlers["Task handlers<br/>[task_handler.c]"]
end

subgraph group_kernel["FreeRTOS runtime"]
  node_tasks["Task scheduler<br/>[tasks.c]"]
  node_taskapi["Task API<br/>[task.h]"]
  node_queueapi["Queue API<br/>[queue.h]"]
  node_timerapi["Timer API<br/>[timers.h]"]
end

subgraph group_hardware["STM32 hardware"]
  node_hal["STM32 HAL<br/>[stm32f4xx_hal.h]"]
end

subgraph group_observability["Realtime analysis"]
  node_sysview["SystemView<br/>[SEGGER_SYSVIEW.c]"]
end

node_basic -->|"starts scheduler"| node_tasks
node_ledtasks -->|"starts scheduler"| node_tasks
node_delay -->|"uses task API"| node_tasks
node_periodic -->|"starts scheduler"| node_tasks
node_notify -->|"uses notifications"| node_tasks
node_button -->|"uses task API"| node_tasks
node_priority -->|"starts scheduler"| node_tasks
node_idle -->|"starts scheduler"| node_tasks
node_queues -->|"starts scheduler"| node_tasks
node_queues -->|"initializes peripherals"| node_hal
node_tasks -->|"implements API"| node_taskapi
node_queueapi -->|"references task API"| node_taskapi
node_timerapi -->|"references task API"| node_taskapi
node_queues -.->|"delegates tasks"| node_handlers
node_tasks -.->|"supports recording"| node_sysview

click node_basic "https://github.com/kyungjae-lee/freertos-projects/blob/main/Workspace/01_Tasks/Core/Src/main.c"
click node_ledtasks "https://github.com/kyungjae-lee/freertos-projects/blob/main/Workspace/02_LED_Tasks/Core/Src/main.c"
click node_delay "https://github.com/kyungjae-lee/freertos-projects/blob/main/Workspace/03_LED_Tasks_Delay/Core/Src/main.c"
click node_periodic "https://github.com/kyungjae-lee/freertos-projects/blob/main/Workspace/04_LED_Tasks_Periodic/Core/Src/main.c"
click node_notify "https://github.com/kyungjae-lee/freertos-projects/blob/main/Workspace/05_LED_Tasks_Notification_Deletion/Core/Src/main.c"
click node_button "https://github.com/kyungjae-lee/freertos-projects/blob/main/Workspace/06_LED_Button_ISR/Core/Src/main.c"
click node_priority "https://github.com/kyungjae-lee/freertos-projects/blob/main/Workspace/07_LED_Task_Priority/Core/Src/main.c"
click node_idle "https://github.com/kyungjae-lee/freertos-projects/blob/main/Workspace/08_Idle_Hook/Core/Src/main.c"
click node_queues "https://github.com/kyungjae-lee/freertos-projects/blob/main/Workspace/09_Queues_and_Timers/Core/Src/main.c"
click node_handlers "https://github.com/kyungjae-lee/freertos-projects/blob/main/Workspace/09_Queues_and_Timers/Core/Src/task_handler.c"
click node_tasks "https://github.com/kyungjae-lee/freertos-projects/blob/main/Workspace/01_Tasks/ThirdParty/FreeRTOS/tasks.c"
click node_taskapi "https://github.com/kyungjae-lee/freertos-projects/blob/main/Workspace/Common/ThirdParty/FreeRTOS/include/task.h"
click node_queueapi "https://github.com/kyungjae-lee/freertos-projects/blob/main/Workspace/Common/ThirdParty/FreeRTOS/include/queue.h"
click node_timerapi "https://github.com/kyungjae-lee/freertos-projects/blob/main/Workspace/Common/ThirdParty/FreeRTOS/include/timers.h"
click node_hal "https://github.com/kyungjae-lee/freertos-projects/blob/main/Workspace/01_Tasks/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal.h"
click node_sysview "https://github.com/kyungjae-lee/freertos-projects/blob/main/Workspace/Common/ThirdParty/SEGGER/SEGGER/SEGGER_SYSVIEW.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_basic,node_ledtasks,node_delay,node_periodic,node_notify,node_button,node_priority,node_idle,node_queues,node_handlers toneBlue
class node_tasks,node_taskapi,node_queueapi,node_timerapi toneAmber
class node_hal toneMint
class node_sysview toneRose
```

## Components

### Learning projects

- [Task basics](https://github.com/kyungjae-lee/freertos-projects/blob/main/Workspace/01_Tasks/Core/Src/main.c): `Workspace/01_Tasks/Core/Src/main.c`
- [LED tasks](https://github.com/kyungjae-lee/freertos-projects/blob/main/Workspace/02_LED_Tasks/Core/Src/main.c): `Workspace/02_LED_Tasks/Core/Src/main.c`
- [Delayed tasks](https://github.com/kyungjae-lee/freertos-projects/blob/main/Workspace/03_LED_Tasks_Delay/Core/Src/main.c): `Workspace/03_LED_Tasks_Delay/Core/Src/main.c`
- [Periodic tasks](https://github.com/kyungjae-lee/freertos-projects/blob/main/Workspace/04_LED_Tasks_Periodic/Core/Src/main.c): `Workspace/04_LED_Tasks_Periodic/Core/Src/main.c`
- [Notifications](https://github.com/kyungjae-lee/freertos-projects/blob/main/Workspace/05_LED_Tasks_Notification_Deletion/Core/Src/main.c): `Workspace/05_LED_Tasks_Notification_Deletion/Core/Src/main.c`
- [Button ISR](https://github.com/kyungjae-lee/freertos-projects/blob/main/Workspace/06_LED_Button_ISR/Core/Src/main.c): `Workspace/06_LED_Button_ISR/Core/Src/main.c`
- [Task priority](https://github.com/kyungjae-lee/freertos-projects/blob/main/Workspace/07_LED_Task_Priority/Core/Src/main.c): `Workspace/07_LED_Task_Priority/Core/Src/main.c`
- [Idle hook](https://github.com/kyungjae-lee/freertos-projects/blob/main/Workspace/08_Idle_Hook/Core/Src/main.c): `Workspace/08_Idle_Hook/Core/Src/main.c`
- [Queues and timers](https://github.com/kyungjae-lee/freertos-projects/blob/main/Workspace/09_Queues_and_Timers/Core/Src/main.c): `Workspace/09_Queues_and_Timers/Core/Src/main.c`
- [Task handlers](https://github.com/kyungjae-lee/freertos-projects/blob/main/Workspace/09_Queues_and_Timers/Core/Src/task_handler.c): `Workspace/09_Queues_and_Timers/Core/Src/task_handler.c`

### FreeRTOS runtime

- [Task scheduler](https://github.com/kyungjae-lee/freertos-projects/blob/main/Workspace/01_Tasks/ThirdParty/FreeRTOS/tasks.c): `Workspace/01_Tasks/ThirdParty/FreeRTOS/tasks.c`
- [Task API](https://github.com/kyungjae-lee/freertos-projects/blob/main/Workspace/Common/ThirdParty/FreeRTOS/include/task.h): `Workspace/Common/ThirdParty/FreeRTOS/include/task.h`
- [Queue API](https://github.com/kyungjae-lee/freertos-projects/blob/main/Workspace/Common/ThirdParty/FreeRTOS/include/queue.h): `Workspace/Common/ThirdParty/FreeRTOS/include/queue.h`
- [Timer API](https://github.com/kyungjae-lee/freertos-projects/blob/main/Workspace/Common/ThirdParty/FreeRTOS/include/timers.h): `Workspace/Common/ThirdParty/FreeRTOS/include/timers.h`

### STM32 hardware

- [STM32 HAL](https://github.com/kyungjae-lee/freertos-projects/blob/main/Workspace/01_Tasks/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal.h): `Workspace/01_Tasks/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal.h`

### Realtime analysis

- [SystemView](https://github.com/kyungjae-lee/freertos-projects/blob/main/Workspace/Common/ThirdParty/SEGGER/SEGGER/SEGGER_SYSVIEW.c): `Workspace/Common/ThirdParty/SEGGER/SEGGER/SEGGER_SYSVIEW.c`

## Connections

- Task basics → Task scheduler: starts scheduler (evidence: `Workspace/01_Tasks/Core/Src/main.c`)
- LED tasks → Task scheduler: starts scheduler (evidence: `Workspace/02_LED_Tasks/Core/Src/main.c`)
- Delayed tasks → Task scheduler: uses task API (evidence: `Workspace/03_LED_Tasks_Delay/Core/Src/main.c`)
- Periodic tasks → Task scheduler: starts scheduler (evidence: `Workspace/04_LED_Tasks_Periodic/Core/Src/main.c`)
- Notifications → Task scheduler: uses notifications (evidence: `Workspace/05_LED_Tasks_Notification_Deletion/Core/Src/main.c`)
- Button ISR → Task scheduler: uses task API (evidence: `Workspace/06_LED_Button_ISR/Core/Src/main.c`)
- Task priority → Task scheduler: starts scheduler (evidence: `Workspace/07_LED_Task_Priority/Core/Src/main.c`)
- Idle hook → Task scheduler: starts scheduler (evidence: `Workspace/08_Idle_Hook/Core/Src/main.c`)
- Queues and timers → Task scheduler: starts scheduler (evidence: `Workspace/09_Queues_and_Timers/Core/Src/main.c`)
- Queues and timers → STM32 HAL: initializes peripherals (evidence: `Workspace/09_Queues_and_Timers/Core/Src/main.c`)
- Task scheduler → Task API: implements API (evidence: `Workspace/01_Tasks/ThirdParty/FreeRTOS/tasks.c`)
- Queue API → Task API: references task API (evidence: `Workspace/Common/ThirdParty/FreeRTOS/include/queue.h`)
- Timer API → Task API: references task API (evidence: `Workspace/Common/ThirdParty/FreeRTOS/include/timers.h`)
- Queues and timers → Task handlers: delegates tasks
- Task scheduler → SystemView: supports recording
