X-Git-Url: http://git.linex4red.de/pub/USBasp.git/blobdiff_plain/1e05d46b663ded57a06f4d8773f40aea908f8622..77c0786f90ce57651d9039b9dedde0e9a3c9da9d:/Bootloaders/MassStorage/makefile diff --git a/Bootloaders/MassStorage/makefile b/Bootloaders/MassStorage/makefile index 506c941ff..4a6e18e22 100644 --- a/Bootloaders/MassStorage/makefile +++ b/Bootloaders/MassStorage/makefile @@ -1,6 +1,6 @@ # # LUFA Library -# Copyright (C) Dean Camera, 2016. +# Copyright (C) Dean Camera, 2019. # # dean [at] fourwalledcubicle [dot] com # www.lufa-lib.org @@ -22,6 +22,7 @@ SRC = $(TARGET).c Descriptors.c BootloaderAPI.c BootloaderAPITable.S Li LUFA_PATH = ../../LUFA CC_FLAGS = -DUSE_LUFA_CONFIG_HEADER -IConfig/ -DBOOT_START_ADDR=$(BOOT_START_OFFSET) LD_FLAGS = -Wl,--section-start=.text=$(BOOT_START_OFFSET) $(BOOT_API_LD_FLAGS) +LTO = Y # Flash size and bootloader section sizes of the target, in KB. These must # match the target's total FLASH size and the bootloader size set in the @@ -43,12 +44,12 @@ BOOT_API_LD_FLAGS += $(call BOOT_SECTION_LD_FLAG, .apitable_jumptable, Boot BOOT_API_LD_FLAGS += $(call BOOT_SECTION_LD_FLAG, .apitable_signatures, BootloaderAPI_Signatures, 8) # Check if the bootloader needs an AUX section, located before the real bootloader section to store some of the -# bootloader code. This is required for 32KB and smaller devices, where the actual bootloader is 6KB but the maximum +# bootloader code. This is required for 32KB and smaller devices, where the actual bootloader is 8KB but the maximum # bootloader section size is 4KB. The actual usable application space will be reduced by 6KB for these devices. ifeq ($(BOOT_SECTION_SIZE_KB),8) CC_FLAGS += -DAUX_BOOT_SECTION_SIZE=0 else - AUX_BOOT_SECTION_SIZE_KB = (6 - $(BOOT_SECTION_SIZE_KB)) + AUX_BOOT_SECTION_SIZE_KB = (8 - $(BOOT_SECTION_SIZE_KB)) CC_FLAGS += -DAUX_BOOT_SECTION_SIZE='($(AUX_BOOT_SECTION_SIZE_KB) * 1024)' LD_FLAGS += -Wl,--section-start=.boot_aux=$(call BOOT_SEC_OFFSET, (($(BOOT_SECTION_SIZE_KB) + $(AUX_BOOT_SECTION_SIZE_KB)) * 1024 - 16)) @@ -58,11 +59,18 @@ endif # Default target all: -# Include LUFA build script makefiles -include $(LUFA_PATH)/Build/lufa_core.mk -include $(LUFA_PATH)/Build/lufa_sources.mk -include $(LUFA_PATH)/Build/lufa_build.mk -include $(LUFA_PATH)/Build/lufa_cppcheck.mk -include $(LUFA_PATH)/Build/lufa_doxygen.mk -include $(LUFA_PATH)/Build/lufa_avrdude.mk -include $(LUFA_PATH)/Build/lufa_atprogram.mk +# Include LUFA-specific DMBS extension modules +DMBS_LUFA_PATH ?= $(LUFA_PATH)/Build/LUFA +include $(DMBS_LUFA_PATH)/lufa-sources.mk +include $(DMBS_LUFA_PATH)/lufa-gcc.mk + +# Include common DMBS build system modules +DMBS_PATH ?= $(LUFA_PATH)/Build/DMBS/DMBS +include $(DMBS_PATH)/core.mk +include $(DMBS_PATH)/cppcheck.mk +include $(DMBS_PATH)/doxygen.mk +include $(DMBS_PATH)/dfu.mk +include $(DMBS_PATH)/gcc.mk +include $(DMBS_PATH)/hid.mk +include $(DMBS_PATH)/avrdude.mk +include $(DMBS_PATH)/atprogram.mk