Further work on PIO Remote

This commit is contained in:
Ivan Kravets
2016-10-04 01:24:38 +03:00
parent 810b6d807f
commit 00aeaf021d
6 changed files with 51 additions and 10 deletions

View File

@ -12,15 +12,40 @@ PlatformIO 3.0
-------
* Development platform `Atmel SAM <https://github.com/platformio/platform-atmelsam>`__
+ Updated ARM mbed OS to 5.1.4/rev126
* Development platform `Espressif 8266 <https://github.com/platformio/platform-espressif8266>`__
+ Add support for ESPrectro board
+ Additional target "buildfs" to accompany "uploadfs"
(`issue #6 <https://github.com/platformio/platform-espressif8266/issues/6>`__)
* Development platform `Freescale Kinetis <https://github.com/platformio/platform-freescalekinetis>`__
+ Updated ARM mbed OS to 5.1.4/rev126
* Development platform `Nordic nRF51 <https://github.com/platformio/platform-nordicnrf51>`__
+ Updated ARM mbed OS to 5.1.4/rev126
* Development platform `NXP LPC <https://github.com/platformio/platform-nxplpc>`__
+ Updated ARM mbed OS to 5.1.4/rev126
* Development platform `Silicon Labs EFM32 <https://github.com/platformio/platform-siliconlabsefm32>`__
+ Updated ARM mbed OS to 5.1.4/rev126
* Development platform `ST STM32 <https://github.com/platformio/platform-ststm32>`__
+ Added support for new boards: ST 32F769IDISCOVERY
+ Updated ARM mbed OS to 5.1.4/rev126
* Development platform `Teensy <https://github.com/platformio/platform-teensy>`__
+ Updated ARM mbed OS to 5.1.4/rev126
3.1.0 (2016-09-19)
~~~~~~~~~~~~~~~~~~

View File

@ -55,7 +55,6 @@ Pre-built targets:
* ``upload`` firmware "auto-uploading" for embedded platforms
* ``program`` firmware "auto-uploading" for embedded platforms using external
programmer (available only for :ref:`platform_atmelavr`)
* ``uploadlazy`` upload existing firmware without project rebuilding
* ``uploadfs`` :ref:`platform_espressif_uploadfs`
* ``envdump`` dump current build environment
* ``size`` print the size of the sections in a firmware/program

View File

@ -21,6 +21,7 @@ from platform import system
from shutil import copyfile
from time import sleep
from SCons.Node.Alias import Alias
from serial import Serial
from platformio import util
@ -160,7 +161,8 @@ def CheckUploadSize(_, target, source, env): # pylint: disable=W0613,W0621
sysenv = environ.copy()
sysenv['PATH'] = str(env['ENV']['PATH'])
cmd = [env.subst("$SIZETOOL"), "-B", str(target[0])]
cmd = [env.subst("$SIZETOOL"), "-B",
str(source[0] if isinstance(target[0], Alias) else target[0])]
result = util.exec_command(cmd, env=sysenv)
if result['returncode'] != 0:
return

View File

@ -21,7 +21,8 @@ from os import sep, walk
from os.path import basename, dirname, isdir, join, realpath
from SCons.Action import Action
from SCons.Script import COMMAND_LINE_TARGETS, DefaultEnvironment, SConscript
from SCons.Script import (COMMAND_LINE_TARGETS, AlwaysBuild,
DefaultEnvironment, SConscript)
from SCons.Util import case_sensitive_suffixes
from platformio.util import pioversion_to_intstr
@ -97,9 +98,10 @@ def BuildProgram(env):
program = env.Program(
join("$BUILD_DIR", env.subst("$PROGNAME")), env['PIOBUILDFILES'])
if set(["upload", "uploadlazy", "program"]) & set(COMMAND_LINE_TARGETS):
env.AddPostAction(program, Action(env.CheckUploadSize,
"Checking program size $TARGET"))
checksize_action = Action(env.CheckUploadSize, "Checking program size")
AlwaysBuild(env.Alias("checkprogsize", program, checksize_action))
if set(["upload", "program"]) & set(COMMAND_LINE_TARGETS):
env.AddPostAction(program, checksize_action)
return program
@ -226,7 +228,7 @@ def CollectBuildFiles(env,
def BuildFrameworks(env, frameworks):
if not frameworks or "uploadlazy" in COMMAND_LINE_TARGETS:
if not frameworks:
return
if "BOARD" not in env:

View File

@ -30,12 +30,25 @@ from platformio.pioplus import pioplus_call
@click.group("remote", short_help="PIO Remote")
def cli():
@click.option("-a", "--agent", multiple=True)
def cli(**kwargs):
pass
@cli.command("agent", short_help="Host agent")
@cli.group("agent", short_help="Start new agent or list active")
def remote_agent():
pass
@remote_agent.command("start", short_help="Start agent")
@click.option("-n", "--name")
@click.option("-s", "--share")
def remote_agent_start(**kwargs):
pioplus_call(sys.argv[1:])
@remote_agent.command("list", short_help="List active agents")
def remote_agent_list():
pioplus_call(sys.argv[1:])

View File

@ -453,7 +453,7 @@ class PlatformBase(PlatformPackagesMixin, PlatformRunMixin):
for _name, _opts in self.packages.iteritems():
if _opts.get("type") == "uploader":
self.packages[_name]['optional'] = False
elif "uploadlazy" in targets:
elif "nobuild" in targets:
# skip all packages, allow only upload tools
self.packages[_name]['optional'] = True