diff options
author | Dean Camera <dean@fourwalledcubicle.com> | 2013-04-06 14:34:57 +0000 |
---|---|---|
committer | Dean Camera <dean@fourwalledcubicle.com> | 2013-04-06 14:34:57 +0000 |
commit | ace61d757e0c580365adfcd8464c28ca9f98f878 (patch) | |
tree | b511bed19f8b72d3a3b1243e0d862343335147e6 /Bootloaders/Printer | |
parent | 09ae9ad0046d827e6a9267bc8874a767b0078ae9 (diff) | |
download | lufa-ace61d757e0c580365adfcd8464c28ca9f98f878.tar.gz lufa-ace61d757e0c580365adfcd8464c28ca9f98f878.tar.bz2 lufa-ace61d757e0c580365adfcd8464c28ca9f98f878.zip |
Add checks to the bootloaders so that they will give a user-friendly compile error if not compiled with size optimizations.
Diffstat (limited to 'Bootloaders/Printer')
-rw-r--r-- | Bootloaders/Printer/BootloaderPrinter.h | 5 |
1 files changed, 5 insertions, 0 deletions
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 <LUFA/Drivers/USB/USB.h> #include <LUFA/Drivers/Board/LEDs.h> + /* 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 |