GIT.Harvie.CZ
/
mirrors
/
Programs.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
C gitignore improvements
[mirrors/Programs.git]
/
avr
/
blink
/
Makefile
diff --git
a/avr/blink/Makefile
b/avr/blink/Makefile
index 9d4a517ab3cc2183dd0ba38059b8e67026b50a51..67cc2f7a2e96b5cab5c014380d584d32b1244b52 100644
(file)
--- a/
avr/blink/Makefile
+++ b/
avr/blink/Makefile
@@
-1,8
+1,10
@@
#MCU=at90s2313
MCU=attiny2313
#MCU=at90s2313
MCU=attiny2313
+PORT=/dev/ttyUSB0
CC=avr-gcc
OBJCOPY=avr-objcopy
PROJECT=helloworld
CC=avr-gcc
OBJCOPY=avr-objcopy
PROJECT=helloworld
+RESET=false
# optimize for size:
CFLAGS=-g -mmcu=$(MCU) -Wall -Wstrict-prototypes -Os -mcall-prologues
#-------------------
# optimize for size:
CFLAGS=-g -mmcu=$(MCU) -Wall -Wstrict-prototypes -Os -mcall-prologues
#-------------------
@@
-19,7
+21,8
@@
asm : $(PROJECT).c
# you need to erase first before loading the program.
# load (program) the software into the eeprom:
load: $(PROJECT).hex
# you need to erase first before loading the program.
# load (program) the software into the eeprom:
load: $(PROJECT).hex
- avrdude -cstk500v1 -P/dev/ttyUSB0 -b19200 -p $(MCU) -Uflash:w:$(PROJECT).hex:i
+ $(RESET) && stty -F $(PORT) 19200 hupcl && sleep 2 && stty -F $(PORT) 19200 -hupcl && sleep 2 || true
+ avrdude -cstk500v1 -P$(PORT) -b19200 -p $(MCU) -Uflash:w:$(PROJECT).hex:i || $(MAKE) RESET=true MAKE=true load
# uisp -dlpt=/dev/parport0 --erase --upload --verify if=$(PROJECT).hex -dprog=dapa -v=3 --hash=12
#-------------------
clean:
# uisp -dlpt=/dev/parport0 --erase --upload --verify if=$(PROJECT).hex -dprog=dapa -v=3 --hash=12
#-------------------
clean:
This page took
0.15807 seconds
and
4
git commands to generate.