Revert "save some more memory in case "BOOTLOADER_CAN_EXIT" is deactivated"
[pub/USBaspLoader.git] / firmware / main.c
index 3fb4902..e2bf1f6 100644 (file)
 #include <string.h>
 
 
-#include "bootloaderconfig.h"
-#include "usbdrv/usbdrv.c"
 
-#if BOOTLOADER_CAN_EXIT
 static void leaveBootloader() __attribute__((__noreturn__));
-#endif
+
+#include "bootloaderconfig.h"
+#include "usbdrv/usbdrv.c"
 
 #ifndef BOOTLOADER_ADDRESS
   #error need to know the bootloaders flash address!
@@ -180,7 +179,6 @@ static const uchar  signatureBytes[4] = {
 
 /* ------------------------------------------------------------------------ */
 
-#if BOOTLOADER_CAN_EXIT
 static void (*nullVector)(void) __attribute__((__noreturn__));
 
 static void leaveBootloader()
@@ -201,7 +199,6 @@ static void leaveBootloader()
  */
     nullVector();
 }
-#endif
 
 /* ------------------------------------------------------------------------ */
 
@@ -454,9 +451,7 @@ int __attribute__((noreturn)) main(void)
         }while (1);            /* main event loop */
 #endif
     }
-#if BOOTLOADER_CAN_EXIT
     leaveBootloader();
-#endif
 }
 
 /* ------------------------------------------------------------------------ */