Skip to content

Commit

Permalink
flash.py made compatible with windows (no more reset button press req…
Browse files Browse the repository at this point in the history
…uired)
  • Loading branch information
Stefan Hechenberger committed Aug 7, 2012
1 parent fd85d26 commit 4f9225c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions flash.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
def build():
DEVICE = "atmega328p"
CLOCK = "16000000"
PROGRAMMER = "avrisp" # use this for bootloader
PROGRAMMER = "arduino" # use this for bootloader
# PROGRAMMER = "usbtiny" # use this for programmer
BITRATE = "115200"

Expand All @@ -85,7 +85,9 @@ def build():

os.system('%(size)s *.hex *.elf *.o' % {'size':AVRSIZEAPP})

os.system('%(dude)s -c %(programmer)s -b %(bps)s -P %(port)s -p %(device)s -C %(dudeconf)s -B 10 -F -U flash:w:%(product)s.hex:i' % {'dude':AVRDUDEAPP, 'programmer':PROGRAMMER, 'bps':BITRATE, 'port':SERIAL_PORT, 'device':DEVICE, 'dudeconf':AVRDUDECONFIG, 'product':BUILDNAME})
os.system('%(dude)s -c %(programmer)s -b %(bps)s -P %(port)s -p %(device)s -C %(dudeconf)s -D -Uflash:w:%(product)s.hex:i' % {'dude':AVRDUDEAPP, 'programmer':PROGRAMMER, 'bps':BITRATE, 'port':SERIAL_PORT, 'device':DEVICE, 'dudeconf':AVRDUDECONFIG, 'product':BUILDNAME})
# os.system('%(dude)s -c %(programmer)s -b %(bps)s -P %(port)s -p %(device)s -C %(dudeconf)s -B 10 -F -U flash:w:%(product)s.hex:i' % {'dude':AVRDUDEAPP, 'programmer':PROGRAMMER, 'bps':BITRATE, 'port':SERIAL_PORT, 'device':DEVICE, 'dudeconf':AVRDUDECONFIG, 'product':BUILDNAME})


# fuse setting taken over from Makefile for reference
#os.system('%(dude)s -U hfuse:w:0xd2:m -U lfuse:w:0xff:m' % {'dude':AVRDUDEAPP})
Expand Down

0 comments on commit 4f9225c

Please sign in to comment.