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/CDC/BootloaderCDC.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'Bootloaders/CDC') 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 #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: */ /** Version major of the CDC bootloader. */ #define BOOTLOADER_VERSION_MAJOR 0x01 -- cgit v1.2.3