change the build-process of the updater (do some linker magic)
[pub/USBaspLoader.git] / updater / usbasploader.h
diff --git a/updater/usbasploader.h b/updater/usbasploader.h
new file mode 100644 (file)
index 0000000..1ff4764
--- /dev/null
@@ -0,0 +1,23 @@
+
+#ifndef FIRMWARE_H_5f27a7e9840141b1aa57eef07c1d939f
+#define FIRMWARE_H_5f27a7e9840141b1aa57eef07c1d939f 1
+
+#include <stdint.h>
+#include <avr/io.h>
+#include <avr/pgmspace.h>
+#include "../firmware/spminterface.h"
+
+#ifndef SIZEOF_new_firmware
+  #ifdef BOOTLOADER_ADDRESS
+    #define SIZEOF_new_firmware (((FLASHEND)+1)-(BOOTLOADER_ADDRESS))
+  #else
+    #error unable to determine binary size of firmware
+  #endif
+#endif
+
+
+extern const const uint16_t usbasploader[SIZEOF_new_firmware>>1] PROGMEM;
+const uint8_t *new_firmware    =       (void*)&usbasploader;
+
+#endif
+