Architecture

Architectural separation

The documentation follows the intended project separation:

user_code_0.h

Common application infrastructure, service functions, communication helpers, software protocols, flash handling, dialog processing, and shared state.

user_code_2.h

Common application execution scenario embedded into main(): startup, discovery, initialization, polling sequence, accumulation, and timing logic.

platform.h

Platform binding layer. Hardware-dependent constants, pin mappings, macro bindings, enabled interfaces, flash layout parameters, and RTC selection should be localized here.

main.c

STM32CubeMX-generated startup and peripheral initialization file. The preferred design is to keep it as close as possible to generated code and to insert only the minimal includes needed for project logic integration.

Documentation reading order

Recommended order for a new developer:

  1. Read Project overview

  2. Read Current version

  3. Read APP branch

  4. Read Cross-platform support

  5. Read Platform matrix

  6. Use the API/reference pages for exact symbols and implementation details

Design intention

The documentation is structured to make the following modification paths clear:

  • changing common application behavior without changing platform bindings;

  • adding or adjusting a platform by editing platform.h while keeping shared logic intact;

  • analyzing CubeMX-generated startup files without confusing them with handwritten logic;

  • extending project history, templates, and branch structure without breaking navigation.