Professional Documents
Culture Documents
3. Edit Makefile, add a new build target (I added right below atmega328_pro8_isp: isp)
atmega328_pro16div2: TARGET = atmega328_pro_16MHz_Div2
atmega328_pro16div2: MCU_TARGET = atmega328p
atmega328_pro16div2: CFLAGS += '-DMAX_TIME_COUNT=F_CPU>>4' '-DNUM_LED_FLASHES=1' -DBAU
D_RATE=57600 -DDOUBLE_SPEED -DCLKDIV2
atmega328_pro16div2: AVR_FREQ = 8000000L
atmega328_pro16div2: LDSECTION = --section-start=.text=0x7800
atmega328_pro16div2: $(PROGRAM)_atmega328_pro_16MHzDiv2.hex
4. Create a batch file env.bat, content below. This is to set correct building environment for the boot
loader. You do not need a separate installation of WinAVR as the current version of WinAVR has some
definition problem with Arduino bootloader source. The WinAVR within Arduino distribution is just fine.
set path=c:\arduino-1.0.3\hardware\tools\avr\bin;c:\Apps\arduino-1.0.3\hardware\tools\avr\utils\bin;%PAT
H%