}
/** Configures all hardware required for the bootloader. */
-void SetupHardware(void)
+static void SetupHardware(void)
{
/* Disable watchdog if enabled by bootloader/fuses */
MCUSR &= ~(1 << WDRF);
/** Task to read in AVR910 commands from the CDC data OUT endpoint, process them, perform the required actions
* and send the appropriate response back to the host.
*/
-void CDC_Task(void)
+static void CDC_Task(void)
{
/* Select the OUT endpoint */
Endpoint_SelectEndpoint(CDC_RX_EPNUM);
typedef void (*AppPtr_t)(void) ATTR_NO_RETURN;
/* Function Prototypes: */
- void CDC_Task(void);
- void SetupHardware(void);
+ static void CDC_Task(void);
+ static void SetupHardware(void);
void EVENT_USB_Device_ConfigurationChanged(void);
# bytes, and so will need to be doubled to obtain the byte address needed by AVR-GCC.
FLASH_SIZE_KB = 128
BOOT_SECTION_SIZE_KB = 4
+
+
+# Formulas used to calculate the starting address of the Bootloader section, and the User Application
+# API jump table (for more information on the latter, see the bootloader documentation). These formulas
+# should not need to be altered - modify the FLASH_SIZE_KB and BOOT_SECTION_KB values above instead.
BOOT_START = 0x$(shell echo "obase=16; ($(FLASH_SIZE_KB) - $(BOOT_SECTION_SIZE_KB)) * 1024" | bc)
BOOT_API_TABLESTART = 0x$(shell echo "obase=16; (($(FLASH_SIZE_KB) * 1024) - 32)" | bc)
}
/** Configures all hardware required for the bootloader. */
-void SetupHardware(void)
+static void SetupHardware(void)
{
/* Disable watchdog if enabled by bootloader/fuses */
MCUSR &= ~(1 << WDRF);
}
/** Resets all configured hardware required for the bootloader back to their original states. */
-void ResetHardware(void)
+static void ResetHardware(void)
{
/* Shut down the USB subsystem */
USB_Disable();
};
/* Function Prototypes: */
- void SetupHardware(void);
- void ResetHardware(void);
+ static void SetupHardware(void);
+ static void ResetHardware(void);
void EVENT_USB_Device_ControlRequest(void);
# bytes, and so will need to be doubled to obtain the byte address needed by AVR-GCC.
FLASH_SIZE_KB = 128
BOOT_SECTION_SIZE_KB = 4
+
+
+# Formulas used to calculate the starting address of the Bootloader section, and the User Application
+# API jump table (for more information on the latter, see the bootloader documentation). These formulas
+# should not need to be altered - modify the FLASH_SIZE_KB and BOOT_SECTION_KB values above instead.
BOOT_START = 0x$(shell echo "obase=16; ($(FLASH_SIZE_KB) - $(BOOT_SECTION_SIZE_KB)) * 1024" | bc)
BOOT_API_TABLESTART = 0x$(shell echo "obase=16; (($(FLASH_SIZE_KB) * 1024) - 32)" | bc)
}
/** Configures all hardware required for the bootloader. */
-void SetupHardware(void)
+static void SetupHardware(void)
{
/* Disable watchdog if enabled by bootloader/fuses */
MCUSR &= ~(1 << WDRF);
#define COMMAND_STARTAPPLICATION 0xFFFF
/* Function Prototypes: */
- void SetupHardware(void);
+ static void SetupHardware(void);
void EVENT_USB_Device_ConfigurationChanged(void);
void EVENT_USB_Device_UnhandledControlRequest(void);
# bytes, and so will need to be doubled to obtain the byte address needed by AVR-GCC.
FLASH_SIZE_KB = 128
BOOT_SECTION_SIZE_KB = 4
+
+
+# Formulas used to calculate the starting address of the Bootloader section. These formulas
+# should not need to be altered - modify the FLASH_SIZE_KB and BOOT_SECTION_KB values above instead.
BOOT_START = 0x$(shell echo "obase=16; ($(FLASH_SIZE_KB) - $(BOOT_SECTION_SIZE_KB)) * 1024" | bc)