Compiling optiboot within the arduino environment.

Thanks very much for making this patch! I have now been able to compile Optiboot with the IDE 0022 tools running under Windows 7, and get a .hex file which matches the one in the Optiboot repository. I did have to make a couple of small adjustments to the diff file (see below) to match the current version of the Makefile, and add the '-nostdlib' flag to LDFLAGS (as explained in Optiboot issue #1).

And if I add the fix at Google Code Archive - Long-term storage for Google Code Project Hosting. I get a hex file which matches that in your excellent Optifix sketch.

The next things I will try are your size-reduction patch from Google Code Archive - Long-term storage for Google Code Project Hosting., and an 8MHz version of Optifix.

cheers,

--- westfw-Makefile.diff	Tue Mar 22 03:28:25 2011
+++ tim-Makefile.diff	Tue Mar 22 03:17:06 2011
@@ -72,13 +70,13 @@
  # Override is only needed by avr-lib build system.
  
  override CFLAGS        = -g -Wall $(OPTIMIZE) -mmcu=$(MCU_TARGET) -DF_CPU=$(AVR_FREQ) $(DEFS)
--override LDFLAGS       = -Wl,$(LDSECTION) -Wl,--relax -nostartfiles
-+override LDFLAGS       = -Wl,$(LDSECTION) -Wl,--relax -Wl,--gc-sections -nostartfiles
+-override LDFLAGS       = -Wl,$(LDSECTION) -Wl,--relax -nostartfiles -Wl,--gc-sections
++override LDFLAGS       = -Wl,$(LDSECTION) -Wl,--relax -nostartfiles -Wl,--gc-sections -nostdlib
  
 -OBJCOPY        = avr-objcopy
 -OBJDUMP        = avr-objdump
 +OBJCOPY        = $(GCCROOT)avr-objcopy
 +OBJDUMP        = $(call fixpath,$(GCCROOT)avr-objdump)
  
- # 20MHz clocked platforms
- #
+ # Test platforms
+ # Virtual boot block test