X-Git-Url: http://git.linex4red.de/pub/USBasp.git/blobdiff_plain/5995c3f880899b2573f1026ed6dc1c3c3a8e93d2..088bfb10b293828e4fd85bb388e6f9d842d90f4f:/Bootloaders/DFU/makefile diff --git a/Bootloaders/DFU/makefile b/Bootloaders/DFU/makefile index 061fb39b2..bcb908b1b 100644 --- a/Bootloaders/DFU/makefile +++ b/Bootloaders/DFU/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)