mirror of https://github.com/noisymime/Arduino.git
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.
This commit is contained in:
parent
c0b45364b8
commit
db7013f95c
|
@ -5,12 +5,12 @@ leonardo.upload.protocol=arduino
|
||||||
leonardo.upload.maximum_size=30720
|
leonardo.upload.maximum_size=30720
|
||||||
leonardo.upload.speed=1200
|
leonardo.upload.speed=1200
|
||||||
leonardo.bootloader.low_fuses=0xde
|
leonardo.bootloader.low_fuses=0xde
|
||||||
leonardo.bootloader.high_fuses=0xd8
|
leonardo.bootloader.high_fuses=0xda
|
||||||
leonardo.bootloader.extended_fuses=0xf3
|
leonardo.bootloader.extended_fuses=0xcb
|
||||||
leonardo.bootloader.path=diskloader
|
leonardo.bootloader.path=diskloader
|
||||||
leonardo.bootloader.file=DiskLoader.hex
|
leonardo.bootloader.file=DiskLoader.hex
|
||||||
leonardo.bootloader.unlock_bits=0x3F
|
leonardo.bootloader.unlock_bits=0x3F
|
||||||
leonardo.bootloader.lock_bits=0x0F
|
leonardo.bootloader.lock_bits=0x2F
|
||||||
leonardo.build.mcu=atmega32u4
|
leonardo.build.mcu=atmega32u4
|
||||||
leonardo.build.f_cpu=16000000L
|
leonardo.build.f_cpu=16000000L
|
||||||
leonardo.build.core=arduino
|
leonardo.build.core=arduino
|
||||||
|
|
|
@ -23,19 +23,11 @@
|
||||||
#if defined(USBCON)
|
#if defined(USBCON)
|
||||||
#ifdef CDC_ENABLED
|
#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()
|
void Reboot()
|
||||||
{
|
{
|
||||||
USB.detach();
|
USB.detach();
|
||||||
cli();
|
cli();
|
||||||
Bootloader();
|
asm volatile("jmp 0x7800"); // jump to bootloader - DiskLoader takes up last 2 kB
|
||||||
//wdt_enable(WDTO_15MS);
|
|
||||||
//while(1); // reboot
|
|
||||||
}
|
}
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
|
|
Loading…
Reference in New Issue