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/CDC | |
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/CDC')
-rw-r--r-- | Bootloaders/CDC/BootloaderCDC.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Bootloaders/CDC/BootloaderCDC.h b/Bootloaders/CDC/BootloaderCDC.h index b5d5e0b02..76d579d26 100644 --- a/Bootloaders/CDC/BootloaderCDC.h +++ b/Bootloaders/CDC/BootloaderCDC.h @@ -52,6 +52,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: */ /** Version major of the CDC bootloader. */ #define BOOTLOADER_VERSION_MAJOR 0x01 |