X-Git-Url: http://git.linex4red.de/pub/USBasp.git/blobdiff_plain/99145a8d7c88d9af065cfb7f5e8507d5b65ff811..e611b250c170c9e830f8212ca5d49e505e3f4af1:/Bootloaders/DFU/makefile diff --git a/Bootloaders/DFU/makefile b/Bootloaders/DFU/makefile index 5a26b7e3e..cb19cb6c7 100644 --- a/Bootloaders/DFU/makefile +++ b/Bootloaders/DFU/makefile @@ -32,18 +32,6 @@ # make program = Download the hex file to the device, using avrdude. # Please customize the avrdude settings below first! # -# make dfu = Download the hex file to the device, using dfu-programmer (must -# have dfu-programmer installed). -# -# make flip = Download the hex file to the device, using Atmel FLIP (must -# have Atmel FLIP installed). -# -# make dfu-ee = Download the eeprom file to the device, using dfu-programmer -# (must have dfu-programmer installed). -# -# make flip-ee = Download the eeprom file to the device, using Atmel FLIP -# (must have Atmel FLIP installed). -# # make doxygen = Generate DoxyGen documentation for the project (must have # DoxyGen installed) # @@ -177,7 +165,7 @@ 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 -DNO_CLEARSET_FEATURE_REQUEST +CDEFS += -DUSB_DEVICE_ONLY -DUSE_NONSTANDARD_DESCRIPTOR_NAMES -DFEATURELESS_CONTROL_ONLY_DEVICE CDEFS += -DSTATIC_ENDPOINT_CONFIGURATION -DFIXED_CONTROL_ENDPOINT_SIZE=32 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 -DUSE_SINGLE_DEVICE_CONFIGURATION @@ -459,7 +447,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 @@ -508,8 +496,8 @@ 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 @echo ----------- Library Mode ----------- @@ -518,6 +506,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 @@ -528,26 +522,6 @@ gccversion : program: $(TARGET).hex $(TARGET).eep $(AVRDUDE) $(AVRDUDE_FLAGS) $(AVRDUDE_WRITE_FLASH) $(AVRDUDE_WRITE_EEPROM) -flip: $(TARGET).hex - batchisp -hardware usb -device $(MCU) -operation erase f - batchisp -hardware usb -device $(MCU) -operation loadbuffer $(TARGET).hex program - batchisp -hardware usb -device $(MCU) -operation start reset 0 - -dfu: $(TARGET).hex - dfu-programmer $(MCU) erase - dfu-programmer $(MCU) flash --debug 1 $(TARGET).hex - dfu-programmer $(MCU) reset - -flip-ee: $(TARGET).hex $(TARGET).eep - copy $(TARGET).eep $(TARGET)eep.hex - batchisp -hardware usb -device $(MCU) -operation memory EEPROM erase - batchisp -hardware usb -device $(MCU) -operation memory EEPROM loadbuffer $(TARGET)eep.hex program - 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) reset # Generate avr-gdb config/init file which does the following: # define the reset signal, load the target file, connect to target, and set @@ -687,10 +661,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 @@ -698,8 +673,6 @@ clean_list: $(REMOVE) $(TARGET).lss $(REMOVE) $(SRC:%.c=$(OBJDIR)/%.o) $(REMOVE) $(SRC:%.c=$(OBJDIR)/%.lst) - $(REMOVE) $(ASRC:%.S=$(OBJDIR)/%.o) - $(REMOVE) $(ASRC:%.S=$(OBJDIR)/%.lst) $(REMOVE) $(SRC:.c=.s) $(REMOVE) $(SRC:.c=.d) $(REMOVE) $(SRC:.c=.i) @@ -710,7 +683,7 @@ doxygen: @echo Generating Project Documentation... @doxygen Doxygen.conf @echo Documentation Generation Complete. - + clean_doxygen: rm -rf Documentation @@ -723,8 +696,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 clean_doxygen +.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 \ No newline at end of file