forked from platformio/platformio-core
Add special prefix for BlackMagic probe for Windows COM ports >= COM10
This commit is contained in:
@ -133,7 +133,8 @@ def AutodetectUploadPort(*args, **kwargs): # pylint: disable=unused-argument
|
|||||||
port = item['port']
|
port = item['port']
|
||||||
if upload_protocol.startswith("blackmagic") \
|
if upload_protocol.startswith("blackmagic") \
|
||||||
and "GDB" in item['description']:
|
and "GDB" in item['description']:
|
||||||
return port
|
return ("\\\\.\\%s" % port if system() == "Windows"
|
||||||
|
and port.startswith("COM") and len(port) > 4 else port)
|
||||||
for hwid in board_hwids:
|
for hwid in board_hwids:
|
||||||
hwid_str = ("%s:%s" % (hwid[0], hwid[1])).replace("0x", "")
|
hwid_str = ("%s:%s" % (hwid[0], hwid[1])).replace("0x", "")
|
||||||
if hwid_str in item['hwid']:
|
if hwid_str in item['hwid']:
|
||||||
|
Reference in New Issue
Block a user