diff options
| author | Dean <Dean@d5102386-fcda-11dd-9fdb-3debd5008f28> | 2012-07-16 17:11:14 +0000 |
|---|---|---|
| committer | Dean <Dean@d5102386-fcda-11dd-9fdb-3debd5008f28> | 2012-07-16 17:11:14 +0000 |
| commit | 2eb47bea14a5c98eddcedbc4ff38583d9bfbb1d3 (patch) | |
| tree | 867b4e0576c989fdca82469a3b644275204c864c /Bootloaders/HID/makefile | |
| parent | a0a30d5afb506b55655de244f1c7f6b1857279d8 (diff) | |
Tag for the LUFA-120730-BETA release.LUFA-120730-BETA
git-svn-id: http://lufa-lib.googlecode.com/svn/tags/LUFA-120730-BETA@2407 d5102386-fcda-11dd-9fdb-3debd5008f28
Diffstat (limited to 'Bootloaders/HID/makefile')
| -rw-r--r-- | Bootloaders/HID/makefile | 41 |
1 files changed, 20 insertions, 21 deletions
diff --git a/Bootloaders/HID/makefile b/Bootloaders/HID/makefile index 9e33f7bf..b6477f96 100644 --- a/Bootloaders/HID/makefile +++ b/Bootloaders/HID/makefile @@ -9,20 +9,6 @@ # LUFA Project Makefile. # -------------------------------------- -# Starting byte address of the bootloader, as a byte address - computed via the formula -# BOOT_START = ((FLASH_SIZE_KB - BOOT_SECTION_SIZE_KB) * 1024) -# -# Note that the bootloader size and start address given in AVRStudio is in words and not -# bytes, and so will need to be doubled to obtain the byte address needed by AVR-GCC. -FLASH_SIZE_KB = 128 -BOOT_SECTION_SIZE_KB = 8 - -# Formulas used to calculate the starting address of the Bootloader section, and the User Application -# API jump table (for more information on the latter, see the bootloader documentation). These formulas -# should not need to be altered - modify the FLASH_SIZE_KB and BOOT_SECTION_KB values above instead. -BOOT_START = 0x$(shell echo "obase=16; ($(FLASH_SIZE_KB) - $(BOOT_SECTION_SIZE_KB)) * 1024" | bc) -BOOT_API_TABLESTART = 0x$(shell echo "obase=16; (($(FLASH_SIZE_KB) * 1024) - 96)" | bc) - MCU = at90usb1287 ARCH = AVR8 BOARD = USBKEY @@ -31,16 +17,29 @@ F_USB = $(F_CPU) OPTIMIZATION = s TARGET = BootloaderHID SRC = $(TARGET).c Descriptors.c $(LUFA_SRC_USB) -LUFA_PATH = ../../LUFA/ +LUFA_PATH = ../../LUFA CC_FLAGS = -DUSE_LUFA_CONFIG_HEADER -IConfig/ -LD_FLAGS = -Wl,--section-start=.text=$(BOOT_START) +LD_FLAGS = -Wl,--section-start=.text=$(BOOT_START_OFFSET) + +# 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 +# device's fuses. +FLASH_SIZE_KB := 128 +BOOT_SECTION_SIZE_KB := 8 + +# Bootloader address calculation formulas (requires the "bc" unix utility) +# Do not modify these macros, but rather modify the depedant values above. +BOOT_START_OFFSET = 0x$(shell echo "obase=16; ($(FLASH_SIZE_KB) - $(BOOT_SECTION_SIZE_KB)) * 1024" | bc) +BOOT_SEC_OFFSET = 0x$(shell echo "obase=16; (($(FLASH_SIZE_KB) * 1024) - $(strip $(1)))" | bc) # Default target all: # Include LUFA build script makefiles -include $(LUFA_PATH)/Build/lufa.core.in -include $(LUFA_PATH)/Build/lufa.sources.in -include $(LUFA_PATH)/Build/lufa.build.in -include $(LUFA_PATH)/Build/lufa.doxygen.in -include $(LUFA_PATH)/Build/lufa.avrdude.in +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 |
