From f2bdcbe977d8384cb5143576b411ca04db25c147 Mon Sep 17 00:00:00 2001 From: MCUdude Date: Fri, 11 Feb 2022 22:46:11 +0100 Subject: [PATCH 1/4] Add missing USBtiny derived programmers ArduinoISP and the Arduino.org ISP are commercial versions of the USBtiny programmer with different USB VIDs/PIDs --- src/avrdude.conf.in | 38 ++++++++++++++++++++++++++++---------- 1 file changed, 28 insertions(+), 10 deletions(-) diff --git a/src/avrdude.conf.in b/src/avrdude.conf.in index 4b4766fb..e5aacbd7 100644 --- a/src/avrdude.conf.in +++ b/src/avrdude.conf.in @@ -886,6 +886,24 @@ programmer usbpid = 0x0c9f; ; +programmer + id = "arduinoisp"; + desc = "Arduino ISP Programmer"; + type = "usbtiny"; + connection_type = usb; + usbvid = 0x2341; + usbpid = 0x0049; +; + +programmer + id = "arduinoisporg"; + desc = "Arduino ISP Programmer"; + type = "usbtiny"; + connection_type = usb; + usbvid = 0x2A03; + usbpid = 0x0049; +; + # commercial version of USBtiny, using a separate VID/PID programmer id = "ehajo-isp"; @@ -896,6 +914,16 @@ programmer usbpid = 0x0BA5; ; +# commercial version of USBtiny, using a separate VID/PID +programmer + id = "iseavrprog"; + desc = "USBtiny-based USB programmer, https://github.com/IowaScaledEngineering/ckt-avrprogrammer"; + type = "usbtiny"; + connection_type = usb; + usbvid = 0x1209; + usbpid = 0x6570; +; + programmer id = "micronucleus"; desc = "Micronucleus Bootloader"; @@ -914,16 +942,6 @@ programmer usbpid = 0x0478; ; -# commercial version of USBtiny, using a separate VID/PID -programmer - id = "iseavrprog"; - desc = "USBtiny-based USB programmer, https://github.com/IowaScaledEngineering/ckt-avrprogrammer"; - type = "usbtiny"; - connection_type = usb; - usbvid = 0x1209; - usbpid = 0x6570; -; - programmer id = "butterfly"; desc = "Atmel Butterfly Development Board"; From de19f203e07fb435e9528425e79c8590444aedb4 Mon Sep 17 00:00:00 2001 From: Dawid Buchwald Date: Sat, 19 Feb 2022 15:07:32 +0100 Subject: [PATCH 2/4] Smallest possible fix for PL2303HX --- src/updi_link.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/updi_link.c b/src/updi_link.c index 684b6b8d..541a70a2 100644 --- a/src/updi_link.c +++ b/src/updi_link.c @@ -53,7 +53,7 @@ static void updi_set_rtsdtr_mode(PROGRAMMER* pgm) static int updi_physical_open(PROGRAMMER* pgm, int baudrate, unsigned long cflags) { - serial_recv_timeout = 100; + serial_recv_timeout = 1000; union pinfo pinfo; pinfo.serialinfo.baud = baudrate; @@ -155,6 +155,8 @@ static int updi_physical_send_double_break(PROGRAMMER * pgm) serial_send(&pgm->fd, buffer, 1); serial_recv(&pgm->fd, buffer, 1); + serial_drain(&pgm->fd, 0); + if (serial_setparams(&pgm->fd, pgm->baudrate? pgm->baudrate: 115200, SERIAL_8E2) < 0) { return -1; } @@ -196,10 +198,14 @@ int updi_physical_sib(PROGRAMMER * pgm, unsigned char * buffer, uint8_t size) int updi_link_open(PROGRAMMER * pgm) { + char init_buffer[1]; + if (updi_physical_open(pgm, pgm->baudrate? pgm->baudrate: 115200, SERIAL_8E2) < 0) { return -1; } - return updi_physical_send_double_break(pgm); + + init_buffer[0]=UPDI_BREAK; + return updi_physical_send(pgm, init_buffer, 1); } void updi_link_close(PROGRAMMER * pgm) From 75ab3c418eb767412644c4d5b1dbfceffe0254d4 Mon Sep 17 00:00:00 2001 From: Dawid Buchwald Date: Sat, 19 Feb 2022 21:18:03 +0100 Subject: [PATCH 3/4] Fixed warning with unsigned char --- src/updi_link.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/updi_link.c b/src/updi_link.c index 541a70a2..1f179398 100644 --- a/src/updi_link.c +++ b/src/updi_link.c @@ -198,7 +198,7 @@ int updi_physical_sib(PROGRAMMER * pgm, unsigned char * buffer, uint8_t size) int updi_link_open(PROGRAMMER * pgm) { - char init_buffer[1]; + unsigned char init_buffer[1]; if (updi_physical_open(pgm, pgm->baudrate? pgm->baudrate: 115200, SERIAL_8E2) < 0) { return -1; From 428cd89e8d1b4d95a479e3bc48ebd3cf38d3010f Mon Sep 17 00:00:00 2001 From: Joerg Wunsch Date: Fri, 18 Feb 2022 23:02:25 +0100 Subject: [PATCH 4/4] PRs #878, #873, #885 done --- NEWS | 3 +++ 1 file changed, 3 insertions(+) diff --git a/NEWS b/NEWS index 93e00bcd..300660e2 100644 --- a/NEWS +++ b/NEWS @@ -133,6 +133,9 @@ Changes since version 6.4: - Tweak programmer info formatting strings #872 - Remove libhid support in ser_avrdoper.c in favor of libhidapi #882 - Reduce jtag3 output verbosity #877 + - Fix Curiosity Nano target voltage #878 + - Smallest possible fix for PL2303HX #885 + - Add missing USBtiny derived programmers #873 * Internals: