Mike's Bootloader integrated
This commit is contained in:
@@ -556,8 +556,19 @@ void i2cInit()
|
||||
NVIC_EnableIRQ(TWI0_IRQn) ;
|
||||
}
|
||||
|
||||
extern const uint8_t BootCode[];
|
||||
|
||||
void boardInit()
|
||||
{
|
||||
// TODO this is not clean, completely unuseful, but prevents the bootloader from being optimized away...
|
||||
uint8_t dummy[3];
|
||||
memcpy(&dummy, BootCode, sizeof(dummy));
|
||||
for (unsigned int i=0; i<sizeof(dummy); i++) {
|
||||
if (dummy[i] == 0) {
|
||||
__asm("nop");
|
||||
}
|
||||
}
|
||||
|
||||
register Pio *pioptr ;
|
||||
|
||||
ResetReason = RSTC->RSTC_SR;
|
||||
|
||||
Reference in New Issue
Block a user