Tool that opens a comport for every mbed connected to your computer with one command - never look for the COM number again!

  1. clone or download the repo to your windows PC
  2. open a cmd prompt and change the directory to location of the files downloaded
  3. run open_mbed
  4. enjoy
Committer:
sg-
Date:
Sat Jul 19 15:51:45 2014 -0500
Revision:
2:736ec17a4e05
Parent:
1:1483315a15a6
Give short delay after opening putty to grab the handle

Who changed what in which revision?

UserRevisionLine numberNew contents of line
sam_grove 0:a65a11a779b7 1 @echo off
sam_grove 0:a65a11a779b7 2 SET PATH=%PATH%;c:\Program Files\putty\
sam_grove 0:a65a11a779b7 3
sam_grove 0:a65a11a779b7 4 ::mbed Serial Port
sam_grove 0:a65a11a779b7 5 :mbed
sam_grove 1:1483315a15a6 6 set func=mbed
sam_grove 0:a65a11a779b7 7 friendly_port "mbed Serial Port"
sam_grove 1:1483315a15a6 8 set result=%ERRORLEVEL%
sam_grove 1:1483315a15a6 9 if %result% EQU -1 (
sg- 2:736ec17a4e05 10 ::echo %result%
sg- 2:736ec17a4e05 11 echo mbed scan done
sam_grove 1:1483315a15a6 12 goto st
sam_grove 1:1483315a15a6 13 ) else (
sam_grove 1:1483315a15a6 14 goto openputty
sam_grove 0:a65a11a779b7 15 )
sam_grove 0:a65a11a779b7 16
sam_grove 0:a65a11a779b7 17 ::STMicroelectronics STLink Virtual COM Port
sam_grove 0:a65a11a779b7 18 :st
sam_grove 1:1483315a15a6 19 set func=st
sam_grove 0:a65a11a779b7 20 friendly_port "STMicroelectronics STLink Virtual COM Port"
sam_grove 1:1483315a15a6 21 set result=%ERRORLEVEL%
sam_grove 1:1483315a15a6 22 if %result% EQU -1 (
sg- 2:736ec17a4e05 23 ::echo %result%
sg- 2:736ec17a4e05 24 echo st scan done
sam_grove 1:1483315a15a6 25 goto fsl
sam_grove 1:1483315a15a6 26 ) else (
sam_grove 1:1483315a15a6 27 goto openputty
sam_grove 0:a65a11a779b7 28 )
sam_grove 0:a65a11a779b7 29
sam_grove 0:a65a11a779b7 30 ::OpenSDA - CDC Serial Port
sam_grove 0:a65a11a779b7 31 :fsl
sam_grove 1:1483315a15a6 32 set func=fsl
sam_grove 0:a65a11a779b7 33 friendly_port "OpenSDA - CDC Serial Port"
sam_grove 1:1483315a15a6 34 set result=%ERRORLEVEL%
sam_grove 1:1483315a15a6 35 if %result% EQU -1 (
sg- 2:736ec17a4e05 36 ::echo %result%
sg- 2:736ec17a4e05 37 echo freescale scan done
sam_grove 1:1483315a15a6 38 goto exit
sam_grove 1:1483315a15a6 39 ) else (
sam_grove 1:1483315a15a6 40 goto openputty
sam_grove 0:a65a11a779b7 41 )
sam_grove 0:a65a11a779b7 42
sam_grove 0:a65a11a779b7 43 :openputty
sam_grove 1:1483315a15a6 44 start /D %CD% putty.exe -serial com%result% -sercfg 9600
sg- 2:736ec17a4e05 45 timeout /t 1 > NUL
sam_grove 0:a65a11a779b7 46 goto %func%
sam_grove 0:a65a11a779b7 47
sam_grove 0:a65a11a779b7 48 :notfound
sam_grove 0:a65a11a779b7 49 echo all done.
sam_grove 0:a65a11a779b7 50 pause
sam_grove 0:a65a11a779b7 51
sam_grove 0:a65a11a779b7 52 :exit