mirror of
https://github.com/arduino/Arduino.git
synced 2024-11-30 11:24:12 +01:00
55 lines
2.4 KiB
Plaintext
Executable File
55 lines
2.4 KiB
Plaintext
Executable File
# Arduino Makefile (for Windows XP)
|
|
# Nick Zambetti and David A. Mellis
|
|
# $Id: makefile.win,v 1.9 2005/05/23 18:21:46 mellis Exp $
|
|
|
|
# By default, this makefile uses the serial device specified by
|
|
# Wiring (either in the Tools | Serial Port menu or the Wiring
|
|
# preferences file in the sketchbook directory) and passed as
|
|
# an argument to make. To override this value, uncomment the
|
|
# following line and change the value to the desired device.
|
|
# SERIAL=com1
|
|
|
|
# The Wiring Lite IDE runs the "compile" rule when you click the play button.
|
|
compile:
|
|
-bin/rm tmp/*
|
|
bin/cat include/wiringlite.inc > tmp/prog.c
|
|
bin/cat ../build/*.c >> tmp/prog.c
|
|
bin/cp include/* tmp
|
|
bin/cp ../../cyg*.dll tmp
|
|
bin/gnumake -s -C tmp
|
|
|
|
# The IDE runs the "program" rule when you hit the export button.
|
|
# The string after the colon determines the method used to
|
|
# program the microcontroller: program-using-bootloader,
|
|
# program-with-isp, or program-over-parallel-port.
|
|
program: program-using-bootloader-avrdude
|
|
|
|
# This rule is for uploading code using a bootloader already on
|
|
# the microcontroller. It should run at the baud rate specified
|
|
# in the bootloader's code, current 9600 baud.
|
|
program-using-bootloader-avrdude:
|
|
bin/avrdude -p atmega8 -P ${SERIAL} -c stk500@9600 -V -U flash:w:tmp/prog.hex
|
|
|
|
# This rule is for uploading code using a bootloader already on
|
|
# the microcontroller. It should run at the baud rate specified
|
|
# in the bootloader's code, current 9600 baud. On Windows, use
|
|
# program-using-bootloader-avrdude instead, as uisp seems to have
|
|
# problems talking to the bootloader over the serial port (though
|
|
# it appears to work fine with a Keyspan USB-to-serial adapter).
|
|
program-using-bootloader:
|
|
cp ../../cyg*.dll .
|
|
bin/uisp -dprog=stk500 -dspeed=9600 -dserial=${SERIAL} -dpart=ATmega8 if=tmp/prog.hex --upload
|
|
|
|
# This rule is for uploading code using an in-system programmer,
|
|
# e.g. the one sold by Atmel. In this case, you want to erase the
|
|
# microcontroller, upload the code, and then verify it.
|
|
# Atmel's isp follows the stk500 protocol and works at 115200 baud.
|
|
program-with-isp:
|
|
cp ../../cyg*.dll .
|
|
bin/uisp -dprog=stk500 -dspeed=115200 -dserial=${SERIAL} -dpart=ATmega8 if=tmp/prog.hex --erase --upload --verify
|
|
|
|
# This rule is for uploading code using a parallel port programmer.
|
|
program-over-parallel-port:
|
|
cp ../../cyg*.dll .
|
|
bin/uisp -dprog=dapa -dpart=ATmega8 if=tmp/prog.hex -dlpt=0x378 --erase --upload
|