From 49695247a5bd924b9c31829563ad2a2b5384ffc7 Mon Sep 17 00:00:00 2001 From: Yao Wei Date: Tue, 25 Mar 2025 12:40:40 +0800 Subject: [PATCH] hid: fix flashing hid using avrdude 8.0 (#188) Closes: pikvm/pikvm#1482 --- hid/arduino/Makefile | 4 ++-- hid/arduino/avrdude-rpi.conf | 1 + hid/arduino/platformio-avr.ini | 2 -- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/hid/arduino/Makefile b/hid/arduino/Makefile index 652ddd6e..265a0c79 100644 --- a/hid/arduino/Makefile +++ b/hid/arduino/Makefile @@ -24,8 +24,8 @@ upload: bash -ex -c " \ current=`cat .current`; \ if [ '$($@_CURRENT)' == 'spi' ] || [ '$($@_CURRENT)' == 'aum' ]; then \ - gpioset 0 25=1; \ - gpioset 0 25=0; \ + gpioset -c gpiochip0 -t 30ms,0 25=1; \ + gpioset -c gpiochip0 -t 30ms,0 25=0; \ fi \ " platformio run --environment '$($@_CURRENT)' --project-conf 'platformio-$($@_CONFIG).ini' --target upload diff --git a/hid/arduino/avrdude-rpi.conf b/hid/arduino/avrdude-rpi.conf index 8a6f5460..210380a8 100644 --- a/hid/arduino/avrdude-rpi.conf +++ b/hid/arduino/avrdude-rpi.conf @@ -2,6 +2,7 @@ programmer id = "rpi"; desc = "RPi SPI programmer"; type = "linuxspi"; + prog_modes = PM_ISP; reset = 25; baudrate = 400000; ; diff --git a/hid/arduino/platformio-avr.ini b/hid/arduino/platformio-avr.ini index 8484ef50..4c8c9144 100644 --- a/hid/arduino/platformio-avr.ini +++ b/hid/arduino/platformio-avr.ini @@ -82,8 +82,6 @@ build_flags = -DCDC_DISABLED upload_protocol = custom upload_flags = - -C - $PROJECT_PACKAGES_DIR/tool-avrdude/avrdude.conf -C +avrdude-rpi.conf -P