aboutsummaryrefslogtreecommitdiff
path: root/common/bootloader.c
diff options
context:
space:
mode:
Diffstat (limited to 'common/bootloader.c')
-rw-r--r--common/bootloader.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/common/bootloader.c b/common/bootloader.c
index 43a7e47ce..cda295b18 100644
--- a/common/bootloader.c
+++ b/common/bootloader.c
@@ -71,7 +71,8 @@ void bootloader_jump_after_watchdog_reset(void)
71 MCUSR &= ~(1<<WDRF); 71 MCUSR &= ~(1<<WDRF);
72 wdt_disable(); 72 wdt_disable();
73 73
74 ((void (*)(void))BOOTLOADER_START)(); 74 // This is compled into 'icall', address should be in word unit, not byte.
75 ((void (*)(void))(BOOTLOADER_START/2))();
75 } 76 }
76} 77}
77 78
@@ -141,7 +142,7 @@ void bootloader_jump(void) {
141 ADCSRA = 0; TWCR = 0; UCSR0B = 0; 142 ADCSRA = 0; TWCR = 0; UCSR0B = 0;
142#endif 143#endif
143 144
144 // start Bootloader 145 // This is compled into 'icall', address should be in word unit, not byte.
145 ((void (*)(void))BOOTLOADER_START)(); 146 ((void (*)(void))(BOOTLOADER_START/2))();
146} 147}
147#endif 148#endif