mirror of
https://github.com/platformio/platformio-core.git
synced 2025-07-29 17:47:14 +02:00
Merge branch 'release/v0.10.1'
This commit is contained in:
21
HISTORY.rst
21
HISTORY.rst
@ -1,15 +1,29 @@
|
||||
Release History
|
||||
===============
|
||||
|
||||
0.10.0 (2015-01-01) Happy New Year!
|
||||
-----------------------------------
|
||||
0.10.1 (2015-01-02)
|
||||
-------------------
|
||||
|
||||
* Added ``--json-output`` option to
|
||||
`platformio list <http://docs.platformio.org/en/latest/userguide/cmd_list.html>`__,
|
||||
`platformio serialports list <http://docs.platformio.org/en/latest/userguide/cmd_serialports.html>`__ and
|
||||
`platformio lib list <http://docs.platformio.org/en/latest/userguide/cmd_lib_list.html>`__
|
||||
commands which allows to return the output in `JSON <http://en.wikipedia.org/wiki/JSON>`_ format
|
||||
(`issue #42 <https://github.com/ivankravets/platformio/issues/42>`_)
|
||||
* Fixed missing auto-uploading by default after `platformio init <http://docs.platformio.org/en/latest/userguide/cmd_init.html>`__
|
||||
command
|
||||
|
||||
0.10.0 (2015-01-01)
|
||||
-------------------
|
||||
|
||||
**Happy New Year!**
|
||||
|
||||
* Implemented `platformio boards <http://docs.platformio.org/en/latest/userguide/cmd_boards.html>`_
|
||||
command (`issue #11 <https://github.com/ivankravets/platformio/issues/11>`_)
|
||||
* Added support of *Engduino* boards for
|
||||
`atmelavr <http://docs.platformio.org/en/latest/platforms/atmelavr.html#engduino>`__
|
||||
platform (`issue #38 <https://github.com/ivankravets/platformio/issues/38>`_)
|
||||
* Added ``--board`` option to `platformio init <http://docs.platformio.org/en/latest/userguide/cmd_init.html>`_
|
||||
* Added ``--board`` option to `platformio init <http://docs.platformio.org/en/latest/userguide/cmd_init.html>`__
|
||||
command which allows to initialise project with the specified embedded boards
|
||||
(`issue #21 <https://github.com/ivankravets/platformio/issues/21>`_)
|
||||
* Added `example with uploading firmware <http://docs.platformio.org/en/latest/projectconf.html#examples>`_
|
||||
@ -22,7 +36,6 @@ Release History
|
||||
* Fixed urllib3's *SSL* warning under Python <= 2.7.2 (`issue #39 <https://github.com/ivankravets/platformio/issues/39>`_)
|
||||
* Fixed bug with *Arduino USB* boards (`issue #40 <https://github.com/ivankravets/platformio/issues/40>`_)
|
||||
|
||||
|
||||
0.9.2 (2014-12-10)
|
||||
------------------
|
||||
|
||||
|
@ -9,15 +9,15 @@ Quickstart
|
||||
|
||||
1. :ref:`Install PlatformIO <installation>`.
|
||||
|
||||
2. Find board ``type`` from :ref:`platforms` (you can choose multiple board
|
||||
types).
|
||||
2. Find board ``type`` on this :ref:`Embedded Boards <platforms>` page or
|
||||
via :ref:`cmd_boards` command.
|
||||
|
||||
3. Initialize new PlatformIO based project with the pre-configured
|
||||
environments for your boards:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
$ platformio init --board=TYPE1 --board=TYPE2
|
||||
$ platformio init --board=TYPE_1 --board=TYPE_2 --board=TYPE_N
|
||||
|
||||
The current working directory *** will be used for the new project.
|
||||
You can specify another project directory via
|
||||
|
@ -10,7 +10,7 @@ Usage
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
platformio list
|
||||
platformio list [OPTIONS]
|
||||
|
||||
|
||||
Description
|
||||
@ -18,6 +18,13 @@ Description
|
||||
|
||||
List installed :ref:`Platforms <platforms>`
|
||||
|
||||
Options
|
||||
~~~~~~~
|
||||
|
||||
.. option::
|
||||
--json-output
|
||||
|
||||
Return the output in `JSON <http://en.wikipedia.org/wiki/JSON>`_ format
|
||||
|
||||
Examples
|
||||
--------
|
||||
|
@ -13,7 +13,7 @@ Usage
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
platformio serialports list
|
||||
platformio serialports list [OPTIONS]
|
||||
|
||||
|
||||
Description
|
||||
@ -21,6 +21,14 @@ Description
|
||||
|
||||
List available `Serial Ports <http://en.wikipedia.org/wiki/Serial_port>`_
|
||||
|
||||
Options
|
||||
~~~~~~~
|
||||
|
||||
.. option::
|
||||
--json-output
|
||||
|
||||
Return the output in `JSON <http://en.wikipedia.org/wiki/JSON>`_ format
|
||||
|
||||
|
||||
Examples
|
||||
~~~~~~~~
|
||||
|
@ -10,7 +10,7 @@ Usage
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
platformio lib list
|
||||
platformio lib list [OPTIONS]
|
||||
|
||||
|
||||
Description
|
||||
@ -18,6 +18,13 @@ Description
|
||||
|
||||
List installed libraries
|
||||
|
||||
Options
|
||||
~~~~~~~
|
||||
|
||||
.. option::
|
||||
--json-output
|
||||
|
||||
Return the output in `JSON <http://en.wikipedia.org/wiki/JSON>`_ format
|
||||
|
||||
Examples
|
||||
--------
|
||||
|
@ -1,5 +1,21 @@
|
||||
# Copyright (C) Ivan Kravets <me@ikravets.com>
|
||||
# See LICENSE for details.
|
||||
#
|
||||
# Project Configuration File
|
||||
#
|
||||
# A detailed documentation with the EXAMPLES is located here:
|
||||
# http://docs.platformio.org/en/latest/projectconf.html
|
||||
#
|
||||
|
||||
# A sign `#` at the beginning of the line indicates a comment
|
||||
# Comment lines are ignored.
|
||||
|
||||
# Simple and base environment
|
||||
# [env:mybaseenv]
|
||||
# platform = %INSTALLED_PLATFORM_NAME_HERE%
|
||||
# framework =
|
||||
# board =
|
||||
#
|
||||
# Automatic targets - enable auto-uploading
|
||||
# targets = upload
|
||||
|
||||
[env:microduino]
|
||||
platform = atmelavr
|
||||
|
@ -1,5 +1,21 @@
|
||||
# Copyright (C) Ivan Kravets <me@ikravets.com>
|
||||
# See LICENSE for details.
|
||||
#
|
||||
# Project Configuration File
|
||||
#
|
||||
# A detailed documentation with the EXAMPLES is located here:
|
||||
# http://docs.platformio.org/en/latest/projectconf.html
|
||||
#
|
||||
|
||||
# A sign `#` at the beginning of the line indicates a comment
|
||||
# Comment lines are ignored.
|
||||
|
||||
# Simple and base environment
|
||||
# [env:mybaseenv]
|
||||
# platform = %INSTALLED_PLATFORM_NAME_HERE%
|
||||
# framework =
|
||||
# board =
|
||||
#
|
||||
# Automatic targets - enable auto-uploading
|
||||
# targets = upload
|
||||
|
||||
[env:arduino_pro5v]
|
||||
platform = atmelavr
|
||||
|
@ -1,13 +1,27 @@
|
||||
# Copyright (C) Ivan Kravets <me@ikravets.com>
|
||||
# See LICENSE for details.
|
||||
#
|
||||
# Project Configuration File
|
||||
#
|
||||
# A detailed documentation with the EXAMPLES is located here:
|
||||
# http://docs.platformio.org/en/latest/projectconf.html
|
||||
#
|
||||
|
||||
# A sign `#` at the beginning of the line indicates a comment
|
||||
# Comment lines are ignored.
|
||||
|
||||
# Simple and base environment
|
||||
# [env:mybaseenv]
|
||||
# platform = %INSTALLED_PLATFORM_NAME_HERE%
|
||||
# framework =
|
||||
# board =
|
||||
#
|
||||
# Automatic targets - enable auto-uploading
|
||||
# targets = upload
|
||||
|
||||
[env:arduino_pro5v]
|
||||
platform = atmelavr
|
||||
board_mcu = atmega168
|
||||
board_f_cpu = 16000000L
|
||||
|
||||
upload_port = /dev/tty.SLAB_USBtoUART
|
||||
# upload_port = COM3
|
||||
upload_protocol = arduino
|
||||
upload_speed = 19200
|
||||
|
||||
|
@ -1,5 +1,21 @@
|
||||
# Copyright (C) Ivan Kravets <me@ikravets.com>
|
||||
# See LICENSE for details.
|
||||
#
|
||||
# Project Configuration File
|
||||
#
|
||||
# A detailed documentation with the EXAMPLES is located here:
|
||||
# http://docs.platformio.org/en/latest/projectconf.html
|
||||
#
|
||||
|
||||
# A sign `#` at the beginning of the line indicates a comment
|
||||
# Comment lines are ignored.
|
||||
|
||||
# Simple and base environment
|
||||
# [env:mybaseenv]
|
||||
# platform = %INSTALLED_PLATFORM_NAME_HERE%
|
||||
# framework =
|
||||
# board =
|
||||
#
|
||||
# Automatic targets - enable auto-uploading
|
||||
# targets = upload
|
||||
|
||||
[env:arduino_pro5v]
|
||||
platform = atmelavr
|
||||
|
@ -1,14 +1,26 @@
|
||||
# Copyright (C) Ivan Kravets <me@ikravets.com>
|
||||
# See LICENSE for details.
|
||||
#
|
||||
# Project Configuration File
|
||||
#
|
||||
# A detailed documentation with the EXAMPLES is located here:
|
||||
# http://docs.platformio.org/en/latest/projectconf.html
|
||||
#
|
||||
|
||||
# A sign `#` at the beginning of the line indicates a comment
|
||||
# Comment lines are ignored.
|
||||
|
||||
# Simple and base environment
|
||||
# [env:mybaseenv]
|
||||
# platform = %INSTALLED_PLATFORM_NAME_HERE%
|
||||
# framework =
|
||||
# board =
|
||||
#
|
||||
# Automatic targets - enable auto-uploading
|
||||
# targets = upload
|
||||
|
||||
[env:atmelavr_atmega168]
|
||||
platform = atmelavr
|
||||
board_mcu = atmega168
|
||||
board_f_cpu = 16000000L
|
||||
|
||||
# Allow autodetection for upload port or uncomment line below
|
||||
# upload_port = /dev/ttyUSB0
|
||||
# upload_port = COM3
|
||||
|
||||
upload_protocol = arduino
|
||||
upload_speed = 19200
|
||||
|
@ -1,5 +1,21 @@
|
||||
# Copyright (C) Ivan Kravets <me@ikravets.com>
|
||||
# See LICENSE for details.
|
||||
#
|
||||
# Project Configuration File
|
||||
#
|
||||
# A detailed documentation with the EXAMPLES is located here:
|
||||
# http://docs.platformio.org/en/latest/projectconf.html
|
||||
#
|
||||
|
||||
# A sign `#` at the beginning of the line indicates a comment
|
||||
# Comment lines are ignored.
|
||||
|
||||
# Simple and base environment
|
||||
# [env:mybaseenv]
|
||||
# platform = %INSTALLED_PLATFORM_NAME_HERE%
|
||||
# framework =
|
||||
# board =
|
||||
#
|
||||
# Automatic targets - enable auto-uploading
|
||||
# targets = upload
|
||||
|
||||
[env:launchpad_msp430g2]
|
||||
platform = timsp430
|
||||
|
@ -1,8 +1,23 @@
|
||||
# Copyright (C) Ivan Kravets <me@ikravets.com>
|
||||
# See LICENSE for details.
|
||||
#
|
||||
# Project Configuration File
|
||||
#
|
||||
# A detailed documentation with the EXAMPLES is located here:
|
||||
# http://docs.platformio.org/en/latest/projectconf.html
|
||||
#
|
||||
|
||||
# A sign `#` at the beginning of the line indicates a comment
|
||||
# Comment lines are ignored.
|
||||
|
||||
# Simple and base environment
|
||||
# [env:mybaseenv]
|
||||
# platform = %INSTALLED_PLATFORM_NAME_HERE%
|
||||
# framework =
|
||||
# board =
|
||||
#
|
||||
# Automatic targets - enable auto-uploading
|
||||
# targets = upload
|
||||
|
||||
[env:launchpad_lm4f120]
|
||||
platform = titiva
|
||||
framework = energia
|
||||
board = lplm4f120h5qr
|
||||
targets = upload
|
||||
|
@ -1,5 +1,21 @@
|
||||
# Copyright (C) Ivan Kravets <me@ikravets.com>
|
||||
# See LICENSE for details.
|
||||
#
|
||||
# Project Configuration File
|
||||
#
|
||||
# A detailed documentation with the EXAMPLES is located here:
|
||||
# http://docs.platformio.org/en/latest/projectconf.html
|
||||
#
|
||||
|
||||
# A sign `#` at the beginning of the line indicates a comment
|
||||
# Comment lines are ignored.
|
||||
|
||||
# Simple and base environment
|
||||
# [env:mybaseenv]
|
||||
# platform = %INSTALLED_PLATFORM_NAME_HERE%
|
||||
# framework =
|
||||
# board =
|
||||
#
|
||||
# Automatic targets - enable auto-uploading
|
||||
# targets = upload
|
||||
|
||||
[env:launchpad_msp430g2]
|
||||
platform = timsp430
|
||||
|
@ -1,5 +1,21 @@
|
||||
# Copyright (C) Ivan Kravets <me@ikravets.com>
|
||||
# See LICENSE for details.
|
||||
#
|
||||
# Project Configuration File
|
||||
#
|
||||
# A detailed documentation with the EXAMPLES is located here:
|
||||
# http://docs.platformio.org/en/latest/projectconf.html
|
||||
#
|
||||
|
||||
# A sign `#` at the beginning of the line indicates a comment
|
||||
# Comment lines are ignored.
|
||||
|
||||
# Simple and base environment
|
||||
# [env:mybaseenv]
|
||||
# platform = %INSTALLED_PLATFORM_NAME_HERE%
|
||||
# framework =
|
||||
# board =
|
||||
#
|
||||
# Automatic targets - enable auto-uploading
|
||||
# targets = upload
|
||||
|
||||
[env:launchpad_lm4f120]
|
||||
platform = titiva
|
||||
|
@ -1,19 +1,34 @@
|
||||
# Copyright (C) Ivan Kravets <me@ikravets.com>
|
||||
# See LICENSE for details.
|
||||
#
|
||||
# Project Configuration File
|
||||
#
|
||||
# A detailed documentation with the EXAMPLES is located here:
|
||||
# http://docs.platformio.org/en/latest/projectconf.html
|
||||
#
|
||||
|
||||
[env:arduino_pro5v]
|
||||
# A sign `#` at the beginning of the line indicates a comment
|
||||
# Comment lines are ignored.
|
||||
|
||||
# Simple and base environment
|
||||
# [env:mybaseenv]
|
||||
# platform = %INSTALLED_PLATFORM_NAME_HERE%
|
||||
# framework =
|
||||
# board =
|
||||
#
|
||||
# Automatic targets - enable auto-uploading
|
||||
# targets = upload
|
||||
|
||||
[env:arduino_uno]
|
||||
platform = atmelavr
|
||||
framework = arduino
|
||||
board = pro16MHzatmega168
|
||||
upload_port = /dev/tty.SLAB_USBtoUART
|
||||
board = uno
|
||||
|
||||
[env:launchpad_msp430g2]
|
||||
platform = timsp430
|
||||
framework = energia
|
||||
board = lpmsp430g2553
|
||||
|
||||
[env:launchpad_lm4f120]
|
||||
[env:launchpad_tm4c1230c3pm]
|
||||
platform = titiva
|
||||
framework = energia
|
||||
board = lplm4f120h5qr
|
||||
build_flags = "-DLED_PIN=GREEN_LED"
|
||||
board = lptm4c1230c3pm
|
||||
build_flags = -DLED_PIN=GREEN_LED
|
||||
|
@ -1,7 +1,7 @@
|
||||
# Copyright (C) Ivan Kravets <me@ikravets.com>
|
||||
# See LICENSE for details.
|
||||
|
||||
VERSION = (0, 10, 0)
|
||||
VERSION = (0, 10, 1)
|
||||
__version__ = ".".join([str(s) for s in VERSION])
|
||||
|
||||
__title__ = "platformio"
|
||||
|
@ -35,9 +35,7 @@ def BuildFirmware(env, corelibs):
|
||||
join("$BUILD_DIR", "src"), join("$PROJECT_DIR", "src"))
|
||||
|
||||
# build dependent libs
|
||||
deplibs = []
|
||||
for vdir in vdirs:
|
||||
deplibs += src.BuildDependentLibraries(vdir)
|
||||
deplibs = src.BuildDependentLibraries(vdirs)
|
||||
|
||||
src.MergeFlags(getenv("PIOSRCBUILD_FLAGS", "$SRCBUILD_FLAGS"))
|
||||
|
||||
@ -67,9 +65,9 @@ def BuildLibrary(env, variant_dir, library_dir):
|
||||
)
|
||||
|
||||
|
||||
def BuildDependentLibraries(env, src_dir):
|
||||
def BuildDependentLibraries(env, src_dirs):
|
||||
libs = []
|
||||
deplibs = env.GetDependentLibraries(src_dir)
|
||||
deplibs = env.GetDependentLibraries(src_dirs)
|
||||
env.Append(CPPPATH=[join("$BUILD_DIR", l) for (l, _) in deplibs])
|
||||
|
||||
for (libname, inc_dir) in deplibs:
|
||||
@ -80,10 +78,15 @@ def BuildDependentLibraries(env, src_dir):
|
||||
return libs
|
||||
|
||||
|
||||
def GetDependentLibraries(env, src_dir):
|
||||
def GetDependentLibraries(env, src_dirs):
|
||||
includes = {}
|
||||
nodes = []
|
||||
regexp = re.compile(r"^\s*#include\s+(?:\<|\")([^\>\"\']+)(?:\>|\")", re.M)
|
||||
nodes = env.GlobCXXFiles(src_dir) + env.Glob(join(src_dir, "*.h"))
|
||||
|
||||
for item in src_dirs:
|
||||
nodes += env.GlobCXXFiles(item)
|
||||
nodes += env.Glob(join(item, "*.h"))
|
||||
|
||||
for node in nodes:
|
||||
env.ParseIncludesRecurive(regexp, node, includes)
|
||||
includes = sorted(includes.items(), key=lambda s: s[0])
|
||||
@ -108,10 +111,12 @@ def ParseIncludesRecurive(env, regexp, source_file, includes):
|
||||
for inc_fname in matches:
|
||||
if inc_fname in includes:
|
||||
continue
|
||||
|
||||
for lsd_dir in env['LIBSOURCE_DIRS']:
|
||||
lsd_dir = env.subst(lsd_dir)
|
||||
if not isdir(lsd_dir):
|
||||
continue
|
||||
|
||||
for libname in listdir(lsd_dir):
|
||||
inc_dir = join(lsd_dir, libname)
|
||||
inc_file = join(inc_dir, inc_fname)
|
||||
@ -121,6 +126,7 @@ def ParseIncludesRecurive(env, regexp, source_file, includes):
|
||||
inc_file = join(inc_dir, inc_fname)
|
||||
if not isfile(inc_file):
|
||||
continue
|
||||
|
||||
includes[inc_fname] = (len(includes) + 1, libname, inc_dir)
|
||||
env.ParseIncludesRecurive(regexp, env.File(inc_file), includes)
|
||||
|
||||
|
@ -17,7 +17,7 @@ from platformio.util import get_boards, get_source_dir
|
||||
type=click.Path(exists=True, file_okay=False, dir_okay=True,
|
||||
writable=True, resolve_path=True))
|
||||
@click.option("--board", "-b", multiple=True, metavar="TYPE")
|
||||
@click.option('--disable-auto-uploading', is_flag=True)
|
||||
@click.option("--disable-auto-uploading", is_flag=True)
|
||||
def cli(project_dir, board, disable_auto_uploading):
|
||||
|
||||
project_file = join(project_dir, "platformio.ini")
|
||||
@ -89,8 +89,8 @@ def fill_project_envs(project_file, board_types, disable_auto_uploading):
|
||||
content.append("framework = %s" % framework)
|
||||
content.append("board = %s" % type_)
|
||||
|
||||
content.append("%stargets = upload" % "# " if disable_auto_uploading
|
||||
else "")
|
||||
content.append("%stargets = upload" % ("# " if disable_auto_uploading
|
||||
else ""))
|
||||
|
||||
with open(project_file, "a") as f:
|
||||
f.write("\n".join(content))
|
||||
|
@ -154,9 +154,15 @@ def lib_uninstall(libid):
|
||||
|
||||
|
||||
@cli.command("list", short_help="List installed libraries")
|
||||
def lib_list():
|
||||
@click.option("--json-output", is_flag=True)
|
||||
def lib_list(json_output):
|
||||
lm = LibraryManager(get_lib_dir())
|
||||
items = lm.get_installed().values()
|
||||
|
||||
if json_output:
|
||||
click.echo(items)
|
||||
return
|
||||
|
||||
if not items:
|
||||
return
|
||||
|
||||
|
@ -7,15 +7,26 @@ from platformio.platforms.base import PlatformFactory
|
||||
|
||||
|
||||
@click.command("list", short_help="List installed platforms")
|
||||
def cli():
|
||||
@click.option("--json-output", is_flag=True)
|
||||
def cli(json_output):
|
||||
|
||||
installed_platforms = PlatformFactory.get_platforms(
|
||||
installed=True).keys()
|
||||
installed_platforms.sort()
|
||||
|
||||
data = []
|
||||
for platform in installed_platforms:
|
||||
p = PlatformFactory.newPlatform(platform)
|
||||
click.echo("{name:<20} with packages: {pkgs}".format(
|
||||
name=click.style(p.get_name(), fg="cyan"),
|
||||
pkgs=", ".join(p.get_installed_packages())
|
||||
))
|
||||
data.append({
|
||||
"name": platform,
|
||||
"packages": p.get_installed_packages()
|
||||
})
|
||||
|
||||
if json_output:
|
||||
click.echo(data)
|
||||
else:
|
||||
for item in data:
|
||||
click.echo("{name:<20} with packages: {pkgs}".format(
|
||||
name=click.style(item['name'], fg="cyan"),
|
||||
pkgs=", ".join(item['packages'])
|
||||
))
|
||||
|
@ -15,7 +15,12 @@ def cli():
|
||||
|
||||
|
||||
@cli.command("list", short_help="List Serial ports")
|
||||
def serialports_list():
|
||||
@click.option("--json-output", is_flag=True)
|
||||
def serialports_list(json_output):
|
||||
|
||||
if json_output:
|
||||
click.echo(get_serialports())
|
||||
return
|
||||
|
||||
for item in get_serialports():
|
||||
click.secho(item['port'], fg="cyan")
|
||||
|
@ -98,7 +98,7 @@ def after_upgrade(ctx):
|
||||
click.style("give", fg="cyan"),
|
||||
click.style("https://github.com/ivankravets/platformio", fg="cyan")
|
||||
))
|
||||
click.secho("Thanks a lot!\n", fg="green", blink=True)
|
||||
click.secho("Thanks a lot!\n", fg="green")
|
||||
|
||||
if not isdir(get_home_dir()):
|
||||
return
|
||||
|
Reference in New Issue
Block a user