You can compile Optiboot for platforms that do not have pre-existing .hex files, or you can make modifications to the source code and/or Makefile in order to implement "custom" versions of Optiboot.
This will require some relatively deep knowledge of avr-gcc, Atmel AVR hardware and processor details, Makefiles, and the command line environment. We HAVE tried to take steps to allow Optiboot to be compiled without installing a full AVR development suite.
Optiboot is designed to be compiled with the same version of avr-gcc that is distributed with the Arduino environment: 4.3.2. This is actually quite an old version of gcc; some effort has been made to allow the compile to procede with new versions of the compiler. However, since Optiboot MUST compile to a total size of less than 512 bytes, it is very sensitive to changes in the way the compiler does optimizations, or the way it processes optimization options on the compile command.
In all cases, Optiboot compiles directly from the command line using "make", rather than from within any IDE. It is currently designed to used compilers installed in one of three different places:
The Optiboot build procedure has been set up to allow a large set of customization options. The general format of a build command is:
make <options> <platform>
Where is one of the named chips or boards implemented as normal targets in the makefile (ie "atmega328".) (the order may be reversed.) The implemented include:
For example:
make UART=1 LED=A7 AVR_FREQ=20000000L atmega1284
Note that many of the board-level targets are implemented using a recursive invocation of make using this options. For exmaple, the "pro20" target ends up being:
make atmega168 AVR_FREQ=20000000L LED_START_FLASHES=3