Skip to content

task: Implement IAPL/Userapp structure for STM32 (MAX 6958 emulation) firmware#32

Merged
tuxuser merged 16 commits intomainfrom
task/stm32fw_preloader
Jan 9, 2026
Merged

task: Implement IAPL/Userapp structure for STM32 (MAX 6958 emulation) firmware#32
tuxuser merged 16 commits intomainfrom
task/stm32fw_preloader

Conversation

@tuxuser
Copy link
Contributor

@tuxuser tuxuser commented Jan 9, 2026

No description provided.

@tuxuser tuxuser requested a review from Copilot January 9, 2026 01:49
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR implements a dual-stage bootloader structure for STM32G031 firmware, dividing flash memory into two independent components: IAPL (In-App Preloader) and UAPP (User Application). The preloader validates and launches the user application, with both components containing tombstone metadata for version tracking and CRC validation.

Key changes:

  • Implemented IAPL/UAPP firmware architecture with tombstone metadata
  • Added CRC-based validation for both firmware components
  • Created shared bootloader functionality and build system
  • Removed old build configuration files and example code

Reviewed changes

Copilot reviewed 92 out of 1225 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
firmware/userapp/Core/Src/system_stm32g0xx.c Enabled vector table relocation and configured offset for user application
firmware/userapp/Core/Src/stm32g0xx_hal_msp.c Added CRC peripheral initialization functions
firmware/userapp/Core/Src/slave.c Refactored function names to use consistent naming convention
firmware/userapp/Core/Src/postcodes.c New file implementing POST code reading and segment name resolution
firmware/userapp/Core/Src/main.c Added tombstone structure, CRC initialization, and updated includes
firmware/userapp/Core/Src/display.c New display driver with u8g2 library integration and firmware version display
firmware/userapp/Core/Src/button.c New button handling implementation
firmware/userapp/Core/Inc/stm32g0xx_hal_conf.h Enabled CRC module
firmware/userapp/Core/Inc/slave.h New header defining slave I2C interface
firmware/userapp/Core/Inc/postcodes.h New header defining POST code enums and functions
firmware/userapp/Core/Inc/main.h Added stdbool.h include
firmware/userapp/Core/Inc/display.h New header defining display interface
firmware/userapp/Core/Inc/button.h New header defining button interface
firmware/scripts/fix_size_crc.py Python script to patch tombstone size/CRC fields in binaries
firmware/preloader/startup.s Assembly startup code for preloader
firmware/preloader/src/main.c Preloader main implementing validation and jump logic
firmware/preloader/linker.ld Linker script for preloader with tombstone section
firmware/preloader/include/gpio.h GPIO configuration enums for preloader
firmware/preloader/Makefile Build configuration for preloader
firmware/common/linker_common.ld Shared memory layout definitions
firmware/common/bootloader.h Shared bootloader interface and tombstone structure
firmware/common/bootloader.c Bootloader validation and jump implementation
firmware/Makefile Top-level build orchestration for both components
firmware/README.md Updated documentation explaining firmware architecture

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@tuxuser tuxuser merged commit 424a31f into main Jan 9, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants