mariusgreuel / avrdude

AVRDUDE for Windows
GNU General Public License v2.0
109 stars 14 forks source link

Arduino Leonardo problem #10

Open mcuee opened 2 years ago

mcuee commented 2 years ago

Ref: https://github.com/avrdudes/avrdude/issues/788#issuecomment-1141208371

It is strange that it works for one Pro Micro clone but not on the official Leonardo.

PS C:\work\avr\avrdude_test\avrdude_win\out\build\x64-Debug\src\Debug> .\avrdude.exe -patmega32u4 -c avr109 -PCOM14 -vvvv
executable_abspath = C:/work/avr/avrdude_test/avrdude_win/out/build/x64-Debug/src/Debug/avrdude.exe
executable_abspath_len = 78
executable_dirpath = C:/work/avr/avrdude_test/avrdude_win/out/build/x64-Debug/src/Debug
executable_dirpath_len = 66
sys_config = C:/work/avr/avrdude_test/avrdude_win/out/build/x64-Debug/src/Debug/avrdude.conf
sys_config_found = true

avrdude.exe: Version 7.0
             Copyright (c) Brian Dean, http://www.bdmicro.com/
             Copyright (c) Joerg Wunsch

             System wide configuration file is "C:/work/avr/avrdude_test/avrdude_win/out/build/x64-Debug/src/Debug/avrdude.conf"

             Using Port                    : COM14
             Using Programmer              : avr109
avrdude.exe: Found device at port 'COM14'
avrdude.exe: - InstanceId: USB\VID_2341&PID_8036&MI_00\6&22A06EED&0&0000
avrdude.exe: - Port: COM14
avrdude.exe: - Location: Port_#0001.Hub_#0002
avrdude.exe: - ProductName: Arduino Leonardo
avrdude.exe: - IsPresent: true
avrdude.exe: - IsCompositeDevice: true
avrdude.exe: Entering bootloader mode... 
(stuck here even after WIndows changes to COM15)

It does work under Arduino even for the Leonardo.

Forcing reset using 1200bps open/close on port COM14
PORTS {COM14, } / {} => {}
PORTS {} / {COM15, } => {COM15, }
Found upload port: COM15
C:\Users\xiaof\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/bin/avrdude -CC:\Users\xiaof\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/etc/avrdude.conf -v -patmega32u4 -cavr109 -PCOM15 -b57600 -D -Uflash:w:C:\Users\xiaof\AppData\Local\Temp\arduino_build_926279/Blink_Every.ino.hex:i 

avrdude: Version 6.3-20190619
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2014 Joerg Wunsch

         System wide configuration file is "C:\Users\xiaof\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/etc/avrdude.conf"

         Using Port                    : COM15
         Using Programmer              : avr109
         Overriding Baud Rate          : 57600
         AVR Part                      : ATmega32U4
         Chip Erase delay              : 9000 us
         PAGEL                         : PD7
         BS2                           : PA0
         RESET disposition             : dedicated
         RETRY pulse                   : SCK
         serial program mode           : yes
         parallel program mode         : yes
         Timeout                       : 200
         StabDelay                     : 100
         CmdexeDelay                   : 25
         SyncLoops                     : 32
         ByteDelay                     : 0
         PollIndex                     : 3
         PollValue                     : 0x53
         Memory Detail                 :

                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           eeprom        65    20     4    0 no       1024    4      0  9000  9000 0x00 0x00
           flash         65     6   128    0 yes     32768  128    256  4500  4500 0x00 0x00
           lfuse          0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
           hfuse          0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
           efuse          0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
           lock           0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
           calibration    0     0     0    0 no          1    0      0     0     0 0x00 0x00
           signature      0     0     0    0 no          3    0      0     0     0 0x00 0x00

         Programmer Type : butterfly
         Description     : Atmel AppNote AVR109 Boot Loader

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: devcode selected: 0x44
avrdude: AVR device initialized and ready to accept instructions

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

avrdude: Device signature = 0x1e9587 (probably m32u4)
avrdude: reading input file "C:\Users\xiaof\AppData\Local\Temp\arduino_build_926279/Blink_Every.ino.hex"
avrdude: writing flash (3956 bytes):

Writing | ################################################## | 100% 0.31s

avrdude: 3956 bytes of flash written
avrdude: verifying flash memory against C:\Users\xiaof\AppData\Local\Temp\arduino_build_926279/Blink_Every.ino.hex:
avrdude: load data flash data from input file C:\Users\xiaof\AppData\Local\Temp\arduino_build_926279/Blink_Every.ino.hex:
avrdude: input file C:\Users\xiaof\AppData\Local\Temp\arduino_build_926279/Blink_Every.ino.hex contains 3956 bytes
avrdude: reading on-chip flash data:

Reading | ################################################## | 100% 0.04s

avrdude: verifying ...
avrdude: 3956 bytes of flash verified

avrdude done.  Thank you.
mcuee commented 5 months ago

avrdude git main now add -r option to get Arduino Nano Every working nicely. It will be part of avrdude 7.3 release.