Skip to content

puppy-rtos/stm32-zboot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

62 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

stm32-zboot

Universal stm32 boot written using zig,Compatible with RT-Thread stm32-Bootloader.

Arch

Roadmap

M0: F4 series basic boot (rom < 8k)

  • Serial port log output
  • jump to app
  • chip-flash manage
  • flash partition abstraction layer(Compatible with FAL)
  • The whole package upgrade

M1: Normal boot (rom < 16k)

  • Support L4 series
  • Firmware crc check
  • Firmware decompression(fastlz)
  • Support spi nor flash
  • Basic zboot Tool

M2: More series boot (rom < 32k)

  • Support H7 series (no xip)
  • Support H7 series (XIP Flash)
  • Support differential upgrade
  • zboot Tool

How to build

zig build

Depends on zig-0.13.0

How to use zboot

Generate stm32-zboot.bin

  1. Run zboot boot to generate stm32-zboot.bin and config.json in the current directory.
  2. Edit config.json to adapt to your hardware.
  3. Run zboot boot again, and the stm32-zboot.bin will be generated by config.json.

Make app project

  1. Prepare a normal project for your hardware.
  2. Adjust the starting address of your project's ROM or linker script
  3. Adjust the interrupt vector address.
  4. Compile and download the project. After reset, zboot will automatically load this application.

Make upgrade file

  1. Configure the project to generate bin file.
  2. Run zboot rbl xxx.bin Vx.x to package the bin file as an upgrade file xxx.bin.rbl.

Upgrade app

  1. Transfer the xxx.bin.rbl file to swap partition in config.json (Support on-chip flash and SPIflash).
  2. Reset the system, then zboot will automatically complete the application upgrade.