mariusgreuel / avrdude

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

Arduino Leonardo (ATmega32U4) as ISP problem under Windows #9

Open mcuee opened 2 years ago

mcuee commented 2 years ago

https://github.com/avrdudes/avrdude/issues/971#issuecomment-1133551849

Hm, not relevant to you, but to me. You broke my Leonardo auto-reset code!

The heuristic looks for an Arduino, and when it is a composite devices, I assumed it needs resetting because it is running in sketch mode. That is true for your device as well, but you do not want to reset it but continue ISP programming. I guess I will need a custom switch for sketch resetting. I though I could get around that with a clever heuristic and not changing too much code.

mcuee commented 2 years ago

Run log with the default windows-v7.0 branch (built with VS2022 using the default CMake options):

PS C:\work\avr\avrdude_test\avrdude_win\out\build\x64-Debug\src\Debug> .\avrdude.exe -p m328p -c avrisp -P COM5 -b 19200 -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                    : COM5
             Using Programmer              : avrisp
             Overriding Baud Rate          : 19200
avrdude.exe: Found device at port 'COM5'
avrdude.exe: - InstanceId: USB\VID_2341&PID_8036&MI_00\7&1553EAE4&0&0000
avrdude.exe: - Port: COM5
avrdude.exe: - Location: Port_#0002.Hub_#0003
avrdude.exe: - ProductName: Arduino Leonardo
avrdude.exe: - IsPresent: true
avrdude.exe: - IsCompositeDevice: true
avrdude.exe: Entering bootloader mode...
(hang)
mcuee commented 2 years ago

Ah, there was an earlier report already.

mcuee commented 5 months ago

Work-around: