Bootloader Internals


Does anyone have any links to good documentation for understanding the bootloader that comes with an UNO? I would really like to understand as much as possible about the bootloader, but I'm having trouble finding good sources of information.

Ideally I would like to be able to modify/optimize the bootloader for my own purposes. At a minimum it will make me a better Arduino developer to undersand how it all works.

Thanks. -Mitch

Well the source code files for all the standard arduino bootloaders are included in the IDE distrubution. Here is where they are located on my PC:

C:\Documents and Settings\Primary Windows User\My Documents\My Programs\Arduino\arduino-1.0\hardware\arduino\bootloaders

Wow, cool...that helps.

One more question before I dig in...which one do I look at for an UNO (Atmega328)? Can you provide some insight into the various subdirectories?

  • atmega?
  • atmega8?
  • bt
  • lilypad
  • optiboot
  • stk500v2

I will dig into 'atmega' in the mean time.

Thanks again. -Mitch

The Uno normally comes with Optiboot loaded.

Bootloader tutorial/FAQ: Atmel has several documents describing bootloaders and the programmer communication protocols they use to talk to their hosts...

Optiboot is the current bootloader for Uno-like Arduinos. STK500v2 is the current bootloader for MEGA-like devices. It is larger than the other bootloaders and supports uploads of sketchs larger than 128k of memory (at least in theory.)