From 9c15f6e5caee526aa429112318df096ec7b46355 Mon Sep 17 00:00:00 2001 From: Jenna Fox Date: Wed, 26 Sep 2012 01:09:14 +1000 Subject: instructions in makefile on how to calculate BOOTLOADER_ADDRESS --- firmware/Makefile | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'firmware/Makefile') diff --git a/firmware/Makefile b/firmware/Makefile index 0e38760..403786a 100644 --- a/firmware/Makefile +++ b/firmware/Makefile @@ -17,13 +17,16 @@ F_CPU = 16500000 DEVICE = attiny85 -# BOOTLOADER_ADDRESS is 1800 for 8k devices, 3800 for 16k and 7800 for 32k. -# Can be on the start of any flash page for ATtiny85, but must be set low enough so there is space for the full boot loader -# BOOTLOADER_ADDRESS is in units of 4 bytes seems like -BOOTLOADER_ADDRESS = 1740 FUSEOPT = $(FUSEOPT_t85) LOCKOPT = -U lock:w:0x2f:m +# hexadecimal address for bootloader section to begin. To calculate the best value: +# - make clean; make main.hex; ### output will list data: 2124 (or something like that) +# - for the size of your device (8kb = 1024 * 8 = 8192) subtract above value 2124... = 6068 +# - How many pages in is that? 6068 / 64 (tiny85 page size in bytes) = 94.8125 +# - round that down to 94 - our new bootloader address is 94 * 64 = 6016, in hex = 1780 +BOOTLOADER_ADDRESS = 1780 + PROGRAMMER = -c USBasp # PROGRAMMER contains AVRDUDE options to address your programmer -- cgit v1.2.3