Add checks to the bootloaders so that they will give a user-friendly compile error...
[pub/USBasp.git] / Bootloaders / CDC / BootloaderCDC.h
index b5d5e0b..76d579d 100644 (file)
                #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