* USBaspLoader 2048
*/
#ifndef BOOTLOADER_SIZE
-#warn To use bootloader_jump() you need to define BOOTLOADER_SIZE in config.h.
+#warning To use bootloader_jump() you need to define BOOTLOADER_SIZE in config.h.
+#define BOOTLOADER_SIZE 4096
#endif
#define FLASH_SIZE (FLASHEND + 1L)
MCUSR &= ~(1<<WDRF);
wdt_disable();
- ((void (*)(void))BOOTLOADER_START)();
+ // This is compled into 'icall', address should be in word unit, not byte.
+ ((void (*)(void))(BOOTLOADER_START/2))();
}
}
ADCSRA = 0; TWCR = 0; UCSR0B = 0;
#endif
- // start Bootloader
- ((void (*)(void))BOOTLOADER_START)();
+ // This is compled into 'icall', address should be in word unit, not byte.
+ ((void (*)(void))(BOOTLOADER_START/2))();
}
#endif