Improve detecting of ARM mbed media disk for uploading

This commit is contained in:
Ivan Kravets
2016-09-21 19:31:02 +03:00
parent 417cce1929
commit 8cc06c214a
3 changed files with 17 additions and 5 deletions

View File

@ -4,6 +4,17 @@ Release Notes
PlatformIO 3.0
--------------
3.1.1 (2016-??-??)
~~~~~~~~~~~~~~~~~~
* Improved detecting of ARM mbed media disk for uploading
-------
* Development platform `ST STM32 <https://github.com/platformio/platform-ststm32>`__
+ Added support for new boards: ST 32F769IDISCOVERY
3.1.0 (2016-09-19)
~~~~~~~~~~~~~~~~~~

View File

@ -14,7 +14,7 @@
import sys
VERSION = (3, 1, 0)
VERSION = (3, 1, "1a1")
__version__ = ".".join([str(s) for s in VERSION])
__title__ = "platformio"

View File

@ -87,10 +87,11 @@ def AutodetectUploadPort(*args, **kwargs): # pylint: disable=unused-argument
def _look_for_mbed_disk():
msdlabels = ("mbed", "nucleo", "frdm", "microbit")
for item in util.get_logicaldisks():
if (not item['name'] or
not any([l in item['name'].lower() for l in msdlabels])):
continue
return item['disk']
if (item['name'] and
any([l in item['name'].lower() for l in msdlabels])):
return item['disk']
if isfile(join(item['disk'], "mbed.html")):
return item['disk']
return None
def _look_for_serial_port():