diff options
author | Zach Eveland <zeveland@blacklabel-development.com> | 2011-10-26 11:28:07 -0400 |
---|---|---|
committer | Zach Eveland <zeveland@blacklabel-development.com> | 2011-10-26 11:28:07 -0400 |
commit | bdfae9f7b7b7e34bc00acdf2889ba3dfaa1f3e87 (patch) | |
tree | eed22d8e0f94037dc452ad1fef6a2b262be91246 /bootloaders/nuevo_diskloader/src | |
parent | 6bf6a20d268679daf3a6d489dee2f8dca5e8e1a1 (diff) |
uploading now completes using RC2 on Win7
Diffstat (limited to 'bootloaders/nuevo_diskloader/src')
-rw-r--r-- | bootloaders/nuevo_diskloader/src/DiskLoader.cpp | 17 |
1 files changed, 4 insertions, 13 deletions
diff --git a/bootloaders/nuevo_diskloader/src/DiskLoader.cpp b/bootloaders/nuevo_diskloader/src/DiskLoader.cpp index 8088b7b..f611e17 100644 --- a/bootloaders/nuevo_diskloader/src/DiskLoader.cpp +++ b/bootloaders/nuevo_diskloader/src/DiskLoader.cpp @@ -6,7 +6,7 @@ //#include "USBCore.h" -//extern "C" +extern "C" void entrypoint(void) __attribute__ ((naked)) __attribute__ ((section (".vectors"))); void entrypoint(void) { @@ -15,8 +15,8 @@ void entrypoint(void) "out 0x3F, r1\n" // SREG "ldi r28, 0xFF\n" // Y-register "ldi r29, 0x0A\n" // Y-register -// "out 0x3E, r29\n" // SPH -// "out 0x3D, r28\n" // SPL + "out 0x3E, r29\n" // SPH + "out 0x3D, r28\n" // SPL "rjmp main" // Stack is all set up, start the main code ::); } @@ -28,7 +28,7 @@ volatile u16 _timeout; void Program(u8 ep, u16 page, u8 count) { - u8 write = page < 30*1024; // Don't write over firmware please + u8 write = page < 28*1024; // Don't write over firmware please if (write) boot_page_erase(page); @@ -126,11 +126,6 @@ int main() TX_LED_OFF(); RX_LED_OFF(); L_LED_OFF(); - - /* UART setup stuff */ - - /* end UART setup stuff */ - USB.attach(); sei(); @@ -143,9 +138,6 @@ int main() u16 address = 0; for (;;) { -// while (Serial.available() < 1) -// ; -// u8 cmd = Serial.read(); while (!USB_Available(CDC_RX)) ; u8 cmd = USB_Recv(CDC_RX); @@ -162,7 +154,6 @@ int main() } _timeout = 0; // Read params -// USB_Recv(CDC_RX, packet, len); USB_Recv_block(CDC_RX, packet, len); // Send a response |