forked from platformio/platformio-core
Merge branch 'develop' into feature/platformio-30
* develop: Version bump to 2.9.2 (issues #641, #645, #648, #652, #664, #665, #666, #671, #674) Fix issue with ARM mbed framework when abstract class breaks compile for LPC1768 // Resolve #666 Fix issue with ARM mbed framework and multiple definition errors on FRDM-KL46Z board // Resolve #641 List embedded boards in docs Fix multiple definition in mbed framework when using abstract class // Issue #641, #666 Add "stlink" as the default uploader for STM32 Discovery boards // Resolve #665 Implement grep serial ports for Windows Remove unused imports Minor improvements Fix PyLint's "misplaced-comparison-constant" Use $PROGNAME instead static name when looking for the firmware Update title of the article Add new articles Link Community Forums FAQ with Docs FAQ Grep for "/dev/cu.*" on OS X Skip grep search for serial ports on Windows machines Improve firmware uploading to Arduino Leonardo based boards Add MinGW to the PATH # Conflicts: # docs/index.rst # docs/platforms/creating_board.rst # docs/projectconf.rst # docs/userguide/platforms/cmd_install.rst # platformio/__init__.py # platformio/builder/scripts/atmelavr.py # platformio/builder/scripts/atmelsam.py # platformio/builder/scripts/frameworks/mbed.py
This commit is contained in:
commit
06e42dc689
40 files changed
+2831
-57
No files matched your search
@@ -47,11 +47,13 @@ def TouchSerialPort(env, port, baudrate):
|
||||
sleep(0.4)
|
||||
|
||||
|
||||
def WaitForNewSerialPort(env, before):
|
||||
def WaitForNewSerialPort(env):
|
||||
before = [i['port'] for i in get_serialports(use_grep=True)]
|
||||
sleep(0.5)
|
||||
new_port = None
|
||||
elapsed = 0
|
||||
while elapsed < 10:
|
||||
now = [i['port'] for i in get_serialports()]
|
||||
now = [i['port'] for i in get_serialports(use_grep=True)]
|
||||
diff = list(set(now) - set(before))
|
||||
if diff:
|
||||
new_port = diff[0]
|
||||
@@ -106,11 +108,13 @@ def AutodetectUploadPort(env):
|
||||
|
||||
def UploadToDisk(_, target, source, env): # pylint: disable=W0613,W0621
|
||||
env.AutodetectUploadPort()
|
||||
progname = env.subst("$PROGNAME")
|
||||
for ext in ("bin", "hex"):
|
||||
fpath = join(env.subst("$BUILD_DIR"), "firmware.%s" % ext)
|
||||
fpath = join(env.subst("$BUILD_DIR"), "%s.%s" % (progname, ext))
|
||||
if not isfile(fpath):
|
||||
continue
|
||||
copyfile(fpath, join(env.subst("$UPLOAD_PORT"), "firmware.%s" % ext))
|
||||
copyfile(fpath, join(
|
||||
env.subst("$UPLOAD_PORT"), "%s.%s" % (progname, ext)))
|
||||
print("Firmware has been successfully uploaded.\n"
|
||||
"Please restart your board.")
|
||||
|
||||
|
||||
Reference in new issue
Block a user