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
\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\r
-CDEFS += -DUSB_DEVICE_ONLY -DUSE_STATIC_OPTIONS="(USB_DEVICE_OPT_FULLSPEED | USB_OPT_REG_ENABLED | USB_OPT_AUTO_PLL)"\r
+CDEFS = -DF_CPU=$(F_CPU)UL -DF_CLOCK=$(F_CLOCK)UL -DBOARD=BOARD_$(BOARD)\r
+CDEFS += -DUSE_NONSTANDARD_DESCRIPTOR_NAMES -DUSB_DEVICE_ONLY\r
+CDEFS += -DUSE_STATIC_OPTIONS="(USB_DEVICE_OPT_FULLSPEED | USB_OPT_REG_ENABLED | USB_OPT_AUTO_PLL)"\r
\r
\r
# Place -D or -U options here for ASM sources\r
\r
\r
# Default target.\r
-all: begin gccversion sizebefore build checkhooks checklibmode sizeafter end\r
+all: begin gccversion sizebefore build checkhooks checklibmode checkboard sizeafter end\r
\r
# Change the build target to build a HEX file or a library.\r
build: elf hex eep lss sym\r
@$(shell) (grep -s '^Event.*LUFA/.*\\.o' $(TARGET).map | \\r
cut -d' ' -f1 | cut -d'_' -f2- | grep ".*") || \\r
echo "(None)"\r
- @echo ----- End Unhooked LUFA Events -----\r
- \r
+ @echo ------------------------------------\r
+\r
checklibmode:\r
@echo\r
@echo ----------- Library Mode -----------\r
|| echo "No specific mode (both device and host mode allowable)."\r
@echo ------------------------------------\r
\r
+checkboard:\r
+ @echo\r
+ @echo ---------- Selected Board ----------\r
+ @echo Selected board model is $(BOARD).\r
+ @echo ------------------------------------\r
+ \r
# Display compiler version information.\r
gccversion : \r
@$(CC) --version\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) flash-eeprom --debug 1 --suppress-bootloader-mem $(TARGET).eep\r
dfu-programmer $(MCU) reset\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
# a breakpoint at main().\r
\r
clean_binary:\r
$(REMOVE) $(TARGET).hex\r
-\r
+ \r
clean_list:\r
@echo $(MSG_CLEANING)\r
$(REMOVE) $(TARGET).eep\r
+ $(REMOVE) $(TARGET)eep.hex\r
$(REMOVE) $(TARGET).cof\r
$(REMOVE) $(TARGET).elf\r
$(REMOVE) $(TARGET).map\r
\r
\r
# Listing of phony targets.\r
-.PHONY : all checkhooks checklibmode begin \\r
-finish end sizebefore sizeafter gccversion \\r
-build elf hex eep lss sym coff extcoff \\r
-clean clean_list clean_binary program debug \\r
-gdb-config doxygen dfu flip\r
+.PHONY : all checkhooks checklibmode checkboard \\r
+begin finish end sizebefore sizeafter gccversion \\r
+build elf hex eep lss sym coff extcoff clean \\r
+clean_list clean_binary program debug gdb-config \\r
+doxygen dfu flip flip-ee dfu-ee
\ No newline at end of file