From ace61d757e0c580365adfcd8464c28ca9f98f878 Mon Sep 17 00:00:00 2001 From: Dean Camera Date: Sat, 6 Apr 2013 14:34:57 +0000 Subject: Add checks to the bootloaders so that they will give a user-friendly compile error if not compiled with size optimizations. --- Bootloaders/MassStorage/BootloaderMassStorage.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'Bootloaders/MassStorage') diff --git a/Bootloaders/MassStorage/BootloaderMassStorage.h b/Bootloaders/MassStorage/BootloaderMassStorage.h index 05b0eedfe..5e90739ad 100644 --- a/Bootloaders/MassStorage/BootloaderMassStorage.h +++ b/Bootloaders/MassStorage/BootloaderMassStorage.h @@ -50,6 +50,11 @@ #include #include + /* Preprocessor Checks: */ + #if !defined(__OPTIMIZE_SIZE__) + #error This bootloader requires that it be compiled for size, not speed for it to fit into the target device. + #endif + /* Macros: */ /** LED mask for the library LED driver, to indicate that the USB interface is not ready. */ #define LEDMASK_USB_NOTREADY LEDS_LED1 -- cgit v1.2.3