projects
/
pub
/
USBasp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Change bootloader makefiles to automatically compute the bootloader starting address...
[pub/USBasp.git]
/
Bootloaders
/
DFU
/
makefile
diff --git
a/Bootloaders/DFU/makefile
b/Bootloaders/DFU/makefile
index
d82eaff
..
bcb908b
100644
(file)
--- 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
# 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.
#
# 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)
# Output format. (can be srec, ihex, binary)
@@
-122,7
+124,6
@@
LUFA_OPTS += -D USE_STATIC_OPTIONS="(USB_DEVICE_OPT_FULLSPEED | USB_OPT_REG_ENAB
LUFA_OPTS += -D NO_INTERNAL_SERIAL
LUFA_OPTS += -D NO_DEVICE_SELF_POWER
LUFA_OPTS += -D NO_DEVICE_REMOTE_WAKEUP
LUFA_OPTS += -D NO_INTERNAL_SERIAL
LUFA_OPTS += -D NO_DEVICE_SELF_POWER
LUFA_OPTS += -D NO_DEVICE_REMOTE_WAKEUP
-LUFA_OPTS += -D NO_STREAM_CALLBACKS
LUFA_OPTS += -D NO_SOF_EVENTS
LUFA_OPTS += -D NO_SOF_EVENTS