diff --git a/win/stm32CubeProg.bat b/win/stm32CubeProg.bat index ef892ead8..71e336cfc 100644 --- a/win/stm32CubeProg.bat +++ b/win/stm32CubeProg.bat @@ -59,8 +59,13 @@ set PORT=%~3 shift goto :opt +:: Finds the COMPORT with manufacturer StMicro and knocks the COM POrt at 1200 baud rate :DFU set PORT=USB1 +wmic path Win32_SerialPort Where "Caption LIKE '%%StMicro%%'" Get DeviceID | findstr "COM" > tmpFile.txt +del tmpFile.txt +set /p cdc_port=