Browse Source

Add build info to BIGBOOT images. Fix some minor bugs.

WestfW 6 years ago
parent
commit
8eb696369a

+ 17 - 2
optiboot/bootloaders/optiboot/Makefile

@@ -39,7 +39,7 @@
 # * This software is licensed under version 2 of the Gnu Public Licence.
 # * See optiboot.c for details.
 
-HELPTEXT = ""
+HELPTEXT = "\n"
 #----------------------------------------------------------------------
 #
 # program name should not be changed...
@@ -145,6 +145,20 @@ SIZE           = $(GCCROOT)avr-size
 # appropriate parameters ("-DLED_START_FLASHES=10") to gcc
 #
 
+ifdef PRODUCTION
+VERSION_CMD = -DPRODUCTION=1
+endif
+
+HELPTEXT += "Option CUSTOM_VERSION=nn     - set a customer version number\n"
+ifdef CUSTOM_VERSION
+ifneq ($(CUSTOM_VERSION), 0)
+VERSION_CMD = -DOPTIBOOT_CUSTOMVER=$(CUSTOM_VERSION)
+else
+VERSION_CMD = -DPRODUCTION=1
+endif
+dummy = FORCE
+endif
+
 HELPTEXT += "Option BAUD_RATE=nnnn        - set the bit rate for communications\n"
 ifdef BAUD_RATE
 BAUD_RATE_CMD = -DBAUD_RATE=$(BAUD_RATE)
@@ -218,6 +232,7 @@ endif
 COMMON_OPTIONS = $(BAUD_RATE_CMD) $(LED_START_FLASHES_CMD) $(BIGBOOT_CMD)
 COMMON_OPTIONS += $(SOFT_UART_CMD) $(LED_DATA_FLASH_CMD) $(LED_CMD) $(SS_CMD)
 COMMON_OPTIONS += $(SUPPORT_EEPROM_CMD) $(LED_START_ON_CMD)
+COMMON_OPTIONS += $(VERSION_CMD)
 
 #UART is handled separately and only passed for devices with more than one.
 HELPTEXT += "Option UART=n                - use UARTn for communications\n"
@@ -613,4 +628,4 @@ clean:
 	$(OBJCOPY) -j .text -j .data -j .version --set-section-flags .version=alloc,load -O binary $< $@
 
 help:
-	@echo $(HELPTEXT)
+	@echo -e $(HELPTEXT)

+ 9 - 0
optiboot/bootloaders/optiboot/info.sh

@@ -0,0 +1,9 @@
+#%/bin/bash
+for f in $*; do
+    echo
+    echo $f
+    avr-objcopy -I ihex -O binary $f /tmp/__optiboot_tmp.bin
+    avr-strings -a /tmp/__optiboot_tmp.bin
+done
+rm /tmp/__optiboot_tmp.bin
+

+ 75 - 2
optiboot/bootloaders/optiboot/optiboot.c

@@ -144,10 +144,20 @@
 /*  the optiboot source tree changes since v3.            */
 /* Version 5 was created at the time of the new Makefile  */
 /*  structure (Mar, 2013), even though no binaries changed*/
+/* Version 6 added EEPROM support, including causing an   */
+/*  error when trying to write eeprom with versions that  */
+/*  didn't have the code there. Makefiles were further    */
+/*  restructured.  Overlapping SPM/download removed.      */
+/* Version 7 straightened out the MCUSR and RESET         */
+/*  handling, did MORE Makefile mods.  EEPROM support now */
+/*  fits in 512 bytes, if you turn off LED Blinking.      */
+/*  Various bigboot and virboot targets were fixed.       */
+/*                                                        */
 /* It would be good if versions implemented outside the   */
 /*  official repository used an out-of-seqeunce version   */
 /*  number (like 104.6 if based on based on 4.5) to       */
-/*  prevent collisions.                                   */
+/*  prevent collisions.  The CUSTOM_VERSION=n option      */
+/*  adds n to the high version to facilitate this.        */
 /*                                                        */
 /**********************************************************/
 
@@ -386,7 +396,7 @@ uint8_t __attribute__((noinline)) getch(void);
 void __attribute__((noinline)) verifySpace();
 void __attribute__((noinline)) watchdogConfig(uint8_t x);
 
-static inline void getNch(uint8_t);
+static void getNch(uint8_t);
 #if LED_START_FLASHES > 0
 static inline void flash_led(uint8_t);
 #endif
@@ -1058,3 +1068,66 @@ static inline void read_mem(uint8_t memtype, addr16_t address, pagelen_t length)
 	break;
     } // switch
 }
+
+
+#ifdef BIGBOOT
+/*
+ * Optiboot is designed to fit in 512 bytes, with a minimum feature set.
+ * Some chips have a minimum bootloader size of 1024 bytes, and sometimes
+ * it is desirable to add extra features even though 512bytes is exceedded.
+ * In that case, the BIGBOOT can be used.
+ * Our extra features so far don't come close to filling 1k, so we can
+ * add extra "frivolous" data to the image.   In particular, we can add
+ * information about how Optiboot was built (which options were selected,
+ * what version, all in human-readable form (and extractable from the
+ * binary with avr-strings.)
+ * 
+ * This can always be removed or trimmed if more actual program space
+ * is needed in the future.  Currently the data occupies about 160 bytes,
+ */
+#define xstr(s) str(s)
+#define str(s) #s
+#define OPT2FLASH(o) char f##o[] = #o "=" xstr(o)
+
+
+#ifdef LED_START_FLASHES
+OPT2FLASH(LED_START_FLASHES);
+#endif
+#ifdef LED_DATA_FLASH
+OPT2FLASH(LED_DATA_FLASH);
+#endif
+#ifdef LED_START_ON
+OPT2FLASH(LED_START_ON);
+#endif
+#ifdef LED_NAME
+char f_LED[] = "LED=" LED_NAME;
+#endif
+
+#ifdef SUPPORT_EEPROM
+OPT2FLASH(SUPPORT_EEPROM);
+#endif
+#ifdef BAUD_RATE
+OPT2FLASH(BAUD_RATE);
+#endif
+#ifdef SOFT_UART
+OPT2FLASH(SOFT_UART);
+#endif
+#ifdef UART
+OPT2FLASH(UART);
+#endif
+
+char f_date[] = "Built:" __DATE__ ":" __TIME__;
+#ifdef BIGBOOT
+OPT2FLASH(BIGBOOT);
+#endif
+#ifdef VIRTUAL_BOOT_PARTITION
+char f_boot[] = "Virtual_Boot_Partition";
+#endif
+OPT2FLASH(F_CPU);
+char f_device[] = "Device=" xstr(__AVR_DEVICE_NAME__);
+#ifdef OPTIBOOT_CUSTOMVER
+OPT2FLASH(OPTIBOOT_CUSTOMVER);
+#endif
+char f_version[] = "Version=" xstr(OPTIBOOT_MAJVER) "." xstr(OPTIBOOT_MINVER);
+
+#endif

+ 88 - 0
optiboot/bootloaders/optiboot/pin_defs.h

@@ -340,48 +340,56 @@
  * to #if C0 == B0, and then to #if 0x301 == 0x201
  */
 #if LED == B0
+#define LED_NAME "B0"
 #undef LED
 #define LED_DDR     DDRB
 #define LED_PORT    PORTB
 #define LED_PIN     PINB
 #define LED	    PINB0
 #elif LED == B1
+#define LED_NAME "B1"
 #undef LED
 #define LED_DDR     DDRB
 #define LED_PORT    PORTB
 #define LED_PIN     PINB
 #define LED	    PINB1
 #elif LED == B2
+#define LED_NAME "B2"
 #undef LED
 #define LED_DDR     DDRB
 #define LED_PORT    PORTB
 #define LED_PIN     PINB
 #define LED	    PINB2
 #elif LED == B3
+#define LED_NAME "B3"
 #undef LED
 #define LED_DDR     DDRB
 #define LED_PORT    PORTB
 #define LED_PIN     PINB
 #define LED	    PINB3
 #elif LED == B4
+#define LED_NAME "B4"
 #undef LED
 #define LED_DDR     DDRB
 #define LED_PORT    PORTB
 #define LED_PIN     PINB
 #define LED	    PINB4
 #elif LED == B5
+#define LED_NAME "B5"
 #undef LED
 #define LED_DDR     DDRB
 #define LED_PORT    PORTB
 #define LED_PIN     PINB
 #define LED	    PINB5
 #elif LED == B6
+#define LED_NAME "B6"
 #undef LED
 #define LED_DDR     DDRB
 #define LED_PORT    PORTB
 #define LED_PIN     PINB
 #define LED	    PINB6
 #elif LED == B7
+#define LED_NAME "B7"
 #undef LED
 #define LED_DDR     DDRB
 #define LED_PORT    PORTB
@@ -389,48 +397,56 @@
 #define LED	    PINB7
 
 #elif LED == C0
+#define LED_NAME "C0"
 #undef LED
 #define LED_DDR     DDRC
 #define LED_PORT    PORTC
 #define LED_PIN     PINC
 #define LED	    PINC0
 #elif LED == C1
+#define LED_NAME "C1"
 #undef LED
 #define LED_DDR     DDRC
 #define LED_PORT    PORTC
 #define LED_PIN     PINC
 #define LED	    PINC1
 #elif LED == C2
+#define LED_NAME "C2"
 #undef LED
 #define LED_DDR     DDRC
 #define LED_PORT    PORTC
 #define LED_PIN     PINC
 #define LED	    PINC2
 #elif LED == C3
+#define LED_NAME "C3"
 #undef LED
 #define LED_DDR     DDRC
 #define LED_PORT    PORTC
 #define LED_PIN     PINC
 #define LED	    PINC3
 #elif LED == C4
+#define LED_NAME "C4"
 #undef LED
 #define LED_DDR     DDRC
 #define LED_PORT    PORTC
 #define LED_PIN     PINC
 #define LED	    PINC4
 #elif LED == C5
+#define LED_NAME "C5"
 #undef LED
 #define LED_DDR     DDRC
 #define LED_PORT    PORTC
 #define LED_PIN     PINC
 #define LED	    PINC5
 #elif LED == C6
+#define LED_NAME "C6"
 #undef LED
 #define LED_DDR     DDRC
 #define LED_PORT    PORTC
 #define LED_PIN     PINC
 #define LED	    PINC6
 #elif LED == C7
+#define LED_NAME "C7"
 #undef LED
 #define LED_DDR     DDRC
 #define LED_PORT    PORTC
@@ -438,48 +454,56 @@
 #define LED	    PINC7
 
 #elif LED == D0
+#define LED_NAME "D0"
 #undef LED
 #define LED_DDR     DDRD
 #define LED_PORT    PORTD
 #define LED_PIN     PIND
 #define LED	    PIND0
 #elif LED == D1
+#define LED_NAME "D1"
 #undef LED
 #define LED_DDR     DDRD
 #define LED_PORT    PORTD
 #define LED_PIN     PIND
 #define LED	    PIND1
 #elif LED == D2
+#define LED_NAME "D2"
 #undef LED
 #define LED_DDR     DDRD
 #define LED_PORT    PORTD
 #define LED_PIN     PIND
 #define LED	    PIND2
 #elif LED == D3
+#define LED_NAME "D3"
 #undef LED
 #define LED_DDR     DDRD
 #define LED_PORT    PORTD
 #define LED_PIN     PIND
 #define LED	    PIND3
 #elif LED == D4
+#define LED_NAME "D4"
 #undef LED
 #define LED_DDR     DDRD
 #define LED_PORT    PORTD
 #define LED_PIN     PIND
 #define LED	    PIND4
 #elif LED == D5
+#define LED_NAME "D5"
 #undef LED
 #define LED_DDR     DDRD
 #define LED_PORT    PORTD
 #define LED_PIN     PIND
 #define LED	    PIND5
 #elif LED == D6
+#define LED_NAME "D6"
 #undef LED
 #define LED_DDR     DDRD
 #define LED_PORT    PORTD
 #define LED_PIN     PIND
 #define LED	    PIND6
 #elif LED == D7
+#define LED_NAME "D7"
 #undef LED
 #define LED_DDR     DDRD
 #define LED_PORT    PORTD
@@ -487,48 +511,56 @@
 #define LED	    PIND7
 
 #elif LED == E0
+#define LED_NAME "E0"
 #undef LED
 #define LED_DDR     DDRE
 #define LED_PORT    PORTE
 #define LED_PIN     PINE
 #define LED	    PINE0
 #elif LED == E1
+#define LED_NAME "E1"
 #undef LED
 #define LED_DDR     DDRE
 #define LED_PORT    PORTE
 #define LED_PIN     PINE
 #define LED	    PINE1
 #elif LED == E2
+#define LED_NAME "E2"
 #undef LED
 #define LED_DDR     DDRE
 #define LED_PORT    PORTE
 #define LED_PIN     PINE
 #define LED	    PINE2
 #elif LED == E3
+#define LED_NAME "E3"
 #undef LED
 #define LED_DDR     DDRE
 #define LED_PORT    PORTE
 #define LED_PIN     PINE
 #define LED	    PINE3
 #elif LED == E4
+#define LED_NAME "E4"
 #undef LED
 #define LED_DDR     DDRE
 #define LED_PORT    PORTE
 #define LED_PIN     PINE
 #define LED	    PINE4
 #elif LED == E5
+#define LED_NAME "E5"
 #undef LED
 #define LED_DDR     DDRE
 #define LED_PORT    PORTE
 #define LED_PIN     PINE
 #define LED	    PINE5
 #elif LED == E6
+#define LED_NAME "E6"
 #undef LED
 #define LED_DDR     DDRE
 #define LED_PORT    PORTE
 #define LED_PIN     PINE
 #define LED	    PINE6
 #elif LED == E7
+#define LED_NAME "E7"
 #undef LED
 #define LED_DDR     DDRE
 #define LED_PORT    PORTE
@@ -536,48 +568,56 @@
 #define LED	    PINE7
 
 #elif LED == F0
+#define LED_NAME "F0"
 #undef LED
 #define LED_DDR     DDRF
 #define LED_PORT    PORTF
 #define LED_PIN     PINF
 #define LED	    PINF0
 #elif LED == F1
+#define LED_NAME "F1"
 #undef LED
 #define LED_DDR     DDRF
 #define LED_PORT    PORTF
 #define LED_PIN     PINF
 #define LED	    PINF1
 #elif LED == F2
+#define LED_NAME "F2"
 #undef LED
 #define LED_DDR     DDRF
 #define LED_PORT    PORTF
 #define LED_PIN     PINF
 #define LED	    PINF2
 #elif LED == F3
+#define LED_NAME "F3"
 #undef LED
 #define LED_DDR     DDRF
 #define LED_PORT    PORTF
 #define LED_PIN     PINF
 #define LED	    PINF3
 #elif LED == F4
+#define LED_NAME "F4"
 #undef LED
 #define LED_DDR     DDRF
 #define LED_PORT    PORTF
 #define LED_PIN     PINF
 #define LED	    PINF4
 #elif LED == F5
+#define LED_NAME "F5"
 #undef LED
 #define LED_DDR     DDRF
 #define LED_PORT    PORTF
 #define LED_PIN     PINF
 #define LED	    PINF5
 #elif LED == F6
+#define LED_NAME "F6"
 #undef LED
 #define LED_DDR     DDRF
 #define LED_PORT    PORTF
 #define LED_PIN     PINF
 #define LED	    PINF6
 #elif LED == F7
+#define LED_NAME "F7"
 #undef LED
 #define LED_DDR     DDRF
 #define LED_PORT    PORTF
@@ -585,48 +625,56 @@
 #define LED	    PINF7
 
 #elif LED == G0
+#define LED_NAME "G0"
 #undef LED
 #define LED_DDR     DDRG
 #define LED_PORT    PORTG
 #define LED_PIN     PING
 #define LED	    PING0
 #elif LED == G1
+#define LED_NAME "G1"
 #undef LED
 #define LED_DDR     DDRG
 #define LED_PORT    PORTG
 #define LED_PIN     PING
 #define LED	    PING1
 #elif LED == G2
+#define LED_NAME "G2"
 #undef LED
 #define LED_DDR     DDRG
 #define LED_PORT    PORTG
 #define LED_PIN     PING
 #define LED	    PING2
 #elif LED == G3
+#define LED_NAME "G3"
 #undef LED
 #define LED_DDR     DDRG
 #define LED_PORT    PORTG
 #define LED_PIN     PING
 #define LED	    PING3
 #elif LED == G4
+#define LED_NAME "G4"
 #undef LED
 #define LED_DDR     DDRG
 #define LED_PORT    PORTG
 #define LED_PIN     PING
 #define LED	    PING4
 #elif LED == G5
+#define LED_NAME "G5"
 #undef LED
 #define LED_DDR     DDRG
 #define LED_PORT    PORTG
 #define LED_PIN     PING
 #define LED	    PING5
 #elif LED == G6
+#define LED_NAME "G6"
 #undef LED
 #define LED_DDR     DDRG
 #define LED_PORT    PORTG
 #define LED_PIN     PING
 #define LED	    PING6
 #elif LED == G7
+#define LED_NAME "G7"
 #undef LED
 #define LED_DDR     DDRG
 #define LED_PORT    PORTG
@@ -634,48 +682,56 @@
 #define LED	    PING7
 
 #elif LED == H0
+#define LED_NAME "H0"
 #undef LED
 #define LED_DDR     DDRH
 #define LED_PORT    PORTH
 #define LED_PIN     PINH
 #define LED	    PINH0
 #elif LED == H1
+#define LED_NAME "H1"
 #undef LED
 #define LED_DDR     DDRH
 #define LED_PORT    PORTH
 #define LED_PIN     PINH
 #define LED	    PINH1
 #elif LED == H2
+#define LED_NAME "H2"
 #undef LED
 #define LED_DDR     DDRH
 #define LED_PORT    PORTH
 #define LED_PIN     PINH
 #define LED	    PINH2
 #elif LED == H3
+#define LED_NAME "H3"
 #undef LED
 #define LED_DDR     DDRH
 #define LED_PORT    PORTH
 #define LED_PIN     PINH
 #define LED	    PINH3
 #elif LED == H4
+#define LED_NAME "H4"
 #undef LED
 #define LED_DDR     DDRH
 #define LED_PORT    PORTH
 #define LED_PIN     PINH
 #define LED	    PINH4
 #elif LED == H5
+#define LED_NAME "H5"
 #undef LED
 #define LED_DDR     DDRH
 #define LED_PORT    PORTH
 #define LED_PIN     PINH
 #define LED	    PINH5
 #elif LED == H6
+#define LED_NAME "H6"
 #undef LED
 #define LED_DDR     DDRH
 #define LED_PORT    PORTH
 #define LED_PIN     PINH
 #define LED	    PINH6
 #elif LED == H7
+#define LED_NAME "H7"
 #undef LED
 #define LED_DDR     DDRH
 #define LED_PORT    PORTH
@@ -683,48 +739,56 @@
 #define LED	    PINH7
 
 #elif LED == J0
+#define LED_NAME "J0"
 #undef LED
 #define LED_DDR     DDRJ
 #define LED_PORT    PORTJ
 #define LED_PIN     PINJ
 #define LED	    PINJ0
 #elif LED == J1
+#define LED_NAME "J1"
 #undef LED
 #define LED_DDR     DDRJ
 #define LED_PORT    PORTJ
 #define LED_PIN     PINJ
 #define LED	    PINJ1
 #elif LED == J2
+#define LED_NAME "J2"
 #undef LED
 #define LED_DDR     DDRJ
 #define LED_PORT    PORTJ
 #define LED_PIN     PINJ
 #define LED	    PINJ2
 #elif LED == J3
+#define LED_NAME "J3"
 #undef LED
 #define LED_DDR     DDRJ
 #define LED_PORT    PORTJ
 #define LED_PIN     PINJ
 #define LED	    PINJ3
 #elif LED == J4
+#define LED_NAME "J4"
 #undef LED
 #define LED_DDR     DDRJ
 #define LED_PORT    PORTJ
 #define LED_PIN     PINJ
 #define LED	    PINJ4
 #elif LED == J5
+#define LED_NAME "J5"
 #undef LED
 #define LED_DDR     DDRJ
 #define LED_PORT    PORTJ
 #define LED_PIN     PINJ
 #define LED	    PINJ5
 #elif LED == J6
+#define LED_NAME "J6"
 #undef LED
 #define LED_DDR     DDRJ
 #define LED_PORT    PORTJ
 #define LED_PIN     PINJ
 #define LED	    PINJ6
 #elif LED == J7
+#define LED_NAME "J7"
 #undef LED
 #define LED_DDR     DDRJ
 #define LED_PORT    PORTJ
@@ -732,48 +796,56 @@
 #define LED	    PINJ7
 
 #elif LED == K0
+#define LED_NAME "K0"
 #undef LED
 #define LED_DDR     DDRK
 #define LED_PORT    PORTK
 #define LED_PIN     PINK
 #define LED	    PINK0
 #elif LED == K1
+#define LED_NAME "K1"
 #undef LED
 #define LED_DDR     DDRK
 #define LED_PORT    PORTK
 #define LED_PIN     PINK
 #define LED	    PINK1
 #elif LED == K2
+#define LED_NAME "K2"
 #undef LED
 #define LED_DDR     DDRK
 #define LED_PORT    PORTK
 #define LED_PIN     PINK
 #define LED	    PINK2
 #elif LED == K3
+#define LED_NAME "K3"
 #undef LED
 #define LED_DDR     DDRK
 #define LED_PORT    PORTK
 #define LED_PIN     PINK
 #define LED	    PINK3
 #elif LED == K4
+#define LED_NAME "K4"
 #undef LED
 #define LED_DDR     DDRK
 #define LED_PORT    PORTK
 #define LED_PIN     PINK
 #define LED	    PINK4
 #elif LED == K5
+#define LED_NAME "K5"
 #undef LED
 #define LED_DDR     DDRK
 #define LED_PORT    PORTK
 #define LED_PIN     PINK
 #define LED	    PINK5
 #elif LED == K6
+#define LED_NAME "K6"
 #undef LED
 #define LED_DDR     DDRK
 #define LED_PORT    PORTK
 #define LED_PIN     PINK
 #define LED	    PINK6
 #elif LED == K7
+#define LED_NAME "K7"
 #undef LED
 #define LED_DDR     DDRK
 #define LED_PORT    PORTK
@@ -781,48 +853,56 @@
 #define LED	    PINK7
 
 #elif LED == L0
+#define LED_NAME "L0"
 #undef LED
 #define LED_DDR     DDRL
 #define LED_PORT    PORTL
 #define LED_PIN     PINL
 #define LED	    PINL0
 #elif LED == L1
+#define LED_NAME "L1"
 #undef LED
 #define LED_DDR     DDRL
 #define LED_PORT    PORTL
 #define LED_PIN     PINL
 #define LED	    PINL1
 #elif LED == L2
+#define LED_NAME "L2"
 #undef LED
 #define LED_DDR     DDRL
 #define LED_PORT    PORTL
 #define LED_PIN     PINL
 #define LED	    PINL2
 #elif LED == L3
+#define LED_NAME "L3"
 #undef LED
 #define LED_DDR     DDRL
 #define LED_PORT    PORTL
 #define LED_PIN     PINL
 #define LED	    PINL3
 #elif LED == L4
+#define LED_NAME "L4"
 #undef LED
 #define LED_DDR     DDRL
 #define LED_PORT    PORTL
 #define LED_PIN     PINL
 #define LED	    PINL4
 #elif LED == L5
+#define LED_NAME "L5"
 #undef LED
 #define LED_DDR     DDRL
 #define LED_PORT    PORTL
 #define LED_PIN     PINL
 #define LED	    PINL5
 #elif LED == L6
+#define LED_NAME "L6"
 #undef LED
 #define LED_DDR     DDRL
 #define LED_PORT    PORTL
 #define LED_PIN     PINL
 #define LED	    PINL6
 #elif LED == L7
+#define LED_NAME "L7"
 #undef LED
 #define LED_DDR     DDRL
 #define LED_PORT    PORTL
@@ -830,48 +910,56 @@
 #define LED	    PINL7
 
 #elif LED == A0
+#define LED_NAME "A0"
 #undef LED
 #define LED_DDR     DDRA
 #define LED_PORT    PORTA
 #define LED_PIN     PINA
 #define LED	    PINA0
 #elif LED == A1
+#define LED_NAME "A1"
 #undef LED
 #define LED_DDR     DDRA
 #define LED_PORT    PORTA
 #define LED_PIN     PINA
 #define LED	    PINA1
 #elif LED == A2
+#define LED_NAME "A2"
 #undef LED
 #define LED_DDR     DDRA
 #define LED_PORT    PORTA
 #define LED_PIN     PINA
 #define LED	    PINA2
 #elif LED == A3
+#define LED_NAME "A3"
 #undef LED
 #define LED_DDR     DDRA
 #define LED_PORT    PORTA
 #define LED_PIN     PINA
 #define LED	    PINA3
 #elif LED == A4
+#define LED_NAME "A4"
 #undef LED
 #define LED_DDR     DDRA
 #define LED_PORT    PORTA
 #define LED_PIN     PINA
 #define LED	    PINA4
 #elif LED == A5
+#define LED_NAME "A5"
 #undef LED
 #define LED_DDR     DDRA
 #define LED_PORT    PORTA
 #define LED_PIN     PINA
 #define LED	    PINA5
 #elif LED == A6
+#define LED_NAME "A6"
 #undef LED
 #define LED_DDR     DDRA
 #define LED_PORT    PORTA
 #define LED_PIN     PINA
 #define LED	    PINA6
 #elif LED == A7
+#define LED_NAME "A7"
 #undef LED
 #define LED_DDR     DDRA
 #define LED_PORT    PORTA

+ 2 - 2
optiboot/package_optiboot_optiboot-additional_index.json.TEMPLATE

@@ -30,8 +30,8 @@
           "help": {
 	    "online": "https://github.com/Optiboot/optiboot/wiki"
           },
-          "url": "https://github.com/Optiboot/optiboot/releases/download/v%VERSION%/Optiboot%VERSION%.zip",
-          "archiveFileName": "optiboot%VERSION%.zip",
+          "url": "https://github.com/Optiboot/optiboot/releases/download/v%VERSION%/Optiboot-%VERSION%.zip",
+          "archiveFileName": "optiboot-%VERSION%.zip",
 #
 # Package file verification data
 #