Add script reading bootloader flags
[pub/lufa.git] / Bootloaders / HID / makefile
index a76faf0..8e46b49 100644 (file)
@@ -1,6 +1,6 @@
 #
 #             LUFA Library
-#     Copyright (C) Dean Camera, 2016.
+#     Copyright (C) Dean Camera, 2021.
 #
 #  dean [at] fourwalledcubicle [dot] com
 #           www.lufa-lib.org
@@ -20,8 +20,9 @@ OPTIMIZATION = s
 TARGET       = BootloaderHID
 SRC          = $(TARGET).c Descriptors.c $(LUFA_SRC_USB)
 LUFA_PATH    = ../../LUFA
-CC_FLAGS     = -DUSE_LUFA_CONFIG_HEADER -IConfig/
+CC_FLAGS     = -DUSE_LUFA_CONFIG_HEADER -DBOOT_START_ADDR=$(BOOT_START_OFFSET) -IConfig/
 LD_FLAGS     = -Wl,--section-start=.text=$(BOOT_START_OFFSET)
+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