Files
lighthub/compiled/DUE_16u2_reflash/reflash16u2DUE.bat
Климов Андрей Николаевич e93e52702e XNova CRYPT,SHAREDSECRET,PROTECTED_PINS,PULSEPIN12
2023-10-08 17:43:30 +03:00

17 lines
464 B
Batchfile

REM fetch DeviceID of Arduino Port from WMI Service
FOR /f "tokens=* skip=1" %%a IN ('wmic PATH Win32_SerialPort Where "Caption LIKE '%%Arduino Uno%%'" get DeviceID') DO (
SET COMX=%%a
GOTO exit1
)
REM Arduino Due Programming Port not exist
GOTO error_comport
:exit1
REM remove blank
SET COMPORT=%COMX: =%
..\tools\win\tool-avrdude\avrdude -C ..\tools\win\tool-avrdude\avrdude.conf -c arduino -P %COMPORT% -b 19200 -p m16u2 -vvv -U flash:w:16u2.hex:i