diff options
| author | Dean <Dean@d5102386-fcda-11dd-9fdb-3debd5008f28> | 2011-02-09 17:58:21 +0000 |
|---|---|---|
| committer | Dean <Dean@d5102386-fcda-11dd-9fdb-3debd5008f28> | 2011-02-09 17:58:21 +0000 |
| commit | 7fbc679e394b653ac51f11688e81475f6c9847a0 (patch) | |
| tree | 93f5e2a7d50fa3b24eec80c9245ea06517be463e /Bootloaders/CDC/makefile | |
| parent | 231bae883e9d6f4bea012c4b3ab811244bc4ef38 (diff) | |
Change bootloader makefiles to automatically compute the bootloader starting address from a flash size and bootloader section size, expressed in KB.
git-svn-id: http://lufa-lib.googlecode.com/svn/trunk@1656 d5102386-fcda-11dd-9fdb-3debd5008f28
Diffstat (limited to 'Bootloaders/CDC/makefile')
| -rw-r--r-- | Bootloaders/CDC/makefile | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Bootloaders/CDC/makefile b/Bootloaders/CDC/makefile index 3e43a168..3b2e2db0 100644 --- a/Bootloaders/CDC/makefile +++ b/Bootloaders/CDC/makefile @@ -86,11 +86,13 @@ F_CLOCK = $(F_CPU) # Starting byte address of the bootloader, as a byte address - computed via the formula -# BOOT_START = ((TOTAL_FLASH_BYTES - BOOTLOADER_SECTION_SIZE_BYTES) * 1024) +# 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. -BOOT_START = 0x1E000 +FLASH_SIZE_KB = 128 +BOOT_SECTION_SIZE_KB = 4 +BOOT_START = 0x$(shell echo "obase=16; ($(FLASH_SIZE_KB) - $(BOOT_SECTION_SIZE_KB)) * 1024" | bc) # Output format. (can be srec, ihex, binary) |
