# janieblas/stm32f446e_whitout_stm32cubeide architecture

> Architecture diagram of the GitHub repository janieblas/stm32f446e_whitout_stm32cubeide, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-03-29). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/janieblas/stm32f446e_whitout_stm32cubeide
- Repository: https://github.com/janieblas/stm32f446e_whitout_stm32cubeide

## Overview

##### Main components
- Hardware & Development Environment: Include the STM32F446RE board; note that developers use WSL/Ubuntu running VS Code and the ARM Toolchain (e.g., ARM GCC).
- Boot & Startup: The startup code and linker scripts (across multiple experiments, e.g., in “e001_bare_metal”, “e002_add_cmsis”, etc.).
- Software Framework Layers:
– Low-level Hardware Abstraction: CMSIS components (found in directories named “CMSIS” across several experiments).
– HAL Drivers Layer: Provided for advanced peripheral initialization (as in “e006_hal_driver” and “e007_add_timebase_tim”).
– Application Code: The “main.c” files that implement the core application logic for each example.
- Debug/Utilities: Dedicated examples, such as the “e003_debugger” project, that integrate debugging configurations (like VS Code launch configurations).

##### Establish relationships and interactions
- That the HAL or CMSIS layers are “stacked”: the startup initializes the microcontroller and then hands off execution to main, which calls into the CMSIS routines and HAL driver functions to interface with hardware.

##### Architectural patterns and design principles
- Layered Abstraction: Clearly outline that hardware registers or the microcontroller’s low-level settings are abstracted by CMSIS and HAL libraries. This separation simplifies the development and testing processes.
- Build Abstraction: Note how using both Makefiles and CMake scripts provides alternative paths for building the firmware. Represent these in a “Build Tools” section.
- Reusability: Since many projects share common code (for example, the same CMSIS headers and startup routines), you might indicate a shared “Library” or “Driver” block that is re-used across examples.

##### Relevant technologies and frameworks
- ARM Toolchain (arm-none-eabi) – as the compiler and linker.
- CMSIS Core and Device Libraries.
- STM32F4 HAL drivers.
- Build tools: Make and CMake.
- Development environment: WSL (running Ubuntu) + VSCode.
- Hardware: STM32F446RE board.

- Clear labels for each component (e.g., “Development Environment”, “Startup Code”, “CMSIS Core”, “HAL Drivers”, “Application”, “Build System”).
– From development environment → build system.
– From build system → various layers (startup, CMSIS, HAL, application).
– Finally from compiled firmware → STM32F446RE board.

Happy diagramming!

## Diagram (Mermaid)

```mermaid
flowchart TD
    A("Development Environment"):::dev
    B("Makefile Build Tools"):::build
    C("CMake Build Tools"):::build
    D("Boot & Startup (startup & linker)"):::firmware
    E("CMSIS Layer"):::firmware
    F("HAL Drivers Layer"):::firmware
    G("Application Code"):::firmware
    H("Debug/Utilities"):::debug
    I("Firmware Image (blink.elf)"):::final
    J("STM32F446RE Board"):::board

    A --> B
    A --> C
    B --> D
    B --> E
    B --> F
    B --> G
    B --> H
    C --> D
    C --> E
    C --> F
    C --> G
    C --> H
    D --> I
    E --> I
    F --> I
    G --> I
    H --> I
    I --> J

    click A "https://github.com/janieblas/stm32f446e_whitout_stm32cubeide/blob/main/000_SETUP_ENVIRONMENT/README.md"
    click B "https://github.com/janieblas/stm32f446e_whitout_stm32cubeide/tree/main/e001_bare_metal/Makefile"
    click C "https://github.com/janieblas/stm32f446e_whitout_stm32cubeide/blob/main/e002_cmsis_cmake/CMakeLists.txt"
    click D "https://github.com/janieblas/stm32f446e_whitout_stm32cubeide/blob/main/e001_bare_metal/startup.c"
    click E "https://github.com/janieblas/stm32f446e_whitout_stm32cubeide/tree/main/e002_add_cmsis/CMSIS"
    click F "https://github.com/janieblas/stm32f446e_whitout_stm32cubeide/tree/main/e006_hal_driver/Drivers/stm32f4xx_hal_driver"
    click G "https://github.com/janieblas/stm32f446e_whitout_stm32cubeide/blob/main/e001_bare_metal/main.c"
    click H "https://github.com/janieblas/stm32f446e_whitout_stm32cubeide/blob/main/e003_debugger/.vscode"

    classDef dev fill:#AED6F1,stroke:#1B4F72,stroke-width:2px;
    classDef build fill:#A9DFBF,stroke:#196F3D,stroke-width:2px;
    classDef firmware fill:#F9E79F,stroke:#B7950B,stroke-width:2px;
    classDef debug fill:#F5B7B1,stroke:#943126,stroke-width:2px;
    classDef final fill:#D7BDE2,stroke:#6C3483,stroke-width:2px;
    classDef board fill:#D5DBDB,stroke:#566573,stroke-width:2px;
```
