]> git.friedersdorff.com Git - max/tmk_keyboard.git/commitdiff
core: Fix bootloader for 128KB flash
authortmk <hasu@tmk-kbd.com>
Wed, 4 Dec 2019 06:02:28 +0000 (15:02 +0900)
committertmk <hasu@tmk-kbd.com>
Wed, 4 Dec 2019 06:09:36 +0000 (15:09 +0900)
Got warning on bootloader address calculation when MCU has 128KB flash

tmk_core/common/avr/bootloader.c

index 8a1bec060601c63fe79d4a928a45753c059e1403..8abce9d818aa38bbf2c7d89ba0f4f270efc2f2c4 100644 (file)
@@ -138,6 +138,6 @@ void bootloader_jump_after_watchdog_reset(void)
 #endif
 
         // This is compled into 'icall', address should be in word unit, not byte.
-        ((void (*)(void))(BOOTLOADER_START / 2))();
+        ((void (*)(void))( (uint16_t)(BOOTLOADER_START / 2) ))();
     }
 }