-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
308e0e7
commit ab44fb7
Showing
41 changed files
with
7,807 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
*.hex | ||
*.obj |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
# This Makefile is compatible with both BSD and GNU make | ||
|
||
ASM?= avra | ||
SHELL = /bin/bash | ||
|
||
.SUFFIXES: .inc .hex | ||
|
||
ALL_TARGETS = afro.hex afro2.hex afro_hv.hex afro_nfet.hex arctictiger.hex birdie70a.hex bs_nfet.hex bs.hex bs40a.hex dlu40a.hex dlux.hex dys_nfet.hex hk200a.hex hm135a.hex kda.hex maytech30a.hex maytech40a.hex maytech60a.hex mkblctrl1.hex rb50a.hex rb70a.hex rct50a.hex tbs.hex tp.hex tp_8khz.hex tp_i2c.hex tp_nfet.hex tp70a.hex tgy6a.hex tgy.hex | ||
AUX_TARGETS = diy0.hex | ||
|
||
all: $(ALL_TARGETS) | ||
|
||
$(ALL_TARGETS): tgy.asm boot.inc | ||
$(AUX_TARGETS): tgy.asm boot.inc | ||
|
||
.inc.hex: | ||
@test -e $*.asm || ln -s tgy.asm $*.asm | ||
@echo "$(ASM) -fI -o $@ -D $*_esc -e $*.eeprom -d $*.obj $*.asm" | ||
@set -o pipefail; $(ASM) -fI -o $@ -D $*_esc -e $*.eeprom -d $*.obj $*.asm 2>&1 | grep -v 'PRAGMA directives currently ignored' | ||
@test -L $*.asm && rm -f $*.asm || true | ||
|
||
test: all | ||
|
||
clean: | ||
-rm -f $(ALL_TARGETS) *.obj *.eep.hex *.eeprom | ||
|
||
binary_zip: $(ALL_TARGETS) | ||
TARGET="tgy_`date '+%Y-%m-%d'`_`git rev-parse --verify --short HEAD`"; \ | ||
mkdir "$$TARGET" && \ | ||
cp $(ALL_TARGETS) "$$TARGET" && \ | ||
git archive -9 --prefix="$$TARGET/" -o "$$TARGET".zip HEAD && \ | ||
zip -9 "$$TARGET".zip "$$TARGET"/*.hex && ls -l "$$TARGET".zip; \ | ||
rm -f "$$TARGET"/*.hex; \ | ||
rmdir "$$TARGET" | ||
|
||
program_tgy_%: %.hex | ||
avrdude -c stk500v2 -b 9600 -P /dev/ttyUSB0 -u -p m8 -U flash:w:$<:i | ||
|
||
program_usbasp_%: %.hex | ||
avrdude -c usbasp -B.5 -p m8 -U flash:w:$<:i | ||
|
||
program_avrisp2_%: %.hex | ||
avrdude -c avrisp2 -p m8 -U flash:w:$<:i | ||
|
||
program_dragon_%: %.hex | ||
avrdude -c dragon_isp -p m8 -P usb -U flash:w:$<:i | ||
|
||
program_dapa_%: %.hex | ||
avrdude -c dapa -p m8 -U flash:w:$<:i | ||
|
||
program_uisp_%: %.hex | ||
uisp -dprog=dapa --erase --upload --verify -v if=$< | ||
|
||
bootload_usbasp: | ||
avrdude -c usbasp -u -p m8 -U hfuse:w:`avrdude -c usbasp -u -p m8 -U hfuse:r:-:h | sed -n '/^0x/{s/.$$/a/;p}'`:m | ||
|
||
read: read_tgy | ||
|
||
read_tgy: | ||
avrdude -c stk500v2 -b 9600 -P /dev/ttyUSB0 -u -p m8 -U flash:r:flash.hex:i -U eeprom:r:eeprom.hex:i | ||
|
||
read_usbasp: | ||
avrdude -c usbasp -u -p m8 -U flash:r:flash.hex:i -U eeprom:r:eeprom.hex:i | ||
|
||
read_avrisp2: | ||
avrdude -c avrisp2 -p m8 -P usb -v -U flash:r:flash.hex:i -U eeprom:r:eeprom.hex:i | ||
|
||
read_dragon: | ||
avrdude -c dragon_isp -p m8 -P usb -v -U flash:r:flash.hex:i -U eeprom:r:eeprom.hex:i | ||
|
||
read_dapa: | ||
avrdude -c dapa -p m8 -v -U flash:r:flash.hex:i -U eeprom:r:eeprom.hex:i | ||
|
||
read_uisp: | ||
uisp -dprog=dapa --download -v of=flash.hex |
Oops, something went wrong.