I have an Arduino UNO and my application needs to reprogram itself. The hex file is transmitted and stored in the SRAM and after going through the AVR109 Application note I have realized that I need to write my bootloader to make self programming possible. Where should I start by writing my own bootloader. AVR109 basically gave me a good understanding of how self programming works but I want access to resources/info. which can enable me to write my own bootloader. Also in the same application note they refer to a protocol and a bootloader that can make self programming possible. Where can I get the source code as I searched online and I could not find the "main.c" as mentioned. Thanks!