Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WebUSB DFU Flasher

Browser-based firmware flashing tool for STM32, AT32 and other DFU-compatible microcontrollers

🚀 Quick Start

Connect

  • Put your device in DFU mode: Hold button and power on (or short BOOT0=HIGH on PCB)
  • Connect Device: click "Connect to Device" and select DFU device from the dialog

Flash / Verify operation

  • Load Firmware: Select or drag & drop a firmware file (.bin, .dfu, .hex, .srec)
  • Configure Options:
    • For BIN files: specify flash start address (default: 0x08000000)
    • Enable/disable erase before flashing (leave enabled in most cases)
    • Enable/disable verification after flashing
  • Flash: Click "Flash" to start the programming process
  • Verify: Click "Verify Only" to check existing firmware without reprogramming

Upload operation

  • Open Upload Panel: Click "Upload from Device" button
  • Select Range:
    • Choose start sector from dropdown
    • Choose end sector from dropdown
    • Verify calculated size
  • Upload: Click "Upload" to read data from device
    • Data read sector-by-sector
    • Progress bar shows completion
    • Data loaded as 'Device Dump' image with format 'bin'
  • Save Dump: Click "Save as BIN" to export firmware
    • Choose file name and location
    • File saved with device address and size in name

📱 Supported Devices

  • STM32 (VID: 0x0483) — Full DfuSe extension support
  • AT32 (VID: 0x2E3C) — Artery microcontrollers
  • GD32 (VID: 0x28E9) — GigaDevice
  • ESP32-S2/S3 (VID: 0x303A) — Espressif

📁 File Formats

  • .bin — Raw binary (requires manual address)
  • .dfu — STMicroelectronics DfuSe format with CRC32
  • .hex — Intel HEX with extended addressing
  • .srec/.s19/.s28/.s37 - Motorola S-Record

⚙️ Core Operations

  • Flash (Write)
    • Intelligent sector-based erasure with automatic size detection
    • Progress tracking and multiple memory region support
    • Duplicate sector prevention for overlapping blocks
  • Verify (Read & Compare)
    • Post-flash byte-by-byte verification
    • Detailed mismatch reporting with first error location
  • Upload from Device (Read Back)
    • Extract firmware for backup or analysis
    • Sector-based range selection from device memory map
    • Save as BIN with custom path

💻 System Requirements

  • 🌐 Browser
    • Chrome 86+ (recommended)
    • Edge 86+
    • Opera 72+ (
    • Not supported: Firefox, Safari, Opera on Android
  • 🪟 Operating System
    • Windows: WinUSB driver required (install via Zadig)
    • Linux/macOS/Android: No additional drivers needed
  • 🛠️ Hardware
    • USB data cable (not charge-only)
    • Device in DFU bootloader mode
    • USB OTG adapter (for Android devices)

🔒 Security & Privacy

  • WebUSB requires explicit user permission for each connection
  • No persistent storage of device data or firmware
  • All operations in browser sandbox
  • HTTPS required for production (localhost allowed for development)

⚠️ Important Notes

  • Device must be in DFU bootloader mode (not application mode)
    STM32: Set BOOT0=HIGH, then reset/power cycle
  • Windows users: Install WinUSB driver via Zadig before first use
    • Download Zadig from zadig.akeo.ie
    • Run Zadig as Administrator
    • Options → List All Devices
    • Select your DFU device (e.g., STM32 or AT32 BOOTLOADER)
    • Choose "WinUSB" from dropdown
    • Click "Install Driver" or "Replace Driver"
    • If you see "Access denied" error — WinUSB driver is not installed

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages