From 63a86b67ca5944ce7ecee1af861a90d72e7af51d Mon Sep 17 00:00:00 2001 From: Zach Eveland Date: Tue, 10 Jan 2012 16:09:56 -0500 Subject: changed USB PID for Leonardo and Micro bootloaders sketch and bootloader will use different PIDs to distinguish one from the other. --- bootloaders/diskloader/Makefile | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'bootloaders/diskloader/Makefile') diff --git a/bootloaders/diskloader/Makefile b/bootloaders/diskloader/Makefile index 6ac3db3..ed4ba78 100644 --- a/bootloaders/diskloader/Makefile +++ b/bootloaders/diskloader/Makefile @@ -9,21 +9,22 @@ CC = avr-gcc # BOARD2 MCU = atmega32u4 -AVR_FREQ = 16000000L +AVR_FREQ = 16000000L -# Specify the Arduino model using the assigned PID. This is used by Descriptors.c -# to set PID and product descriptor string -# Arduino Leonardo PID -ARDUINO_MODEL_PID = 0x0034 -# Arduino Micro PID -#ARDUINO_MODEL_PID = 0x0035 +# Specify the Arduino model using the assigned PID. This is used by Descriptors.c +# to set PID and product descriptor string + +# Arduino Leonardo bootloader PID +ARDUINO_MODEL_PID = 0x0030 +# Arduino Micro bootloader PID +#ARDUINO_MODEL_PID = 0x0031 # Change if your programmer is different AVRDUDE_PROGRAMMER = avrispmkII AVRDUDE_PORT = usb # program name should not be changed... -PROGRAM = DiskLoader +PROGRAM = DiskLoader AVRDUDE = avrdude AVRDUDE_FLAGS = -p $(MCU) -P $(AVRDUDE_PORT) -c $(AVRDUDE_PROGRAMMER) -p $(MCU) @@ -43,7 +44,6 @@ LDFLAGS = $(COMMON) LDFLAGS += -Wl,-gc-sections,-Map=DiskLoader.map,--section-start=.text=0x7800,--relax LDFLAGS += -nodefaultlibs -nostartfiles - ## Intel Hex file production flags HEX_EEPROM_FLAGS = -j .eeprom HEX_EEPROM_FLAGS += --set-section-flags=.eeprom="alloc,load" @@ -102,4 +102,4 @@ size: $(TARGET) # @avr-size -C --mcu=${MCU} ${TARGET}.elf program: $(TARGET).hex - $(AVRDUDE) $(AVRDUDE_FLAGS) -B 5 -u -U flash:w:$(TARGET).hex \ No newline at end of file + $(AVRDUDE) $(AVRDUDE_FLAGS) -B 1 -u -U flash:w:$(TARGET).hex \ No newline at end of file -- cgit v1.2.3-18-g5258 From 0ed2d3c95309ecf5905ec06624fc68955fdbd2d0 Mon Sep 17 00:00:00 2001 From: Zach Eveland Date: Tue, 10 Jan 2012 16:29:47 -0500 Subject: renamed DiskLoader to Caterina (after Leonardo's mom) --- bootloaders/diskloader/Makefile | 105 ---------------------------------------- 1 file changed, 105 deletions(-) delete mode 100644 bootloaders/diskloader/Makefile (limited to 'bootloaders/diskloader/Makefile') diff --git a/bootloaders/diskloader/Makefile b/bootloaders/diskloader/Makefile deleted file mode 100644 index ed4ba78..0000000 --- a/bootloaders/diskloader/Makefile +++ /dev/null @@ -1,105 +0,0 @@ -############################################################################### -# Makefile for DiskLoader -############################################################################### - -## General Flags -PROJECT = DiskLoader -TARGET = DiskLoader.elf -CC = avr-gcc - -# BOARD2 -MCU = atmega32u4 -AVR_FREQ = 16000000L - -# Specify the Arduino model using the assigned PID. This is used by Descriptors.c -# to set PID and product descriptor string - -# Arduino Leonardo bootloader PID -ARDUINO_MODEL_PID = 0x0030 -# Arduino Micro bootloader PID -#ARDUINO_MODEL_PID = 0x0031 - -# Change if your programmer is different -AVRDUDE_PROGRAMMER = avrispmkII -AVRDUDE_PORT = usb - -# program name should not be changed... -PROGRAM = DiskLoader - -AVRDUDE = avrdude -AVRDUDE_FLAGS = -p $(MCU) -P $(AVRDUDE_PORT) -c $(AVRDUDE_PROGRAMMER) -p $(MCU) - -## Options common to compile, link and assembly rules -COMMON = -mmcu=$(MCU) - -override CFLAGS = -g -Wall -Os -mmcu=$(MCU) -DF_CPU=$(AVR_FREQ) -DARDUINO_MODEL_PID=$(ARDUINO_MODEL_PID) $(DEFS) -ffunction-sections -gdwarf-2 -fdata-sections -fno-split-wide-types - -## Assembly specific flags -ASMFLAGS = $(COMMON) -ASMFLAGS += $(CFLAGS) -ASMFLAGS += -x assembler-with-cpp -Wa,-gdwarf2 - -## Linker flags -LDFLAGS = $(COMMON) -LDFLAGS += -Wl,-gc-sections,-Map=DiskLoader.map,--section-start=.text=0x7800,--relax -LDFLAGS += -nodefaultlibs -nostartfiles - -## Intel Hex file production flags -HEX_EEPROM_FLAGS = -j .eeprom -HEX_EEPROM_FLAGS += --set-section-flags=.eeprom="alloc,load" -HEX_EEPROM_FLAGS += --change-section-lma .eeprom=0 --no-change-warnings - -## Objects explicitly added by the user -LINKONLYOBJECTS = - -MODULES := . -SRC_DIR := $(addprefix src/,$(MODULES)) -BUILD_DIR := $(addprefix build/,$(MODULES)) - -SRC := $(foreach sdir,$(SRC_DIR),$(wildcard $(sdir)/*.cpp)) -OBJ := $(patsubst src/%.cpp,build/%.o,$(SRC)) -DEP := $(OBJ:%.o=%.d) -INCLUDES := $(addprefix -I,$(SRC_DIR)) - -vpath %.cpp $(SRC_DIR) - -.PHONY: all checkdirs clean - -all: checkdirs $(TARGET) DiskLoader.hex DiskLoader.lss size - --include $(DEP) - -checkdirs: $(BUILD_DIR) - -$(BUILD_DIR): - @mkdir -p $@ - -clean: - @rm -rf build/ - @rm -f *.hex - @rm -f *.elf - @rm -f *.lss - @rm -f *.map - -define make-goal -$1/%.o: %.cpp - $(CC) $(INCLUDES) $(CFLAGS) -c $$< -MD -o $$@ -endef - -$(foreach bdir,$(BUILD_DIR),$(eval $(call make-goal,$(bdir)))) - -$(TARGET): $(OBJ) - $(CC) $(LDFLAGS) $(LINKONLYOBJECTS) $(LIBDIRS) $(LIBS) $^ -o $@ - -%.hex: $(TARGET) - avr-objcopy -O ihex $(HEX_FLASH_FLAGS) $< $@ - -%.lss: $(TARGET) - avr-objdump -h -S $< > $@ - -size: $(TARGET) - @echo -# @avr-size -C --mcu=${MCU} ${TARGET}.elf - -program: $(TARGET).hex - $(AVRDUDE) $(AVRDUDE_FLAGS) -B 1 -u -U flash:w:$(TARGET).hex \ No newline at end of file -- cgit v1.2.3-18-g5258