# yacineamara/structuration_logiciel_embarquee architecture

> Architecture diagram of the GitHub repository yacineamara/structuration_logiciel_embarquee, 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/yacineamara/structuration_logiciel_embarquee
- Repository: https://github.com/yacineamara/structuration_logiciel_embarquee

## Overview

This repository is a small STM32F446 bare-metal firmware project. Its demonstrated workflow initializes the floating-point unit, GPIO, USART2, and SysTick, then repeatedly delays, toggles a GPIO output, and prints a message. The application delegates hardware setup and timing to peripheral modules; CMSIS supplies the device/core definitions and compiler- and MPU-specific support. The README gives no further product capabilities. Unsampled implementation details are represented only where the source index supports them.

Main entry points: [`Src/main.c`](https://github.com/yacineamara/structuration_logiciel_embarquee/blob/main/Src/main.c) (Startup and loop), [`Src/timer.c`](https://github.com/yacineamara/structuration_logiciel_embarquee/blob/main/Src/timer.c) (SysTick and DWT), [`Src/usart.c`](https://github.com/yacineamara/structuration_logiciel_embarquee/blob/main/Src/usart.c) (USART2 I/O), [`Drivers/CMSIS/Device/ST/STM32F4xx/Include/stm32f446xx.h`](https://github.com/yacineamara/structuration_logiciel_embarquee/blob/main/Drivers/CMSIS/Device/ST/STM32F4xx/Include/stm32f446xx.h) (STM32F446 definitions)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_application["Firmware application"]
  node_startup_loop["Startup and loop<br/>[main.c]"]
  node_utilities["FPU and scan setup<br/>[util.c]"]
  node_syscalls["System calls<br/>[syscalls.c]"]
  node_heap_memory["Heap memory<br/>[sysmem.c]"]
end

subgraph group_peripherals["Peripheral drivers"]
  node_gpio_driver["GPIO control<br/>[gpio.c]"]
  node_timer_driver["SysTick and DWT<br/>[timer.c]"]
  node_usart_driver["USART2 I/O<br/>[usart.c]"]
  node_interrupts["Interrupt handling<br/>[interrupt.c]"]
end

subgraph group_cmsis["CMSIS platform"]
  node_device_definitions["STM32F446 definitions<br/>[stm32f446xx.h]"]
  node_device_headers["STM32F4 device headers"]
  node_core_headers["Cortex-M core headers"]
  node_compiler_support["Compiler abstractions"]
  node_mpu_apis["MPU APIs"]
  node_cmsis_compiler_variants["Compiler header variants"]
end

node_firmware_runtime(("Firmware execution"))
node_mcu_hardware["STM32F446 MCU"]

node_firmware_runtime -->|"starts"| node_startup_loop
node_startup_loop -->|"initializes FPU"| node_utilities
node_startup_loop -->|"initializes GPIO"| node_gpio_driver
node_startup_loop -->|"initializes USART"| node_usart_driver
node_startup_loop -->|"initializes SysTick"| node_timer_driver
node_startup_loop -->|"requests delays"| node_timer_driver
node_startup_loop -->|"toggles pin"| node_mcu_hardware
node_gpio_driver -.->|"controls GPIO"| node_mcu_hardware
node_timer_driver -->|"uses registers"| node_device_definitions
node_interrupts -->|"uses registers"| node_device_definitions
node_usart_driver -.->|"uses USART"| node_mcu_hardware
node_utilities -->|"uses USART"| node_usart_driver
node_device_headers -.->|"includes device map"| node_device_definitions
node_core_headers -->|"uses abstractions"| node_compiler_support
node_core_headers -->|"uses MPU API"| node_mpu_apis
node_compiler_support -->|"selects compiler header"| node_cmsis_compiler_variants

click node_startup_loop "https://github.com/yacineamara/structuration_logiciel_embarquee/blob/main/Src/main.c"
click node_gpio_driver "https://github.com/yacineamara/structuration_logiciel_embarquee/blob/main/Src/gpio.c"
click node_timer_driver "https://github.com/yacineamara/structuration_logiciel_embarquee/blob/main/Src/timer.c"
click node_usart_driver "https://github.com/yacineamara/structuration_logiciel_embarquee/blob/main/Src/usart.c"
click node_utilities "https://github.com/yacineamara/structuration_logiciel_embarquee/blob/main/Src/util.c"
click node_interrupts "https://github.com/yacineamara/structuration_logiciel_embarquee/blob/main/Src/interrupt.c"
click node_syscalls "https://github.com/yacineamara/structuration_logiciel_embarquee/blob/main/Src/syscalls.c"
click node_heap_memory "https://github.com/yacineamara/structuration_logiciel_embarquee/blob/main/Src/sysmem.c"
click node_device_definitions "https://github.com/yacineamara/structuration_logiciel_embarquee/blob/main/Drivers/CMSIS/Device/ST/STM32F4xx/Include/stm32f446xx.h"
click node_device_headers "https://github.com/yacineamara/structuration_logiciel_embarquee/tree/main/Drivers/CMSIS/Device/ST/STM32F4xx/Include"
click node_core_headers "https://github.com/yacineamara/structuration_logiciel_embarquee/tree/main/Drivers/CMSIS/Include"
click node_compiler_support "https://github.com/yacineamara/structuration_logiciel_embarquee/tree/main/Drivers/CMSIS/Include"
click node_mpu_apis "https://github.com/yacineamara/structuration_logiciel_embarquee/tree/main/Drivers/CMSIS/Include"
click node_cmsis_compiler_variants "https://github.com/yacineamara/structuration_logiciel_embarquee/tree/main/Drivers/CMSIS/Include"

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_startup_loop,node_utilities,node_syscalls,node_heap_memory toneBlue
class node_gpio_driver,node_timer_driver,node_usart_driver,node_interrupts toneAmber
class node_device_definitions,node_device_headers,node_core_headers,node_compiler_support,node_mpu_apis,node_cmsis_compiler_variants toneMint
class node_firmware_runtime,node_mcu_hardware toneIndigo
```

## Components

### Firmware application

- [Startup and loop](https://github.com/yacineamara/structuration_logiciel_embarquee/blob/main/Src/main.c): `Src/main.c`
- [FPU and scan setup](https://github.com/yacineamara/structuration_logiciel_embarquee/blob/main/Src/util.c): `Src/util.c`
- [System calls](https://github.com/yacineamara/structuration_logiciel_embarquee/blob/main/Src/syscalls.c): `Src/syscalls.c`
- [Heap memory](https://github.com/yacineamara/structuration_logiciel_embarquee/blob/main/Src/sysmem.c): `Src/sysmem.c`

### Peripheral drivers

- [GPIO control](https://github.com/yacineamara/structuration_logiciel_embarquee/blob/main/Src/gpio.c): `Src/gpio.c`
- [SysTick and DWT](https://github.com/yacineamara/structuration_logiciel_embarquee/blob/main/Src/timer.c): `Src/timer.c`
- [USART2 I/O](https://github.com/yacineamara/structuration_logiciel_embarquee/blob/main/Src/usart.c): `Src/usart.c`
- [Interrupt handling](https://github.com/yacineamara/structuration_logiciel_embarquee/blob/main/Src/interrupt.c): `Src/interrupt.c`

### CMSIS platform

- [STM32F446 definitions](https://github.com/yacineamara/structuration_logiciel_embarquee/blob/main/Drivers/CMSIS/Device/ST/STM32F4xx/Include/stm32f446xx.h): `Drivers/CMSIS/Device/ST/STM32F4xx/Include/stm32f446xx.h`
- [STM32F4 device headers](https://github.com/yacineamara/structuration_logiciel_embarquee/tree/main/Drivers/CMSIS/Device/ST/STM32F4xx/Include): `Drivers/CMSIS/Device/ST/STM32F4xx/Include`
- [Cortex-M core headers](https://github.com/yacineamara/structuration_logiciel_embarquee/tree/main/Drivers/CMSIS/Include): `Drivers/CMSIS/Include`
- [Compiler abstractions](https://github.com/yacineamara/structuration_logiciel_embarquee/tree/main/Drivers/CMSIS/Include): `Drivers/CMSIS/Include`
- [MPU APIs](https://github.com/yacineamara/structuration_logiciel_embarquee/tree/main/Drivers/CMSIS/Include): `Drivers/CMSIS/Include`
- [Compiler header variants](https://github.com/yacineamara/structuration_logiciel_embarquee/tree/main/Drivers/CMSIS/Include): `Drivers/CMSIS/Include`

### Other components

- **Firmware execution**
- **STM32F446 MCU**

## Connections

- Firmware execution → Startup and loop: starts
- Startup and loop → FPU and scan setup: initializes FPU (evidence: `Src/main.c`)
- Startup and loop → GPIO control: initializes GPIO (evidence: `Src/main.c`)
- Startup and loop → USART2 I/O: initializes USART (evidence: `Src/main.c`)
- Startup and loop → SysTick and DWT: initializes SysTick (evidence: `Src/main.c`)
- Startup and loop → SysTick and DWT: requests delays (evidence: `Src/main.c`)
- Startup and loop → STM32F446 MCU: toggles pin (evidence: `Src/main.c`)
- GPIO control → STM32F446 MCU: controls GPIO
- SysTick and DWT → STM32F446 definitions: uses registers (evidence: `Src/timer.c`)
- Interrupt handling → STM32F446 definitions: uses registers (evidence: `Src/interrupt.c`)
- USART2 I/O → STM32F446 MCU: uses USART
- FPU and scan setup → USART2 I/O: uses USART (evidence: `Src/util.c`)
- STM32F4 device headers → STM32F446 definitions: includes device map
- Cortex-M core headers → Compiler abstractions: uses abstractions (evidence: `Drivers/CMSIS/Include/core_cm33.h`)
- Cortex-M core headers → MPU APIs: uses MPU API (evidence: `Drivers/CMSIS/Include/core_cm33.h`)
- Compiler abstractions → Compiler header variants: selects compiler header (evidence: `Drivers/CMSIS/Include/cmsis_compiler.h`)
