aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZach Eveland <zeveland@blacklabel-development.com>2011-10-21 17:25:59 -0400
committerZach Eveland <zeveland@blacklabel-development.com>2011-10-21 17:25:59 -0400
commit629788e47c757432178f8a1b6855d10d665e6550 (patch)
tree0e94e39dc59d5d1c25d735ea2787f8d5563e5b35
parentad95bc05f498d1748299fa1ea6838d16f03064be (diff)
cleaning up code and comments in main - getting rid of leftover stuff from experiments
-rw-r--r--bootloaders/nuevo_diskloader/src/DiskLoader.cpp12
1 files changed, 5 insertions, 7 deletions
diff --git a/bootloaders/nuevo_diskloader/src/DiskLoader.cpp b/bootloaders/nuevo_diskloader/src/DiskLoader.cpp
index 10544d1..83ffc1b 100644
--- a/bootloaders/nuevo_diskloader/src/DiskLoader.cpp
+++ b/bootloaders/nuevo_diskloader/src/DiskLoader.cpp
@@ -19,17 +19,15 @@ void entrypoint(void)
::);
}
-ISR(BADISR_vect)
-{
- L_LED_ON();
-}
-
int main(void) __attribute__ ((naked));
int main()
-{
-
+{
wdt_disable();
BOARD_INIT();
+ /* move interrupts to boot section:
+ * uses inline assembly because the procedure must be completed in four cycles.
+ * seems to fail if called before disabling WDT and calling BOARD_INIT()
+ */
asm volatile (
"ldi r16, 0x01\n" // (1<<IVCE) /* Enable change of interrupt vectors */
"out 0x35, r16\n" // MCUCR