Fixed interrupt driven HID device demos not clearing the interrupt flags in all circu...
[pub/USBasp.git] / Bootloaders / DFU / makefile
index 5a8e4ee..88c539c 100644 (file)
 # make program = Download the hex file to the device, using avrdude.\r
 #                Please customize the avrdude settings below first!\r
 #\r
-# make dfu = Download the hex file to the device, using dfu-programmer (must\r
-#            have dfu-programmer installed).\r
-#\r
-# make flip = Download the hex file to the device, using Atmel FLIP (must\r
-#             have Atmel FLIP installed).\r
-#\r
-# make dfu-ee = Download the eeprom file to the device, using dfu-programmer\r
-#               (must have dfu-programmer installed).\r
-#\r
-# make flip-ee = Download the eeprom file to the device, using Atmel FLIP\r
-#                (must have Atmel FLIP installed).\r
-#\r
 # make doxygen = Generate DoxyGen documentation for the project (must have\r
 #                DoxyGen installed)\r
 #\r
@@ -90,6 +78,20 @@ BOARD  = USBKEY
 F_CPU = 8000000\r
 \r
 \r
+# Input clock frequency.\r
+#     This will define a symbol, F_CLOCK, in all source code files equal to the \r
+#     input clock frequency (before any prescaling is performed). This value may\r
+#     differ from F_CPU if prescaling is used on the latter, and is required as the\r
+#     raw input clock is fed directly to the PLL sections of the AVR for high speed\r
+#     clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'\r
+#     at the end, this will be done automatically to create a 32-bit value in your\r
+#     source code.\r
+#\r
+#     If no clock division is performed on the input clock inside the AVR (via the\r
+#     CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.\r
+F_CLOCK = 8000000\r
+\r
+\r
 # Output format. (can be srec, ihex, binary)\r
 FORMAT = ihex\r
 \r
@@ -162,10 +164,12 @@ BOOT_START = 0x1E000
 \r
 \r
 # Place -D or -U options here for C sources\r
-CDEFS  = -DF_CPU=$(F_CPU)UL -DBOARD=BOARD_$(BOARD) -DUSE_NONSTANDARD_DESCRIPTOR_NAMES -DSTATIC_ENDPOINT_CONFIGURATION\r
-CDEFS += -DUSB_DEVICE_ONLY -DUSE_STATIC_OPTIONS="(USB_DEVICE_OPT_FULLSPEED | USB_OPT_REG_ENABLED | USB_OPT_AUTO_PLL)"\r
-CDEFS += -DUSE_RAM_DESCRIPTORS -DBOOT_START_ADDR=$(BOOT_START)UL -DFIXED_CONTROL_ENDPOINT_SIZE=32 -DUSE_SINGLE_DEVICE_CONFIGURATION\r
-CDEFS += -DNO_CLEARSET_FEATURE_REQUEST\r
+CDEFS  = -DF_CPU=$(F_CPU)UL -DF_CLOCK=$(F_CLOCK)UL -DBOARD=BOARD_$(BOARD)\r
+CDEFS += -DUSB_DEVICE_ONLY -DUSE_NONSTANDARD_DESCRIPTOR_NAMES -DNO_CLEARSET_FEATURE_REQUEST\r
+CDEFS += -DSTATIC_ENDPOINT_CONFIGURATION -DFIXED_CONTROL_ENDPOINT_SIZE=32\r
+CDEFS += -DUSE_STATIC_OPTIONS="(USB_DEVICE_OPT_FULLSPEED | USB_OPT_REG_ENABLED | USB_OPT_AUTO_PLL)"\r
+CDEFS += -DUSE_RAM_DESCRIPTORS -DBOOT_START_ADDR=$(BOOT_START)UL -DUSE_SINGLE_DEVICE_CONFIGURATION\r
+\r
 \r
 # Place -D or -U options here for ASM sources\r
 ADEFS = -DF_CPU=$(F_CPU)\r
@@ -511,27 +515,8 @@ gccversion :
 # Program the device.  \r
 program: $(TARGET).hex $(TARGET).eep\r
        $(AVRDUDE) $(AVRDUDE_FLAGS) $(AVRDUDE_WRITE_FLASH) $(AVRDUDE_WRITE_EEPROM)\r
-\r
-flip: $(TARGET).hex\r
-       batchisp -hardware usb -device $(MCU) -operation erase f\r
-       batchisp -hardware usb -device $(MCU) -operation loadbuffer $(TARGET).hex program\r
-       batchisp -hardware usb -device $(MCU) -operation start reset 0\r
-\r
-dfu: $(TARGET).hex\r
-       dfu-programmer $(MCU) erase\r
-       dfu-programmer $(MCU) flash --debug 1 $(TARGET).hex\r
-       dfu-programmer $(MCU) reset\r
-\r
-flip-ee: $(TARGET).hex $(TARGET).eep\r
-       copy $(TARGET).eep $(TARGET)eep.hex\r
-       batchisp -hardware usb -device $(MCU) -operation memory EEPROM erase\r
-       batchisp -hardware usb -device $(MCU) -operation memory EEPROM loadbuffer $(TARGET)eep.hex program\r
-       batchisp -hardware usb -device $(MCU) -operation start reset 0\r
-\r
-dfu-ee: $(TARGET).hex $(TARGET).eep\r
-       dfu-programmer $(MCU) erase\r
-       dfu-programmer $(MCU) eeprom --debug 1 $(TARGET).eep\r
-       dfu-programmer $(MCU) reset\r
+       \r
+       \r
 \r
 # Generate avr-gdb config/init file which does the following:\r
 #     define the reset signal, load the target file, connect to target, and set \r