Commits

Trammell Hudson committed 935b424

Makefile hacks to work with avrdude

Comments (0)

Files changed (1)

 
 # Programming support using avrdude. Settings and variables.
 
-AVRDUDE_PROGRAMMER = avrispmkII
-AVRDUDE_PORT = usb
+AVRDUDE_PROGRAMMER = buspirate
+AVRDUDE_PORT = /dev/tty.usbserial-A800F2AW
 
 AVRDUDE_WRITE_FLASH = -U flash:w:$(TARGET).hex
 #AVRDUDE_WRITE_EEPROM = -U eeprom:w:$(TARGET).eep
 
 # Uncomment the following if you do /not/ wish a verification to be
 # performed after programming the device.
-#AVRDUDE_NO_VERIFY = -V
+AVRDUDE_NO_VERIFY = -V
 
 # Increase verbosity level.  Please use this when submitting bug
 # reports about avrdude. See <http://savannah.nongnu.org/projects/avrdude> 
 # to submit bug reports.
-#AVRDUDE_VERBOSE = -v -v
+AVRDUDE_VERBOSE = -v -v -x serial_recv_timeout=100
 
-MY_CLOCK_IS_SLOW = -i 50
+#MY_CLOCK_IS_SLOW = -i 100
+AVRDUDE_ASCII = -x ascii
 
 AVRDUDE_BASIC = -p $(MCU) -c $(AVRDUDE_PROGRAMMER)
 AVRDUDE_FLAGS = \
 	-P $(AVRDUDE_PORT) \
-	-C $(AVR_PATH)/etc/avrdude.conf \
+	-x cpufreq=125 \
+	$(AVRDUDE_ASCII) \
 	$(MY_CLOCK_IS_SLOW) \
 	$(AVRDUDE_BASIC) \
 	$(AVRDUDE_NO_VERIFY) \
 OBJDUMP = $(AVR_PATH)/bin/avr-objdump
 SIZE = $(AVR_PATH)/bin/avr-size
 NM = $(AVR_PATH)/bin/avr-nm
-AVRDUDE = $(AVR_PATH)/bin/avrdude
+#AVRDUDE = $(AVR_PATH)/bin/avrdude -C $(AVR_PATH)/etc/avrdude.conf
+#AVRDUDE = avrdude
+
+# avrdude needs some patches to work with the recovery clock.
+# run out of my home dir until then.
+AVRDUDE = $(HOME)/build/avrdude/avrdude/avrdude -C $(HOME)/build/avrdude/avrdude/avrdude.conf
 
 REMOVE = rm -f
 MV = mv -f
 
 
 # Link: create ELF output file from object files.
-$(TARGET).elf: $(OBJ)
-	$(CC) $(ALL_CFLAGS) $(OBJ) --output $@ $(LDFLAGS) -nostdlib
+#TARGET).elf: $(OBJ)
+#$(CC) $(ALL_CFLAGS) $(OBJ) --output $@ $(LDFLAGS) -nostdlib
 
 
 # Compile: create object files from C source files.
 avrfid2.elf:
 	$(CC) \
 		-mmcu=attiny85 \
-		-I. \
-		-gstabs \
 		-O3 \
 		-Wall \
 		-Wstrict-prototypes \
 		-std=gnu99 \
-		-funsigned-char \
-		-funsigned-bitfields \
-		-fpack-struct \
-		-fshort-enums \
 		avrfid2.c \
 		-o $@ \
+		-nostdlib \
 
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.