Translations of this page:

OSD Bootloader

The OSD bootloader can communicate using the arduino protocol over the serial interface ( TXD0,RXD0 ). Compatible tools are AVRDUDE on Linux and WINAVR on Windows.

When powering up the boot loader gets started and the LED flashes ( PE5-300Ohm-LED-VCC ). In this state the bootloader waits for 5 seconds to receive a new program. If there was no programming, the currently flashed user program gets loaded.

Flash a program with AVRDUDE


sudo apt-get install avrdude # on Debian/Ubuntu
pacman -S avrdude # on Arch
Build from Source
apt-get install bison flex
tar xf avrdude-6.3.tar.gz
cd avrdude-6.3
sudo make install

Program device

Flash and EEPROM:

sudo avrdude -pm128rfa1 -c arduino -P/dev/ttyUSB0 -b57600 -e -U flash:w:userprogram.hex:a -U eeprom:w:userprogram.eep:a

for the 128KB Version and for the 256KB version:

sudo avrdude -pm256rfr2 -c arduino -P/dev/ttyUSB0 -b57600 -e -U flash:w:userprogram.hex:a -U eeprom:w:userprogram.eep:a

Maybe /dev/ttyUSB0 has to be changed to the one on your system. After plugging into the USB-Port look at the output of


Bootloader sourcecode

Merkurboard (2. Generatgion) mit Atmega256rfr2 Chip:

Merkurboard (1. Generation) mit Atmega128rfa1 Chip:

Todo list OSD-Bootloader V2.0 (Bonsai)

All OSD wireless modules labeled with their EUI-64 MAC number. To use it with Contiki-OS, this number have to be provided by the bootloader.

  • save IEU-64 in bootloader as CONST (OK)
  • enhance bootloader with “BIOS” functions (OK)
  • Jump Tables provide functions (OK)
  • F1 → “get_mac()” → get EUI-64 address (OK)
  • F2 → ?

By using jump tables the functions are available at the same vector address even when changing the boot loader in the future.

Source Code


en/projekte/bootloader.txt · Last modified: 2016/08/23 07:48 by harald42