Improve support for Black Magic Probe in "uploader" role

This commit is contained in:
Ivan Kravets
2018-04-23 17:30:05 +03:00
parent f981916f1d
commit 1c68409a08
3 changed files with 8 additions and 5 deletions

View File

@ -18,6 +18,7 @@ PlatformIO 3.0
option for `Project Configuration File "platformio.ini" <http://docs.platformio.org/page/projectconf/section_platformio.html#build-dir>`__ (information will be used by
`PlatformIO Home <http://docs.platformio.org/page/home/index.html>`_)
* Updated Unity tool to 2.4.3
* Improved support for Black Magic Probe in "uploader" role
* Fixed issue with useless project rebuilding for case insensitive file
systems (Windows)
* Fixed issue with ``build_unflags`` option when a macro contains value

2
docs

Submodule docs updated: 5222412b3f...a3f4e765e5

View File

@ -130,10 +130,12 @@ def AutodetectUploadPort(*args, **kwargs): # pylint: disable=unused-argument
if not _is_match_pattern(item['port']):
continue
port = item['port']
if upload_protocol.startswith("blackmagic") \
and "GDB" in item['description']:
return ("\\\\.\\%s" % port if "windows" in util.get_systype()
and port.startswith("COM") and len(port) > 4 else port)
if upload_protocol.startswith("blackmagic"):
if "windows" in util.get_systype() and \
port.startswith("COM") and len(port) > 4:
port = "\\\\.\\%s" % port
if "GDB" in item['description']:
return port
for hwid in board_hwids:
hwid_str = ("%s:%s" % (hwid[0], hwid[1])).replace("0x", "")
if hwid_str in item['hwid']: