115,7 → 115,9 |
LDFLAGS += -lm |
|
|
PROGRAMMER_DEVICE = dapa |
|
PORT = /dev/parport0 # programmer connected to parallel port |
|
# Programming support using avrdude. Settings and variables. |
|
124,16 → 126,6 |
# Type: avrdude -c ? |
# to get a full listing. |
# |
AVRDUDE_PROGRAMMER = dapa |
|
|
#AVRDUDE_PORT = com1 # programmer connected to serial device |
AVRDUDE_PORT = /dev/parport0 # programmer connected to parallel port |
|
AVRDUDE_ERASE = -e |
AVRDUDE_FLAGS = -p $(MCU) -P $(AVRDUDE_PORT) -c $(AVRDUDE_PROGRAMMER) |
|
|
# Uncomment the following if you want avrdude's erase cycle counter. |
# Note that this counter needs to be initialized first using -Yn, |
# see avrdude manual. |
149,8 → 141,6 |
#AVRDUDE_FLAGS += -v -v |
|
|
|
|
# --------------------------------------------------------------------------- |
|
# Define directories, if needed. |
172,7 → 162,9 |
|
|
# Programming support using avrdude. |
AVRDUDE = avrdude |
#PROGRAMMER = avrdude |
# Programming support using uisp. |
PROGRAMMER = uisp |
|
|
REMOVE = rm -f |
259,19 → 251,24 |
# well. Just delete these lines if you don't want this feature (like |
# on the ATmegas with the EESAVE fuse bit set). |
program: $(TARGET).hex $(TARGET).eep |
$(AVRDUDE) $(AVRDUDE_FLAGS) $(AVRDUDE_ERASE) |
$(AVRDUDE) $(AVRDUDE_FLAGS) -i $(TARGET).hex |
@$(SIZE) --target=$(FORMAT) $(TARGET).eep | while read line; \ |
do \ |
set -- $$line; \ |
if [ "x$$1" != "x0" ] ; then continue; fi; \ |
if [ "$$2" -ne 0 ] ; then \ |
echo $(AVRDUDE) $(AVRDUDE_FLAGS) -m eeprom -i $(TARGET).eep; \ |
$(AVRDUDE) $(AVRDUDE_FLAGS) -m eeprom -i $(TARGET).eep; \ |
break; \ |
fi; \ |
done |
# if[ "$(PROGRAMMER)" == "avrdude"]; then \ |
# avrdude -p $(MCU) -P $(PORT) -c $(PROGRAMMER_DEVICE) -e # erase AVR device |
# avrdude -p $(MCU) -P $(PORT) -c $(PROGRAMMER_DEVICE) -i $(TARGET).hex # program AVR device |
# fi; \ |
# @$(SIZE) --target=$(FORMAT) $(TARGET).eep | while read line; \ |
# do \ |
# set -- $$line; \ |
# if [ "x$$1" != "x0" ] ; then continue; fi; \ |
# if [ "$$2" -ne 0 ] ; then \ |
# echo $(AVRDUDE) $(AVRDUDE_FLAGS) -m eeprom -i $(TARGET).eep; \ |
# $(AVRDUDE) $(AVRDUDE_FLAGS) -m eeprom -i $(TARGET).eep; \ |
# break; \ |
# fi; \ |
# done |
|
# if[$PROGRAMMER == "uisp"]; then |
uisp -dlpt=$(PORT) -dpart=$(MCU) -dprog=$(PROGRAMMER_DEVICE) if=$(TARGET).hex --upload |
# fi; |
|
# Create final output files (.hex, .eep) from ELF output file. |
%.hex: %.elf |