Title
DFU Bootloader And Flashing
What It Is
DFU stands for Device Firmware Upgrade. A bootloader is a small program that runs before the main application and knows how to receive new firmware.
What It Does In This Project
- allows the board to accept new firmwares
- separates the bootloader from the main course application
- supports browser updater and
dfu-utilworkflows
Origins And Background
Bootloaders exist because devices need a safe and repeatable way to update software after manufacturing. DFU became a common USB update mechanism for embedded devices.
How It Communicates
- enters a special USB DFU mode
- accepts firmware images written into flash memory
- then returns to the normal application after reset
Memory Region Notes
This is a good place to explain:
- bootloader region
- application region
- why linker scripts matter
- why writing to the wrong flash address is dangerous
Why It Matters
It introduces the important idea that a microcontroller can hold more than one piece of firmware with different jobs.
Teaching Focus
- bootloader vs application
- flash memory regions
- update safety
- why tooling and addresses matter
Datasheet And Tooling Tips
Students can compare:
- linker script memory layout
- build memory report
- DFU target address
- browser updater vs
dfu-util
Interesting Detail
A bootloader is often tiny compared with the main firmware, but it can completely change how usable a board is in classrooms and real products.
Good Questions To Ask Students
- Why not let the main application overwrite itself directly?
- Why do we keep bootloader and application separate?
- What could go wrong if a firmware image is written to the wrong flash address?