After project source code is developed there is always need to flash it to microcontroller. There are few ways to program AVR microcontrollers. Usually we used to flash AVR’s with ISP adapter (or other programmer) that is not always handy especially when designing device for the end user who doesn’t have ISP adapter or doesn’t know much about flashing MCU. So it is better to flash a bootloader program AVR MCU once with programming adapter and later load firmware interactively when starting AVR.
Bootloader not only allows to update firmware without programmer but also enables to load different programs for different purposes depending on situation flexibly. But enough about this.
So my purpose today is to test AVR universal bootloader which is being developed by Shaoziyang. His purpose was to develop universal bootloader that works on different types of AVR microcontrollers with minimal code modifications. Bootloaders you can find on the Internet are mostly available for special types of microcontrollers and nobody wants to do a lot of modifications to adapt to different MCU when needed.
This AVR universal bootloader can support most types of AVR microcontrollers (Mega series), which have self-programmable capability, boot section and UART. If the device have many serial ports, you can use any one of them. Bootloader supports RS232, RS485 and RS422. It can also supports USI, SPI, I2C interface if you made some modify. This bootloader occupies less than 1k words flash maximum, and it may occupy less than 300 words minimum. The space occupied by the bootloader is relative with device type, configuration parameters, functions you select, and the optimize grade that the compiler use.
Continue reading →