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/Printer/BootloaderPrinter.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'Bootloaders/Printer/BootloaderPrinter.h') diff --git a/Bootloaders/Printer/BootloaderPrinter.h b/Bootloaders/Printer/BootloaderPrinter.h index 4995cdca9..22104c53f 100644 --- a/Bootloaders/Printer/BootloaderPrinter.h +++ b/Bootloaders/Printer/BootloaderPrinter.h @@ -47,6 +47,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