STM32 Bootloader: Upgrade Firmware from Web Browser via USB
What you'll learn
- Develop an HTML-based firmware updater
- Protect firmware update files from hacking
- Build a custom communication protocol
- Add CRC-32 checksums for data integrity
- Perform erase, read and write operations
- Configure and use USB CDC on STM32F103
Requirements
- You need to have significant STM32 development experience using HAL with STM32CubeIDE on Windows
- You need basic HTML/JavaScript experience or willingness to learn independently
- Required Hardware: STM32 Blue Pill board with authentic STM32F103C8T6 microcontroller (no clones)
- STLink v2 or other debugger
- System Requirements: Windows 10/11 with Microsoft Edge browser
Description
Note: This course currently only supports the STM32F1 series (Blue Pill boards with STM32F103C8T6).
This course focuses on USB-based firmware upgrades (wired connection) using Web Serial API – not internet/Wi-Fi updates.
This course is for developers who want to watch code being written line-by-line. I explain concepts slowly and clearly, but the screen recordings are intentionally sped up 2x to save time. If you want to code along with every example (great for learning!), you'll need to pause and rewind frequently.
That's it – no diagrams or deep dives into flash memory theory. We'll modify STM32 and HTML code bit by bit and immediately test how it works. The screen is always split:
• Left side: Web browser + IDE (live coding)
• Right side: Slides (key concepts)
Take this course if you're into STM32 HAL and want to build a reliable, production-ready bootloader. While we focus on USB CDC and Web Serial API, the core concepts can easily adapt to UART-based bootloaders or EXE flasher utilities.
To simplify things, I've prepared helper functions for Web Serial API and STM32 USB-CDC (see myserial.js and usb_serial.c).
The course won’t explain the internals – experienced developers will quickly grasp how they work (the code is minimal)
Beginners: Try using them as-is first, but ask me if you get stuck adapting them to your projects
Who this course is for:
- STM32 developers who need to implement a production-ready custom bootloader
- Engineers upgrading their skills with custom protocol design
Instructor
For 15 years, I worked at the intersection of microwave radar design and real-world chaos - designing systems by day, then diagnosing why they failed in the field as a consultant. Where others saw limitations in sensor technology, I found opportunities to push performance beyond spec sheets through unconventional algorithm design and hardware optimizations.
My technical journey began young, writing QBasic and Turbo Pascal programs not for school, but to capture the magic of 90s game creation—that raw thrill of bringing digital worlds to life. That same drive led me to master computer graphics through Delphi and OpenGL during university years, where complex math became a tool rather than an obstacle.
The transition to C and STM32 microcontrollers was natural - finally, hardware capable of keeping up with the efficient, reusable code practices I valued. Today, I channel that same efficiency into creating courses that cut through academic fluff, teaching only what delivers real results.
No corporate R&D constraints. No watered-down "best practices." Just proven methods from an engineer who's debugged systems in pouring rain at 3 AM. My goal isn't just to teach - it's to create the courses I wish existed when I was cutting my teeth on radar DSP challenges.