Merge pull request #1093 from stefanrueger/gemmaBoot
Create two bootloader programmers for gemmaBoot boards
This commit is contained in:
commit
3b8ac76246
|
@ -1458,6 +1458,38 @@ programmer
|
|||
usbpid = 0x0c9f;
|
||||
;
|
||||
|
||||
#------------------------------------------------------------
|
||||
# arduino_gemma
|
||||
#------------------------------------------------------------
|
||||
|
||||
# https://github.com/arduino/ArduinoCore-avr/tree/master/bootloaders/gemma
|
||||
|
||||
programmer
|
||||
id = "arduino_gemma";
|
||||
desc = "Arduino Gemma bootloader disguised as USBtiny";
|
||||
type = "usbtiny";
|
||||
prog_modes = PM_SPM;
|
||||
connection_type = usb;
|
||||
usbvid = 0x2341;
|
||||
usbpid = 0x0c9f;
|
||||
;
|
||||
|
||||
#------------------------------------------------------------
|
||||
# adafruit_gemma
|
||||
#------------------------------------------------------------
|
||||
|
||||
# https://github.com/adafruit/Adafruit-Trinket-Gemma-Bootloader
|
||||
|
||||
programmer
|
||||
id = "adafruit_gemma";
|
||||
desc = "Adafruit Trinket Gemma bootloader disguised as USBtiny";
|
||||
type = "usbtiny";
|
||||
prog_modes = PM_SPM;
|
||||
connection_type = usb;
|
||||
usbvid = 0x1781;
|
||||
usbpid = 0x0c9f;
|
||||
;
|
||||
|
||||
#------------------------------------------------------------
|
||||
# arduinoisp
|
||||
#------------------------------------------------------------
|
||||
|
|
|
@ -618,6 +618,12 @@ static int usbtiny_chip_erase(const PROGRAMMER *pgm, const AVRPART *p) {
|
|||
if (! usbtiny_avr_op( pgm, p, AVR_OP_CHIP_ERASE, res )) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
if(pgm->prog_modes & PM_SPM) { // Talking to bootloader directly
|
||||
AVRMEM *fl = avr_locate_mem(p, "flash");
|
||||
// Estimated time it takes to erase all pages in bootloader
|
||||
usleep(p->chip_erase_delay * (fl? fl->num_pages: 999));
|
||||
} else
|
||||
usleep(p->chip_erase_delay);
|
||||
|
||||
// prepare for further instruction
|
||||
|
|
Loading…
Reference in New Issue