From 33c6f74528b25663f62d7e0ad1be978abacdab56 Mon Sep 17 00:00:00 2001 From: Jack Humbert Date: Tue, 17 Oct 2017 16:57:14 -0400 Subject: [PATCH] allow bootloader size to be overwritten --- tmk_core/common/avr/bootloader.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/tmk_core/common/avr/bootloader.c b/tmk_core/common/avr/bootloader.c index 34db8d0b0..4f59d961e 100644 --- a/tmk_core/common/avr/bootloader.c +++ b/tmk_core/common/avr/bootloader.c @@ -56,14 +56,20 @@ * | Bootloader | 512B | Bootloader | 1KB * 0x7FFF +---------------+ 0x1FFFF +---------------+ */ + +#if !defined(BOOTLOADER_SIZE) && !defined(BOOTLOADER_START) + #warning To use bootloader_jump() you need to define BOOTLOADER_SIZE or BOOTLOADER_START in config.h. +#endif + #ifndef BOOTLOADER_SIZE -#warning To use bootloader_jump() you need to define BOOTLOADER_SIZE in config.h. #define BOOTLOADER_SIZE 4096 #endif #define FLASH_SIZE (FLASHEND + 1L) -#define BOOTLOADER_START (FLASH_SIZE - BOOTLOADER_SIZE) +#ifndef BOOTLOADER_START +#define BOOTLOADER_START (FLASH_SIZE - BOOTLOADER_SIZE) +#endif /* * Entering the Bootloader via Software