Mystery of Bootloader¶
What’s a Bootloader?
Microcontrollers are usually programmed through a programmer unless you have a piece of firmware in your microcontroller that allows installing new firmware without the need of an external programmer.
This is called a bootloader.
From Instructor and Staff group
both SAMD and AVR can work without bootloader. For SAMDs, the role of the bootloader is to accept firmware uploads through serial over USB, without any additional hardware. Hence you only need a programmer connected to it the first time you flash the bootloader. But if you wish, you can also keep using the programmer and edbg every time you upload, it’s simply a lot less convenient. Arduino stores its binary in a hidden folder before uploading, so you could simply find it and upload it with edbg instead.
For the AVR, uploading through UPDI requires some USB-serial programmer connected to it, because the AVR itself doesn’t support USB. Optiboot is an optional bootloader that can take uploads through a regular serial port of the AVR instead of the UPDI port. But you will still need a USB-serial adapter next to your AVR. This is similar to how Arduinos (ATmega type) work too, they have a serial USB adapter onto the board, connected to one of the serial ports of the ATmega, and take firmware uploads through there.
|FamilyMCU||Interface||upload programwithout bootloader||upload programafter burned bootloader|
|Original AVRATmega328P||ISP||Via programmer(fab ISP)||serial over USB with external Serial-USB board|
|AVR-13216||UPDI||Via programmer(USB-Serial board & Serial-UPDI board)||serial over USB with external Serial-USB board|
|ARMSAMD11C||SWD/JTAG||Via programmer(freeDAP board)||serial over USB with internal Serial-USB function|