X-Git-Url: http://git.linex4red.de/pub/USBasp.git/blobdiff_plain/a67bd74e3e8aad87dcee8cf0c0eaaccbe7d00552..2a0c28e6e47c8a173f32fc99cd8666a2633c5c12:/Bootloaders/DFU/makefile diff --git a/Bootloaders/DFU/makefile b/Bootloaders/DFU/makefile index f9f8f6563..def34aa96 100644 --- a/Bootloaders/DFU/makefile +++ b/Bootloaders/DFU/makefile @@ -89,7 +89,11 @@ F_CPU = 8000000 # # 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 = $(F_CPU) + + +# Starting byte address of the bootloader +BOOT_START = 0x1E000 # Output format. (can be srec, ihex, binary) @@ -110,6 +114,17 @@ OBJDIR = . LUFA_PATH = ../.. +# LUFA library compile-time options +LUFA_OPTS = -D USB_DEVICE_ONLY +LUFA_OPTS += -D USE_NONSTANDARD_DESCRIPTOR_NAMES +LUFA_OPTS += -D CONTROL_ONLY_DEVICE +LUFA_OPTS += -D FIXED_CONTROL_ENDPOINT_SIZE=32 +LUFA_OPTS += -D TOTAL_NUM_CONFIGURATIONS=1 +LUFA_OPTS += -D USE_RAM_DESCRIPTORS +LUFA_OPTS += -D USE_STATIC_OPTIONS="(USB_DEVICE_OPT_FULLSPEED | USB_OPT_REG_ENABLED | USB_OPT_AUTO_PLL)" +LUFA_OPTS += -D NO_INTERNAL_SERIAL + + # List C source files here. (C dependencies are automatically generated.) SRC = $(TARGET).c \ Descriptors.c \ @@ -167,16 +182,9 @@ EXTRAINCDIRS = $(LUFA_PATH)/ CSTANDARD = -std=gnu99 -# Starting byte address of the bootloader -BOOT_START = 0x1E000 - - # Place -D or -U options here for C sources -CDEFS = -DF_CPU=$(F_CPU)UL -DF_CLOCK=$(F_CLOCK)UL -DBOARD=BOARD_$(BOARD) -CDEFS += -DUSB_DEVICE_ONLY -DUSE_NONSTANDARD_DESCRIPTOR_NAMES -DCONTROL_ONLY_DEVICE -CDEFS += -DFIXED_CONTROL_ENDPOINT_SIZE=32 -DUSE_SINGLE_DEVICE_CONFIGURATION -CDEFS += -DUSE_STATIC_OPTIONS="(USB_DEVICE_OPT_FULLSPEED | USB_OPT_REG_ENABLED | USB_OPT_AUTO_PLL)" -CDEFS += -DUSE_RAM_DESCRIPTORS -DBOOT_START_ADDR=$(BOOT_START)UL +CDEFS = -DF_CPU=$(F_CPU)UL -DF_CLOCK=$(F_CLOCK)UL -DBOARD=BOARD_$(BOARD) $(LUFA_OPTS) +CDEFS += -DBOOT_START_ADDR=$(BOOT_START)UL # Place -D or -U options here for ASM sources @@ -207,10 +215,6 @@ CFLAGS += -fdata-sections CFLAGS += -fpack-struct CFLAGS += -fshort-enums CFLAGS += -fno-inline-small-functions -CFLAGS += -fno-reorder-blocks -CFLAGS += -fno-reorder-blocks-and-partition -CFLAGS += -fno-reorder-functions -CFLAGS += -fno-toplevel-reorder CFLAGS += -Wall CFLAGS += -Wstrict-prototypes CFLAGS += -Wundef