aboutsummaryrefslogtreecommitdiff
path: root/cores/arduino
diff options
context:
space:
mode:
authorZach Eveland <zeveland@blacklabel-development.com>2011-09-08 19:31:18 -0400
committerZach Eveland <zeveland@blacklabel-development.com>2011-09-08 19:31:18 -0400
commite52cf0e4203bd6dda76c2544b0479548f465a0c7 (patch)
treec8914cca1f52b18971f7cf0b85f5b83b531e48df /cores/arduino
parent3b72c2343ab160290ccf1385829b168925052b8b (diff)
fixed bug where sketches over 28k caused subsequent auto-reset-and-upload attempts to fail. fixed bug in reboot routine, changed fuses to select 1024-word bootloader size, disabled hardware boot enable.
Diffstat (limited to 'cores/arduino')
-rw-r--r--cores/arduino/CDC.cpp10
1 files changed, 1 insertions, 9 deletions
diff --git a/cores/arduino/CDC.cpp b/cores/arduino/CDC.cpp
index 5059cec..14a0eae 100644
--- a/cores/arduino/CDC.cpp
+++ b/cores/arduino/CDC.cpp
@@ -23,19 +23,11 @@
#if defined(USBCON)
#ifdef CDC_ENABLED
-// TODO: Should really use the wdt here
-// Not currently working for a non-obvious reason
-
-typedef void (*AppPtr_t)(void) __attribute__ ((noreturn));
-AppPtr_t Bootloader = (AppPtr_t)(30*1024);
-
void Reboot()
{
USB.detach();
cli();
- Bootloader();
- //wdt_enable(WDTO_15MS);
- //while(1); // reboot
+ asm volatile("jmp 0x7800"); // jump to bootloader - DiskLoader takes up last 2 kB
}
typedef struct