qmk / qmk_toolbox

A Toolbox companion for QMK Firmware
https://qmk.fm/toolbox
MIT License
2.55k stars 504 forks source link

Need help avrdude.exe: option requires an argument -- P #461

Closed GHOSTASSASSINno1 closed 4 months ago

GHOSTASSASSINno1 commented 4 months ago

i am encountering an issue my keyestudio arduino leonardo wont flash on 0.1.1 and on 0.3.1 i updated drivers to Arduino LLC later but i was encountering this from receiving it. it was a caterina device.

0.1.1

*** QMK Toolbox 0.1.1 (https://qmk.fm/toolbox)
    Supported bootloaders:
     - ARM DFU (APM32, Kiibohd, STM32, STM32duino) via dfu-util (http://dfu-util.sourceforge.net/)
     - Atmel/LUFA/QMK DFU via dfu-programmer (http://dfu-programmer.github.io/)
     - Atmel SAM-BA (Massdrop) via Massdrop Loader (https://github.com/massdrop/mdloader)
     - BootloadHID (Atmel, PS2AVRGB) via bootloadHID (https://www.obdev.at/products/vusb/bootloadhid.html)
     - Caterina (Arduino, Pro Micro) via avrdude (http://nongnu.org/avrdude/)
     - HalfKay (Teensy, Ergodox EZ) via Teensy Loader (https://pjrc.com/teensy/loader_cli.html)
     - LUFA Mass Storage
    Supported ISP flashers:
     - AVRISP (Arduino ISP)
     - USBasp (AVR ISP)
     - USBTiny (AVR Pocket)
*** Auto-flash enabled
*** Caterina device connected (usbser): Arduino LLC (www.arduino.cc) Arduino Leonardo bootloader (COM12) (2341:0036:0001)
*** Attempting to flash, please don't remove device
> avrdude.exe -p atmega32u4 -c avr109 -U flash:w:"C:\PA-SerialPrograms-0.46.4-20240117\NintendoSwitch-PABotBase-2021052613-ArduinoLeonardo.hex":i -P 
>     C:\Users\maxba\AppData\Local\QMK\QMK Toolbox\0.1.1\avrdude.exe: option requires an argument -- P
>     Usage: avrdude.exe [options]
>     Options:
>       -p <partno>                Required. Specify AVR device.
>       -b <baudrate>              Override RS-232 baud rate.
>       -B <bitclock>              Specify JTAG/STK500v2 bit clock period (us).
>       -C <config-file>           Specify location of configuration file.
>       -c <programmer>            Specify programmer type.
>       -D                         Disable auto erase for flash memory
>       -i <delay>                 ISP Clock Delay [in microseconds]
>       -P <port>                  Specify connection port.
>       -F                         Override invalid signature check.
>       -e                         Perform a chip erase.
>       -O                         Perform RC oscillator calibration (see AVR053). 
>       -U <memtype>:r|w|v:<filename>[:format]
>                                  Memory operation specification.
>                                  Multiple -U options are allowed, each request
>                                  is performed in the order specified.
>       -n                         Do not write anything to the device.
>       -V                         Do not verify.
>       -u                         Disable safemode, default when running from a script.
>       -s                         Silent safemode operation, will not ask you if
>                                  fuses should be changed back.
>       -t                         Enter terminal mode.
>       -E <exitspec>[,<exitspec>] List programmer exit specifications.
>       -x <extended_param>        Pass <extended_param> to programmer.
>       -y                         Count # erase cycles in EEPROM.
>       -Y <number>                Initialize erase cycle # in EEPROM.
>       -v                         Verbose output. -v -v for more.
>       -q                         Quell progress output. -q -q for less.
>       -l logfile                 Use logfile rather than stderr for diagnostics.
>       -?                         Display this usage.
>     
>     avrdude version 6.3, URL: <http://savannah.nongnu.org/projects/avrdude/>
> *** Caterina device disconnected (usbser): Arduino LLC (www.arduino.cc) Arduino Leonardo bootloader (COM12) (2341:0036:0001)

0.3.1

QMK Toolbox 0.3.1 (https://qmk.fm/toolbox)
Supported bootloaders:
ARM DFU (APM32, Kiibohd, STM32, STM32duino) and RISC-V DFU (GD32V) via dfu-util (http://dfu-util.sourceforge.net/)
Atmel/LUFA/QMK DFU via dfu-programmer (http://dfu-programmer.github.io/)
Atmel SAM-BA (Massdrop) via Massdrop Loader (https://github.com/massdrop/mdloader)
BootloadHID (Atmel, PS2AVRGB) via bootloadHID (https://www.obdev.at/products/vusb/bootloadhid.html)
Caterina (Arduino, Pro Micro) via avrdude (http://nongnu.org/avrdude/)
HalfKay (Teensy, Ergodox EZ) via Teensy Loader (https://pjrc.com/teensy/loader_cli.html)
LUFA/QMK HID via hid_bootloader_cli (https://github.com/abcminiuser/lufa)
WB32 DFU via wb32-dfu-updater_cli (https://github.com/WestberryTech/wb32-dfu-updater)
LUFA Mass Storage
Supported ISP flashers:
AVRISP (Arduino ISP)
USBasp (AVR ISP)
USBTiny (AVR Pocket)
Auto-flash enabled
Caterina device connected (usbser): Arduino LLC (www.arduino.cc) Arduino Leonardo bootloader (COM12) (2341:0036:0001) []
Attempting to flash, please don't remove device
Flash complete

other people with the same board as a friend of mine was able to flash it properly so i cant assume this is a bug on QMKs end but if you could help me figure this out would be greatly appreciated

0.3.1 this was my friends flash logs same brand board

* QMK Toolbox 0.3.1 (https://qmk.fm/toolbox)
* Supported bootloaders:
*  - ARM DFU (APM32, Kiibohd, STM32, STM32duino) and RISC-V DFU (GD32V) via dfu-util (http://dfu-util.sourceforge.net/)
*  - Atmel/LUFA/QMK DFU via dfu-programmer (http://dfu-programmer.github.io/)
*  - Atmel SAM-BA (Massdrop) via Massdrop Loader (https://github.com/massdrop/mdloader)
*  - BootloadHID (Atmel, PS2AVRGB) via bootloadHID (https://www.obdev.at/products/vusb/bootloadhid.html)
*  - Caterina (Arduino, Pro Micro) via avrdude (http://nongnu.org/avrdude/)
*  - HalfKay (Teensy, Ergodox EZ) via Teensy Loader (https://pjrc.com/teensy/loader_cli.html)
*  - LUFA/QMK HID via hid_bootloader_cli (https://github.com/abcminiuser/lufa)
*  - WB32 DFU via wb32-dfu-updater_cli (https://github.com/WestberryTech/wb32-dfu-updater)
*  - LUFA Mass Storage
* Supported ISP flashers:
*  - AVRISP (Arduino ISP)
*  - USBasp (AVR ISP)
*  - USBTiny (AVR Pocket)
* Auto-flash enabled
Caterina device connected (usbser): Microsoft Serieel USB-apparaat (COM4) (2341:0036:0001) [COM4]
Attempting to flash, please don't remove device
> 
> Connecting to programmer: .
> Found programmer: Id = "CATERIN"; type = S
>     Software Version = 1.0; No Hardware Version given.
> Programmer supports auto addr increment.
> Programmer supports buffered memory access with buffersize=128 bytes.
> 
> Programmer supports the following devices:
>     Device code: 0x44
> 
> avrdude.exe: AVR device initialized and ready to accept instructions
> 
> Reading | ################################################## | 100% 0.00s
> 
> avrdude.exe: Device signature = 0x1e9587 (probably m32u4)
> avrdude.exe: NOTE: "flash" memory has been specified, an erase cycle will be performed
>              To disable this feature, specify the -D option.
> avrdude.exe: erasing chip
> avrdude.exe: reading input file "C:\Users\Donav\OneDrive\Bureaublad\NintendoSwitch-PABotBase-2021052613-ArduinoLeonardo.hex"
> avrdude.exe: writing flash (15170 bytes):
> 
> Writing | ################################################## | 100% 1.12s
> 
> avrdude.exe: 15170 bytes of flash written
> avrdude.exe: verifying flash memory against C:\Users\Donav\OneDrive\Bureaublad\NintendoSwitch-PABotBase-2021052613-ArduinoLeonardo.hex:
> 
> Reading | ################################################## | 100% 0.10s
> 
> avrdude.exe: 15170 bytes of flash verified
> 
> avrdude.exe done.  Thank you.
> 
Flash complete
Caterina device disconnected (usbser): Microsoft Serieel USB-apparaat (COM4) (2341:0036:0001) [COM4]

0.1.1

*** QMK Toolbox 0.1.1 (https://qmk.fm/toolbox)
    Supported bootloaders:
     - ARM DFU (APM32, Kiibohd, STM32, STM32duino) via dfu-util (http://dfu-util.sourceforge.net/)
     - Atmel/LUFA/QMK DFU via dfu-programmer (http://dfu-programmer.github.io/)
     - Atmel SAM-BA (Massdrop) via Massdrop Loader (https://github.com/massdrop/mdloader)
     - BootloadHID (Atmel, PS2AVRGB) via bootloadHID (https://www.obdev.at/products/vusb/bootloadhid.html)
     - Caterina (Arduino, Pro Micro) via avrdude (http://nongnu.org/avrdude/)
     - HalfKay (Teensy, Ergodox EZ) via Teensy Loader (https://pjrc.com/teensy/loader_cli.html)
     - LUFA Mass Storage
    Supported ISP flashers:
     - AVRISP (Arduino ISP)
     - USBasp (AVR ISP)
     - USBTiny (AVR Pocket)
*** Auto-flash enabled
*** Caterina device connected (usbser): Microsoft Serieel USB-apparaat (COM4) (2341:0036:0001) [COM4]
*** Attempting to flash, please don't remove device
>>> avrdude.exe -p atmega32u4 -c avr109 -U flash:w:"C:\Users\Donav\OneDrive\Bureaublad\NintendoSwitch-PABotBase-2021052613-ArduinoLeonardo.hex":i -P COM4

    Connecting to programmer: .
    Found programmer: Id = "CATERIN"; type = S
        Software Version = 1.0; No Hardware Version given.
    Programmer supports auto addr increment.
    Programmer supports buffered memory access with buffersize=128 bytes.

    Programmer supports the following devices:
        Device code: 0x44

    avrdude.exe: AVR device initialized and ready to accept instructions

    Reading | ################################################## | 100% 0.00s

    avrdude.exe: Device signature = 0x1e9587 (probably m32u4)
    avrdude.exe: NOTE: "flash" memory has been specified, an erase cycle will be performed
                 To disable this feature, specify the -D option.
    avrdude.exe: erasing chip
    avrdude.exe: reading input file "C:\Users\Donav\OneDrive\Bureaublad\NintendoSwitch-PABotBase-2021052613-ArduinoLeonardo.hex"
    avrdude.exe: writing flash (15170 bytes):

    Writing | ################################################## | 100% 1.12s

    avrdude.exe: 15170 bytes of flash written
    avrdude.exe: verifying flash memory against C:\Users\Donav\OneDrive\Bureaublad\NintendoSwitch-PABotBase-2021052613-ArduinoLeonardo.hex:
    avrdude.exe: load data flash data from input file C:\Users\Donav\OneDrive\Bureaublad\NintendoSwitch-PABotBase-2021052613-ArduinoLeonardo.hex:
    avrdude.exe: input file C:\Users\Donav\OneDrive\Bureaublad\NintendoSwitch-PABotBase-2021052613-ArduinoLeonardo.hex contains 15170 bytes
    avrdude.exe: reading on-chip flash data:

    Reading | ################################################## | 100% 0.11s

    avrdude.exe: verifying ...
    avrdude.exe: 15170 bytes of flash verified

    avrdude.exe done.  Thank you.

*** Caterina device disconnected (usbser): Microsoft Serieel USB-apparaat (COM4) (2341:0036:0001)
fauxpark commented 4 months ago

avrdude will not be able to flash Caterina devices without the Toolbox figuring out the COM port associated with the USB device, which is nontrivial since they may not appear at the same time. Just keep trying until the Toolbox shows the COM port at the end in square brackets.