static const uchar currentRequest = 0;
#endif
+static unsigned char wdtstatus;
+
static const uchar signatureBytes[4] = {
#ifdef SIGNATURE_BYTES
SIGNATURE_BYTES
USB_INTR_CFG = 0; /* also reset config bits */
GICR = (1 << IVCE); /* enable change of interrupt vectors */
GICR = (0 << IVSEL); /* move interrupts to application flash section */
+
+ WDTCR = wdtstatus;
+
/* We must go through a global function pointer variable instead of writing
* ((void (*)(void))0)();
* because the compiler optimizes a constant 0 to "rcall 0" which is not
int __attribute__((noreturn)) main(void)
{
/* initialize */
+ wdtstatus = WDTCR;
wdt_disable(); /* main app may have enabled watchdog */
bootLoaderInit();
odDebugInit();