Jump to correct bootloader address based on whether it's a 64x or 128x

This commit is contained in:
Doug Brown 2023-05-28 11:17:39 -07:00 committed by Doug Brown
parent a7fe6d9b39
commit 88e8f47bde

View File

@ -57,8 +57,16 @@ static inline void Board_EnterBootloader(void)
// close the port after the USB disconnect
DelayMS(2000);
// And, of course, go into the bootloader.
// Jump to the correct bootloader address based on whether this is an
// AT90USB128x or AT90USB64x
if (IsAT90USB128x())
{
__asm__ __volatile__ ( "jmp 0x1E000" );
}
else
{
__asm__ __volatile__ ( "jmp 0xE000" );
}
}
#endif /* HAL_AT90USB646_BOARD_HW_H_ */