# gansinhoundethomas/stm32-docker architecture

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

- Interactive diagram: https://gitdiagram.com/gansinhoundethomas/stm32-docker
- Repository: https://github.com/gansinhoundethomas/stm32-docker

## Overview

This repository is a Docker reproduction template containing three STM32 firmware projects: a dummy counter demo, a UART-to-TTL project, and a pressure-project firmware with LED behavior. The clearest application workflow shown is the dummy firmware’s startup, USART6 initialization, and repeated counter output. The projects use STM32 HAL and CMSIS support. The UART-to-TTL loop is empty in the excerpt, and the README provides no further product behavior; relationships beyond visible calls and documented project names are therefore omitted.

Main entry points: [`ws/dummy_project/Drivers/STM32F2xx_HAL_Driver/Inc/stm32f2xx_hal.h`](https://github.com/gansinhoundethomas/stm32-docker/blob/main/ws/dummy_project/Drivers/STM32F2xx_HAL_Driver/Inc/stm32f2xx_hal.h) (STM32F2 HAL), [`ws/en.st-link-server_v2.1.1-2/src/BJ_Pression_custom_code/Core/Inc/stm32f4xx_hal_conf.h`](https://github.com/gansinhoundethomas/stm32-docker/blob/main/ws/en.st-link-server_v2.1.1-2/src/BJ_Pression_custom_code/Core/Inc/stm32f4xx_hal_conf.h) (STM32F4 HAL), [`ws/dummy_project/Core/Src/main.c`](https://github.com/gansinhoundethomas/stm32-docker/blob/main/ws/dummy_project/Core/Src/main.c) (Counter demo), [`ws/src/uart_to_external_ttl/Core/Src/main.c`](https://github.com/gansinhoundethomas/stm32-docker/blob/main/ws/src/uart_to_external_ttl/Core/Src/main.c) (UART-to-TTL app)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_firmware["Firmware projects"]
  node_dummy_app["Counter demo<br/>[main.c]"]
  node_ttl_app["UART-to-TTL app<br/>[main.c]"]
  node_pressure_app["Pressure firmware<br/>[main.c]"]
end

subgraph group_drivers["Peripheral drivers"]
  node_f2_hal["STM32F2 HAL<br/>[stm32f2xx_hal.h]"]
  node_f4_hal["STM32F4 HAL"]
end

subgraph group_device["Device support"]
  node_f2_device["STM32F2 device layer<br/>[stm32f2xx.h]"]
  node_f4_device["STM32F4 device layer<br/>[stm32f4xx.h]"]
end

node_dummy_app -->|"calls HAL"| node_f2_hal
node_ttl_app -->|"initializes UART"| node_f2_hal
node_pressure_app -->|"calls HAL"| node_f4_hal
node_f2_hal -->|"uses device definitions"| node_f2_device
node_f4_hal -.->|"configures device support"| node_f4_device

click node_dummy_app "https://github.com/gansinhoundethomas/stm32-docker/blob/main/ws/dummy_project/Core/Src/main.c"
click node_ttl_app "https://github.com/gansinhoundethomas/stm32-docker/blob/main/ws/src/uart_to_external_ttl/Core/Src/main.c"
click node_pressure_app "https://github.com/gansinhoundethomas/stm32-docker/blob/main/ws/en.st-link-server_v2.1.1-2/src/BJ_Pression_custom_code/Core/Src/main.c"
click node_f2_hal "https://github.com/gansinhoundethomas/stm32-docker/blob/main/ws/dummy_project/Drivers/STM32F2xx_HAL_Driver/Inc/stm32f2xx_hal.h"
click node_f4_hal "https://github.com/gansinhoundethomas/stm32-docker/blob/main/ws/en.st-link-server_v2.1.1-2/src/BJ_Pression_custom_code/Core/Inc/stm32f4xx_hal_conf.h"
click node_f2_device "https://github.com/gansinhoundethomas/stm32-docker/blob/main/ws/dummy_project/Drivers/CMSIS/Device/ST/STM32F2xx/Include/stm32f2xx.h"
click node_f4_device "https://github.com/gansinhoundethomas/stm32-docker/blob/main/ws/en.st-link-server_v2.1.1-2/src/BJ_Pression_custom_code/Drivers/CMSIS/Device/ST/STM32F4xx/Include/stm32f4xx.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_dummy_app,node_ttl_app,node_pressure_app toneBlue
class node_f2_hal,node_f4_hal toneAmber
class node_f2_device,node_f4_device toneMint
```

## Components

### Firmware projects

- [Counter demo](https://github.com/gansinhoundethomas/stm32-docker/blob/main/ws/dummy_project/Core/Src/main.c): `ws/dummy_project/Core/Src/main.c`
- [UART-to-TTL app](https://github.com/gansinhoundethomas/stm32-docker/blob/main/ws/src/uart_to_external_ttl/Core/Src/main.c): `ws/src/uart_to_external_ttl/Core/Src/main.c`
- [Pressure firmware](https://github.com/gansinhoundethomas/stm32-docker/blob/main/ws/en.st-link-server_v2.1.1-2/src/BJ_Pression_custom_code/Core/Src/main.c): `ws/en.st-link-server_v2.1.1-2/src/BJ_Pression_custom_code/Core/Src/main.c`

### Peripheral drivers

- [STM32F2 HAL](https://github.com/gansinhoundethomas/stm32-docker/blob/main/ws/dummy_project/Drivers/STM32F2xx_HAL_Driver/Inc/stm32f2xx_hal.h): `ws/dummy_project/Drivers/STM32F2xx_HAL_Driver/Inc/stm32f2xx_hal.h`
- [STM32F4 HAL](https://github.com/gansinhoundethomas/stm32-docker/blob/main/ws/en.st-link-server_v2.1.1-2/src/BJ_Pression_custom_code/Core/Inc/stm32f4xx_hal_conf.h): `ws/en.st-link-server_v2.1.1-2/src/BJ_Pression_custom_code/Core/Inc/stm32f4xx_hal_conf.h`

### Device support

- [STM32F2 device layer](https://github.com/gansinhoundethomas/stm32-docker/blob/main/ws/dummy_project/Drivers/CMSIS/Device/ST/STM32F2xx/Include/stm32f2xx.h): `ws/dummy_project/Drivers/CMSIS/Device/ST/STM32F2xx/Include/stm32f2xx.h`
- [STM32F4 device layer](https://github.com/gansinhoundethomas/stm32-docker/blob/main/ws/en.st-link-server_v2.1.1-2/src/BJ_Pression_custom_code/Drivers/CMSIS/Device/ST/STM32F4xx/Include/stm32f4xx.h): `ws/en.st-link-server_v2.1.1-2/src/BJ_Pression_custom_code/Drivers/CMSIS/Device/ST/STM32F4xx/Include/stm32f4xx.h`

## Connections

- Counter demo → STM32F2 HAL: calls HAL (evidence: `ws/dummy_project/Core/Src/main.c`)
- UART-to-TTL app → STM32F2 HAL: initializes UART (evidence: `ws/src/uart_to_external_ttl/Core/Src/main.c`)
- Pressure firmware → STM32F4 HAL: calls HAL (evidence: `ws/en.st-link-server_v2.1.1-2/src/BJ_Pression_custom_code/Core/Src/main.c`)
- STM32F2 HAL → STM32F2 device layer: uses device definitions (evidence: `ws/dummy_project/Drivers/STM32F2xx_HAL_Driver/Inc/stm32f2xx_hal.h`)
- STM32F4 HAL → STM32F4 device layer: configures device support
