Skip to content

PRO TIP Block youtube.com at the DNS level — Pi-hole, NextDNS or your hosts file — but allow youtube-nocookie.com and i.ytimg.com. These tutorials keep playing; the rabbit hole does not.

Learning without distractions

Creating Custom Bootloader (USB DFU) and Relocated Application – STM32 Tutorial #40

9.8K views on YouTube

This is a big one. In this video we will explain and go through the process of creating a custom bootloader, which will allow firmware update using USB DFU (Device firmware update). This will ultimately allow us to upgrade firmware from a browser. The video will cover both the bootloader itself as well as relocating the application to an alternative memory address. We will be implementing both the bootloader and the application in real-time – in less than an hour.

The actual DFU functionality is covered in this video: https://www.youtube.com/watch?v=O6oslbgkjq8

As usual – if you learned anything from this video, please do like and subscribe. If there’s something you do not like, please explain in a comment so I can learn to do better.

A bug is in this video! Please check https://www.youtube.com/watch?v=Wm7eWu5dCrY for an explanation.

In an earlier video we looked at how to jump to the internal bootloader. It would be advisable to watch that first here: https://www.youtube.com/watch?v=qXi6o8hhwUE

This will (work in progress) be described on the STM32World wiki here: https://stm32world.com/wiki/Custom_DFU_Bootloader

Project Files: https://github.com/STM32World/stm32fun

#stm32 #tutorial #GettingStarted #bootloader #usb #dfu #stm32cubeide #stm32cubemx #stm32world #arduino

00:00 Intro and recap
01:40 A bit of theory
03:00 Creating the new bootloader project
07:20 Creating the new application project
10:50 Analysing the bootloader build
11:20 Adding a bit of functionality to bootloader
16:15 Adjusting the linker script for the bootloader
19:26 Adding functionality to the application
23:30 Relocating the application
32:26 Testing both bootloader and application
34:45 Implementing switch between bootloader and application
40:30 Implementing button interrupt in bootloader
43:00 Implementing button interrupt in application
44:11 Jump to bootloader from application
47:20 Testing final solution and sorting out bugs
50:00 Working!!!!