Skip to content

Host-driven firmware update system for STM32 via Linux kernel module and USB, with a Python progress monitor.

Notifications You must be signed in to change notification settings

AmeenDurani/usb-ota-engine

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

Embedded Bootloader & Secure Firmware Updates (STM32)

Overview

A secure and robust STM32 bootloader with A/B firmware slots, rollback support, CRC-based integrity checks, and manifest-driven OTA updates.
Designed to ensure firmware integrity and authenticity, making it ideal for IoT devices, robotics, and embedded systems.


Features

  • A/B Firmware Slots & Rollback: Safe firmware storage with automatic rollback on failure.
  • CRC Integrity Checks: Verifies firmware data before boot.
  • Digital Signature Verification: Ensures firmware authenticity with SHA-256 hashes and asymmetric cryptography.
  • Manifest-Driven OTA Updates: Supports versioned, resumable, and secure updates.
  • Memory & Vector Table Management: Safely separates bootloader and main application memory regions.
  • Resumable Updates: Handles interrupted transfers or power loss gracefully.

System Architecture

PC Build:

  • firmware.bin → hash (SHA-256) → sign (private key)
  • manifest.json
  • Upload to AWS

Device Runtime:

  • Python app downloads manifest + firmware → stores them
  • Trigger a device reset

Bootloader:

  • Check reset reason
  • Verify firmware integrity (CRC)
  • Hash firmware & verify signature
  • Boot main application if valid
image

STM32F4xx Flash Organization

image

Future Work

  • Zephyr OS support for extended firmware platforms.
  • Network-based OTA via Wi-Fi or BLE.
  • Cryptographic co-processor integration for faster signature verification.

About

Host-driven firmware update system for STM32 via Linux kernel module and USB, with a Python progress monitor.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages