# eng-mahmoudayman/master-embedded-systems architecture

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

- Interactive diagram: https://gitdiagram.com/eng-mahmoudayman/master-embedded-systems
- Repository: https://github.com/eng-mahmoudayman/master-embedded-systems

## Overview

This repository is a collection of embedded-systems course exercises, not one integrated product. Its main workflows range from standalone C assignments and data-structure exercises to STM32 peripheral demos and a Cortex-M RTOS application. The graph highlights those distinct strands and the sampled driver, scheduler, and CMSIS layers. The README gives no feature overview, and many listed implementations were not sampled; unverified subsystem links are omitted.

Main entry points: [`Drivers/Src/main.c`](https://github.com/eng-mahmoudayman/master-embedded-systems/blob/main/Drivers/Src/main.c) (STM32 Demo), [`Unit4/Lesson2/main.c`](https://github.com/eng-mahmoudayman/master-embedded-systems/blob/main/Unit4/Lesson2/main.c) (State Machine Demo), [`ARM Assembly/CMSIS_V6/core_cm3.h`](https://github.com/eng-mahmoudayman/master-embedded-systems/blob/main/ARM%20Assembly/CMSIS_V6/core_cm3.h) (Cortex-M3 Core), [`ARM Assembly/Src/main.c`](https://github.com/eng-mahmoudayman/master-embedded-systems/blob/main/ARM%20Assembly/Src/main.c) (RTOS Application)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_lessons["C Lessons"]
  node_c_assignments["C Assignments"]
  node_register_demos["Register Demos"]
  node_uart_lesson["UART Lesson<br/>[App.c]"]
  node_state_main["State Machine Demo<br/>[main.c]"]
  node_us_sensor["Ultrasonic Sensor<br/>[US.c]"]
  node_control_algorithm["Control Algorithm<br/>[CA.c]"]
  node_dc_motor["DC Motor<br/>[DC_Motor.c]"]
end

subgraph group_structures["Data Structures"]
  node_fifo_exercise["FIFO Exercise<br/>[Fifo_Buffer.c]"]
  node_lifo_buffer["LIFO Buffer<br/>[LIFO_Buffer.c]"]
  node_student_list["Student List"]
  node_fifo_demo["FIFO Demo<br/>[main.c]"]
end

subgraph group_peripherals["STM32 Drivers"]
  node_stm32_demo["STM32 Demo<br/>[main.c]"]
  node_gpio_driver["GPIO Driver<br/>[GPIO_Stm32F103x8.c]"]
  node_exti_driver["EXTI Driver<br/>[EXTI_Stm32F103x8.c]"]
  node_uart_driver["UART Driver<br/>[UART_Stm32F103x8.c]"]
  node_spi_driver["SPI Driver<br/>[SPI_Stm32F103x8.c]"]
  node_rcc_driver["Clock Driver<br/>[RCC_Stm32F103x8.c]"]
  node_peripheral_defs["Peripheral Definitions<br/>[Stm32F103x8.h]"]
end

subgraph group_rtos["RTOS"]
  node_rtos_demo["RTOS Application<br/>[main.c]"]
  node_scheduler["Scheduler<br/>[Scheduler.c]"]
  node_scheduler_api["Scheduler API<br/>[Scheduler.h]"]
  node_rtos_fifo["RTOS FIFO<br/>[MY_RTOS_FIFO.c]"]
end

subgraph group_platform["CMSIS Platform"]
  node_cortex_core["Cortex-M3 Core<br/>[core_cm3.h]"]
  node_cmsis_compiler["CMSIS Compiler<br/>[cmsis_compiler.h]"]
  node_cmsis_version["CMSIS Version<br/>[cmsis_version.h]"]
  node_mpu_support["MPU Support<br/>[armv7m_mpu.h]"]
  node_gcc_support["GCC Support<br/>[cmsis_gcc_m.h]"]
end

node_learner(("Learner"))

node_learner -->|"completes exercises"| node_c_assignments
node_learner -->|"runs demos"| node_register_demos
node_learner -->|"runs demo"| node_fifo_demo
node_learner -->|"runs demo"| node_state_main
node_learner -->|"runs tests"| node_stm32_demo
node_learner -->|"runs application"| node_rtos_demo
node_fifo_demo -->|"uses buffer"| node_fifo_exercise
node_state_main -->|"calls state"| node_us_sensor
node_state_main -->|"calls state"| node_control_algorithm
node_state_main -->|"calls state"| node_dc_motor
node_stm32_demo -->|"calls"| node_gpio_driver
node_stm32_demo -->|"configures"| node_exti_driver
node_stm32_demo -->|"calls"| node_uart_driver
node_stm32_demo -->|"calls"| node_spi_driver
node_stm32_demo -->|"imports definitions"| node_peripheral_defs
node_rtos_demo -->|"invokes scheduler"| node_scheduler
node_scheduler -->|"uses API"| node_scheduler_api
node_scheduler -->|"uses FIFO"| node_rtos_fifo
node_scheduler_api -->|"includes interface"| node_rtos_fifo
node_rtos_demo -->|"imports core"| node_cortex_core
node_cortex_core -->|"imports"| node_cmsis_compiler
node_cortex_core -->|"imports"| node_cmsis_version
node_cortex_core -->|"imports"| node_mpu_support
node_cmsis_compiler -->|"includes"| node_gcc_support

click node_c_assignments "https://github.com/eng-mahmoudayman/master-embedded-systems/tree/main/Unit2"
click node_register_demos "https://github.com/eng-mahmoudayman/master-embedded-systems/tree/main/Unit3"
click node_uart_lesson "https://github.com/eng-mahmoudayman/master-embedded-systems/blob/main/Unit3/EmbeddedC_lesson2/App.c"
click node_fifo_exercise "https://github.com/eng-mahmoudayman/master-embedded-systems/blob/main/Unit4/FIFO/Fifo_Buffer.c"
click node_lifo_buffer "https://github.com/eng-mahmoudayman/master-embedded-systems/blob/main/Unit4/LIFO/src/LIFO_Buffer.c"
click node_student_list "https://github.com/eng-mahmoudayman/master-embedded-systems/blob/main/Unit4/LINKED_LIST/Linked_List_Students.c"
click node_fifo_demo "https://github.com/eng-mahmoudayman/master-embedded-systems/blob/main/Unit4/FIFO/main.c"
click node_state_main "https://github.com/eng-mahmoudayman/master-embedded-systems/blob/main/Unit4/Lesson2/main.c"
click node_us_sensor "https://github.com/eng-mahmoudayman/master-embedded-systems/blob/main/Unit4/Lesson2/US.c"
click node_control_algorithm "https://github.com/eng-mahmoudayman/master-embedded-systems/blob/main/Unit4/Lesson2/CA.c"
click node_dc_motor "https://github.com/eng-mahmoudayman/master-embedded-systems/blob/main/Unit4/Lesson2/DC_Motor.c"
click node_stm32_demo "https://github.com/eng-mahmoudayman/master-embedded-systems/blob/main/Drivers/Src/main.c"
click node_gpio_driver "https://github.com/eng-mahmoudayman/master-embedded-systems/blob/main/Drivers/MCAL_Stm32F103x8/GPIO_Stm32F103x8/GPIO_Stm32F103x8.c"
click node_exti_driver "https://github.com/eng-mahmoudayman/master-embedded-systems/blob/main/Drivers/MCAL_Stm32F103x8/EXTI_Stm32F103x8/EXTI_Stm32F103x8.c"
click node_uart_driver "https://github.com/eng-mahmoudayman/master-embedded-systems/blob/main/Drivers/MCAL_Stm32F103x8/UART_Stm32F103x8/UART_Stm32F103x8.c"
click node_spi_driver "https://github.com/eng-mahmoudayman/master-embedded-systems/blob/main/Drivers/MCAL_Stm32F103x8/SPI_Stm32F103x8/SPI_Stm32F103x8.c"
click node_rcc_driver "https://github.com/eng-mahmoudayman/master-embedded-systems/blob/main/Drivers/MCAL_Stm32F103x8/RCC_Stm32F103x8/RCC_Stm32F103x8.c"
click node_peripheral_defs "https://github.com/eng-mahmoudayman/master-embedded-systems/blob/main/Drivers/MCAL_Stm32F103x8/Inc/Stm32F103x8.h"
click node_rtos_demo "https://github.com/eng-mahmoudayman/master-embedded-systems/blob/main/ARM%20Assembly/Src/main.c"
click node_scheduler "https://github.com/eng-mahmoudayman/master-embedded-systems/blob/main/ARM%20Assembly/MY_RTOS/Scheduler.c"
click node_scheduler_api "https://github.com/eng-mahmoudayman/master-embedded-systems/blob/main/ARM%20Assembly/MY_RTOS/INC/Scheduler.h"
click node_rtos_fifo "https://github.com/eng-mahmoudayman/master-embedded-systems/blob/main/ARM%20Assembly/MY_RTOS/MY_RTOS_FIFO.c"
click node_cortex_core "https://github.com/eng-mahmoudayman/master-embedded-systems/blob/main/ARM%20Assembly/CMSIS_V6/core_cm3.h"
click node_cmsis_compiler "https://github.com/eng-mahmoudayman/master-embedded-systems/blob/main/ARM%20Assembly/CMSIS_V6/cmsis_compiler.h"
click node_cmsis_version "https://github.com/eng-mahmoudayman/master-embedded-systems/blob/main/ARM%20Assembly/CMSIS_V6/cmsis_version.h"
click node_mpu_support "https://github.com/eng-mahmoudayman/master-embedded-systems/blob/main/ARM%20Assembly/CMSIS_V6/m-profile/armv7m_mpu.h"
click node_gcc_support "https://github.com/eng-mahmoudayman/master-embedded-systems/blob/main/ARM%20Assembly/CMSIS_V6/m-profile/cmsis_gcc_m.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_c_assignments,node_register_demos,node_uart_lesson,node_state_main,node_us_sensor,node_control_algorithm,node_dc_motor toneBlue
class node_fifo_exercise,node_lifo_buffer,node_student_list,node_fifo_demo toneAmber
class node_stm32_demo,node_gpio_driver,node_exti_driver,node_uart_driver,node_spi_driver,node_rcc_driver,node_peripheral_defs toneMint
class node_rtos_demo,node_scheduler,node_scheduler_api,node_rtos_fifo toneRose
class node_cortex_core,node_cmsis_compiler,node_cmsis_version,node_mpu_support,node_gcc_support,node_learner toneIndigo
```

## Components

### C Lessons

- [C Assignments](https://github.com/eng-mahmoudayman/master-embedded-systems/tree/main/Unit2): `Unit2`
- [Register Demos](https://github.com/eng-mahmoudayman/master-embedded-systems/tree/main/Unit3): `Unit3`
- [UART Lesson](https://github.com/eng-mahmoudayman/master-embedded-systems/blob/main/Unit3/EmbeddedC_lesson2/App.c): `Unit3/EmbeddedC_lesson2/App.c`
- [State Machine Demo](https://github.com/eng-mahmoudayman/master-embedded-systems/blob/main/Unit4/Lesson2/main.c): `Unit4/Lesson2/main.c`
- [Ultrasonic Sensor](https://github.com/eng-mahmoudayman/master-embedded-systems/blob/main/Unit4/Lesson2/US.c): `Unit4/Lesson2/US.c`
- [Control Algorithm](https://github.com/eng-mahmoudayman/master-embedded-systems/blob/main/Unit4/Lesson2/CA.c): `Unit4/Lesson2/CA.c`
- [DC Motor](https://github.com/eng-mahmoudayman/master-embedded-systems/blob/main/Unit4/Lesson2/DC_Motor.c): `Unit4/Lesson2/DC_Motor.c`

### Data Structures

- [FIFO Exercise](https://github.com/eng-mahmoudayman/master-embedded-systems/blob/main/Unit4/FIFO/Fifo_Buffer.c): `Unit4/FIFO/Fifo_Buffer.c`
- [LIFO Buffer](https://github.com/eng-mahmoudayman/master-embedded-systems/blob/main/Unit4/LIFO/src/LIFO_Buffer.c): `Unit4/LIFO/src/LIFO_Buffer.c`
- [Student List](https://github.com/eng-mahmoudayman/master-embedded-systems/blob/main/Unit4/LINKED_LIST/Linked_List_Students.c): `Unit4/LINKED_LIST/Linked_List_Students.c`
- [FIFO Demo](https://github.com/eng-mahmoudayman/master-embedded-systems/blob/main/Unit4/FIFO/main.c): `Unit4/FIFO/main.c`

### STM32 Drivers

- [STM32 Demo](https://github.com/eng-mahmoudayman/master-embedded-systems/blob/main/Drivers/Src/main.c): `Drivers/Src/main.c`
- [GPIO Driver](https://github.com/eng-mahmoudayman/master-embedded-systems/blob/main/Drivers/MCAL_Stm32F103x8/GPIO_Stm32F103x8/GPIO_Stm32F103x8.c): `Drivers/MCAL_Stm32F103x8/GPIO_Stm32F103x8/GPIO_Stm32F103x8.c`
- [EXTI Driver](https://github.com/eng-mahmoudayman/master-embedded-systems/blob/main/Drivers/MCAL_Stm32F103x8/EXTI_Stm32F103x8/EXTI_Stm32F103x8.c): `Drivers/MCAL_Stm32F103x8/EXTI_Stm32F103x8/EXTI_Stm32F103x8.c`
- [UART Driver](https://github.com/eng-mahmoudayman/master-embedded-systems/blob/main/Drivers/MCAL_Stm32F103x8/UART_Stm32F103x8/UART_Stm32F103x8.c): `Drivers/MCAL_Stm32F103x8/UART_Stm32F103x8/UART_Stm32F103x8.c`
- [SPI Driver](https://github.com/eng-mahmoudayman/master-embedded-systems/blob/main/Drivers/MCAL_Stm32F103x8/SPI_Stm32F103x8/SPI_Stm32F103x8.c): `Drivers/MCAL_Stm32F103x8/SPI_Stm32F103x8/SPI_Stm32F103x8.c`
- [Clock Driver](https://github.com/eng-mahmoudayman/master-embedded-systems/blob/main/Drivers/MCAL_Stm32F103x8/RCC_Stm32F103x8/RCC_Stm32F103x8.c): `Drivers/MCAL_Stm32F103x8/RCC_Stm32F103x8/RCC_Stm32F103x8.c`
- [Peripheral Definitions](https://github.com/eng-mahmoudayman/master-embedded-systems/blob/main/Drivers/MCAL_Stm32F103x8/Inc/Stm32F103x8.h): `Drivers/MCAL_Stm32F103x8/Inc/Stm32F103x8.h`

### RTOS

- [RTOS Application](https://github.com/eng-mahmoudayman/master-embedded-systems/blob/main/ARM%20Assembly/Src/main.c): `ARM Assembly/Src/main.c`
- [Scheduler](https://github.com/eng-mahmoudayman/master-embedded-systems/blob/main/ARM%20Assembly/MY_RTOS/Scheduler.c): `ARM Assembly/MY_RTOS/Scheduler.c`
- [Scheduler API](https://github.com/eng-mahmoudayman/master-embedded-systems/blob/main/ARM%20Assembly/MY_RTOS/INC/Scheduler.h): `ARM Assembly/MY_RTOS/INC/Scheduler.h`
- [RTOS FIFO](https://github.com/eng-mahmoudayman/master-embedded-systems/blob/main/ARM%20Assembly/MY_RTOS/MY_RTOS_FIFO.c): `ARM Assembly/MY_RTOS/MY_RTOS_FIFO.c`

### CMSIS Platform

- [Cortex-M3 Core](https://github.com/eng-mahmoudayman/master-embedded-systems/blob/main/ARM%20Assembly/CMSIS_V6/core_cm3.h): `ARM Assembly/CMSIS_V6/core_cm3.h`
- [CMSIS Compiler](https://github.com/eng-mahmoudayman/master-embedded-systems/blob/main/ARM%20Assembly/CMSIS_V6/cmsis_compiler.h): `ARM Assembly/CMSIS_V6/cmsis_compiler.h`
- [CMSIS Version](https://github.com/eng-mahmoudayman/master-embedded-systems/blob/main/ARM%20Assembly/CMSIS_V6/cmsis_version.h): `ARM Assembly/CMSIS_V6/cmsis_version.h`
- [MPU Support](https://github.com/eng-mahmoudayman/master-embedded-systems/blob/main/ARM%20Assembly/CMSIS_V6/m-profile/armv7m_mpu.h): `ARM Assembly/CMSIS_V6/m-profile/armv7m_mpu.h`
- [GCC Support](https://github.com/eng-mahmoudayman/master-embedded-systems/blob/main/ARM%20Assembly/CMSIS_V6/m-profile/cmsis_gcc_m.h): `ARM Assembly/CMSIS_V6/m-profile/cmsis_gcc_m.h`

### Other components

- **Learner**

## Connections

- Learner → C Assignments: completes exercises
- Learner → Register Demos: runs demos
- Learner → FIFO Demo: runs demo
- Learner → State Machine Demo: runs demo
- Learner → STM32 Demo: runs tests
- Learner → RTOS Application: runs application
- FIFO Demo → FIFO Exercise: uses buffer (evidence: `Unit4/FIFO/main.c`)
- State Machine Demo → Ultrasonic Sensor: calls state (evidence: `Unit4/Lesson2/main.c`)
- State Machine Demo → Control Algorithm: calls state (evidence: `Unit4/Lesson2/main.c`)
- State Machine Demo → DC Motor: calls state (evidence: `Unit4/Lesson2/main.c`)
- STM32 Demo → GPIO Driver: calls (evidence: `Drivers/Src/main.c`)
- STM32 Demo → EXTI Driver: configures (evidence: `Drivers/Src/main.c`)
- STM32 Demo → UART Driver: calls (evidence: `Drivers/Src/main.c`)
- STM32 Demo → SPI Driver: calls (evidence: `Drivers/Src/main.c`)
- STM32 Demo → Peripheral Definitions: imports definitions (evidence: `Drivers/Src/main.c`)
- RTOS Application → Scheduler: invokes scheduler (evidence: `ARM Assembly/Src/main.c`)
- Scheduler → Scheduler API: uses API (evidence: `ARM Assembly/MY_RTOS/Scheduler.c`)
- Scheduler → RTOS FIFO: uses FIFO (evidence: `ARM Assembly/MY_RTOS/Scheduler.c`)
- Scheduler API → RTOS FIFO: includes interface
- RTOS Application → Cortex-M3 Core: imports core (evidence: `ARM Assembly/Src/main.c`)
- Cortex-M3 Core → CMSIS Compiler: imports (evidence: `ARM Assembly/CMSIS_V6/core_cm3.h`)
- Cortex-M3 Core → CMSIS Version: imports (evidence: `ARM Assembly/CMSIS_V6/core_cm3.h`)
- Cortex-M3 Core → MPU Support: imports (evidence: `ARM Assembly/CMSIS_V6/core_cm3.h`)
- CMSIS Compiler → GCC Support: includes (evidence: `ARM Assembly/CMSIS_V6/cmsis_compiler.h`)
