Seperated out OTG, Device and Host mode demos into seperate folders for clarity....
[pub/USBasp.git] / Projects / Magstripe / makefile
index 1099760..25f3fa4 100644 (file)
@@ -66,7 +66,7 @@ MCU = at90usb1287
 # Target board (see library BoardTypes.h documentation, USER or blank for projects not requiring
 # LUFA board drivers). If USER is selected, put custom board drivers in a directory called 
 # "Board" inside the application directory.
-BOARD  = USBKEY
+BOARD  = USER
 
 
 # Processor frequency.
@@ -101,7 +101,7 @@ F_CPU = 16000000
 #
 #     If no clock division is performed on the input clock inside the AVR (via the
 #     CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
-F_CLOCK = 8000000
+F_CLOCK = 16000000
 
 
 # Output format. (can be srec, ihex, binary)
@@ -458,7 +458,7 @@ ALL_ASFLAGS = -mmcu=$(MCU) -I. -x assembler-with-cpp $(ASFLAGS)
 
 
 # Default target.
-all: begin gccversion sizebefore build checkhooks checklibmode sizeafter end
+all: begin gccversion sizebefore build checkhooks checklibmode checkboard sizeafter end
 
 # Change the build target to build a HEX file or a library.
 build: elf hex eep lss sym
@@ -507,7 +507,7 @@ checkhooks: build
        @$(shell) (grep -s '^Event.*LUFA/.*\\.o' $(TARGET).map | \
                   cut -d' ' -f1 | cut -d'_' -f2- | grep ".*") || \
                           echo "(None)"
-       @echo ----- End Unhooked LUFA Events -----
+       @echo ------------------------------------
 
 checklibmode:
        @echo
@@ -517,6 +517,12 @@ checklibmode:
                  || echo "No specific mode (both device and host mode allowable)."
        @echo ------------------------------------
 
+checkboard:
+       @echo
+       @echo ---------- Selected Board ----------
+       @echo Selected board model is $(BOARD).
+       @echo ------------------------------------
+       
 # Display compiler version information.
 gccversion : 
        @$(CC) --version
@@ -544,10 +550,10 @@ flip-ee: $(TARGET).hex $(TARGET).eep
        batchisp -hardware usb -device $(MCU) -operation start reset 0
 
 dfu-ee: $(TARGET).hex $(TARGET).eep
-       dfu-programmer $(MCU) erase
-       dfu-programmer $(MCU) eeprom --debug 1 $(TARGET).eep
+       dfu-programmer $(MCU) flash-eeprom --debug 1 --suppress-bootloader-mem $(TARGET).eep
        dfu-programmer $(MCU) reset
 
+
 # Generate avr-gdb config/init file which does the following:
 #     define the reset signal, load the target file, connect to target, and set 
 #     a breakpoint at main().
@@ -686,10 +692,11 @@ clean: begin clean_list clean_binary end
 
 clean_binary:
        $(REMOVE) $(TARGET).hex
-
+       
 clean_list:
        @echo $(MSG_CLEANING)
        $(REMOVE) $(TARGET).eep
+       $(REMOVE) $(TARGET)eep.hex
        $(REMOVE) $(TARGET).cof
        $(REMOVE) $(TARGET).elf
        $(REMOVE) $(TARGET).map
@@ -720,8 +727,8 @@ $(shell mkdir $(OBJDIR) 2>/dev/null)
 
 
 # Listing of phony targets.
-.PHONY : all checkhooks checklibmode begin  \
-finish end sizebefore sizeafter gccversion  \
-build elf hex eep lss sym coff extcoff      \
-clean clean_list clean_binary program debug \
-gdb-config doxygen dfu flip
+.PHONY : all checkhooks checklibmode checkboard   \
+begin finish end sizebefore sizeafter gccversion  \
+build elf hex eep lss sym coff extcoff clean      \
+clean_list clean_binary program debug gdb-config  \
+doxygen dfu flip flip-ee dfu-ee
\ No newline at end of file