mirror of
https://github.com/platformio/platformio-core.git
synced 2025-07-31 10:37:13 +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
|
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>`_
|
* Implemented `platformio boards <http://docs.platformio.org/en/latest/userguide/cmd_boards.html>`_
|
||||||
command (`issue #11 <https://github.com/ivankravets/platformio/issues/11>`_)
|
command (`issue #11 <https://github.com/ivankravets/platformio/issues/11>`_)
|
||||||
* Added support of *Engduino* boards for
|
* Added support of *Engduino* boards for
|
||||||
`atmelavr <http://docs.platformio.org/en/latest/platforms/atmelavr.html#engduino>`__
|
`atmelavr <http://docs.platformio.org/en/latest/platforms/atmelavr.html#engduino>`__
|
||||||
platform (`issue #38 <https://github.com/ivankravets/platformio/issues/38>`_)
|
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
|
command which allows to initialise project with the specified embedded boards
|
||||||
(`issue #21 <https://github.com/ivankravets/platformio/issues/21>`_)
|
(`issue #21 <https://github.com/ivankravets/platformio/issues/21>`_)
|
||||||
* Added `example with uploading firmware <http://docs.platformio.org/en/latest/projectconf.html#examples>`_
|
* 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 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>`_)
|
* Fixed bug with *Arduino USB* boards (`issue #40 <https://github.com/ivankravets/platformio/issues/40>`_)
|
||||||
|
|
||||||
|
|
||||||
0.9.2 (2014-12-10)
|
0.9.2 (2014-12-10)
|
||||||
------------------
|
------------------
|
||||||
|
|
||||||
|
@ -9,15 +9,15 @@ Quickstart
|
|||||||
|
|
||||||
1. :ref:`Install PlatformIO <installation>`.
|
1. :ref:`Install PlatformIO <installation>`.
|
||||||
|
|
||||||
2. Find board ``type`` from :ref:`platforms` (you can choose multiple board
|
2. Find board ``type`` on this :ref:`Embedded Boards <platforms>` page or
|
||||||
types).
|
via :ref:`cmd_boards` command.
|
||||||
|
|
||||||
3. Initialize new PlatformIO based project with the pre-configured
|
3. Initialize new PlatformIO based project with the pre-configured
|
||||||
environments for your boards:
|
environments for your boards:
|
||||||
|
|
||||||
.. code-block:: bash
|
.. 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.
|
The current working directory *** will be used for the new project.
|
||||||
You can specify another project directory via
|
You can specify another project directory via
|
||||||
|
@ -10,7 +10,7 @@ Usage
|
|||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
platformio list
|
platformio list [OPTIONS]
|
||||||
|
|
||||||
|
|
||||||
Description
|
Description
|
||||||
@ -18,6 +18,13 @@ Description
|
|||||||
|
|
||||||
List installed :ref:`Platforms <platforms>`
|
List installed :ref:`Platforms <platforms>`
|
||||||
|
|
||||||
|
Options
|
||||||
|
~~~~~~~
|
||||||
|
|
||||||
|
.. option::
|
||||||
|
--json-output
|
||||||
|
|
||||||
|
Return the output in `JSON <http://en.wikipedia.org/wiki/JSON>`_ format
|
||||||
|
|
||||||
Examples
|
Examples
|
||||||
--------
|
--------
|
||||||
|
@ -13,7 +13,7 @@ Usage
|
|||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
platformio serialports list
|
platformio serialports list [OPTIONS]
|
||||||
|
|
||||||
|
|
||||||
Description
|
Description
|
||||||
@ -21,6 +21,14 @@ Description
|
|||||||
|
|
||||||
List available `Serial Ports <http://en.wikipedia.org/wiki/Serial_port>`_
|
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
|
Examples
|
||||||
~~~~~~~~
|
~~~~~~~~
|
||||||
|
@ -10,7 +10,7 @@ Usage
|
|||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
platformio lib list
|
platformio lib list [OPTIONS]
|
||||||
|
|
||||||
|
|
||||||
Description
|
Description
|
||||||
@ -18,6 +18,13 @@ Description
|
|||||||
|
|
||||||
List installed libraries
|
List installed libraries
|
||||||
|
|
||||||
|
Options
|
||||||
|
~~~~~~~
|
||||||
|
|
||||||
|
.. option::
|
||||||
|
--json-output
|
||||||
|
|
||||||
|
Return the output in `JSON <http://en.wikipedia.org/wiki/JSON>`_ format
|
||||||
|
|
||||||
Examples
|
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]
|
[env:microduino]
|
||||||
platform = atmelavr
|
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]
|
[env:arduino_pro5v]
|
||||||
platform = atmelavr
|
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]
|
[env:arduino_pro5v]
|
||||||
platform = atmelavr
|
platform = atmelavr
|
||||||
board_mcu = atmega168
|
board_mcu = atmega168
|
||||||
board_f_cpu = 16000000L
|
board_f_cpu = 16000000L
|
||||||
|
|
||||||
upload_port = /dev/tty.SLAB_USBtoUART
|
|
||||||
# upload_port = COM3
|
|
||||||
upload_protocol = arduino
|
upload_protocol = arduino
|
||||||
upload_speed = 19200
|
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]
|
[env:arduino_pro5v]
|
||||||
platform = atmelavr
|
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]
|
[env:atmelavr_atmega168]
|
||||||
platform = atmelavr
|
platform = atmelavr
|
||||||
board_mcu = atmega168
|
board_mcu = atmega168
|
||||||
board_f_cpu = 16000000L
|
board_f_cpu = 16000000L
|
||||||
|
|
||||||
# Allow autodetection for upload port or uncomment line below
|
|
||||||
# upload_port = /dev/ttyUSB0
|
|
||||||
# upload_port = COM3
|
|
||||||
|
|
||||||
upload_protocol = arduino
|
upload_protocol = arduino
|
||||||
upload_speed = 19200
|
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]
|
[env:launchpad_msp430g2]
|
||||||
platform = timsp430
|
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]
|
[env:launchpad_lm4f120]
|
||||||
platform = titiva
|
platform = titiva
|
||||||
framework = energia
|
framework = energia
|
||||||
board = lplm4f120h5qr
|
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]
|
[env:launchpad_msp430g2]
|
||||||
platform = timsp430
|
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]
|
[env:launchpad_lm4f120]
|
||||||
platform = titiva
|
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
|
platform = atmelavr
|
||||||
framework = arduino
|
framework = arduino
|
||||||
board = pro16MHzatmega168
|
board = uno
|
||||||
upload_port = /dev/tty.SLAB_USBtoUART
|
|
||||||
|
|
||||||
[env:launchpad_msp430g2]
|
[env:launchpad_msp430g2]
|
||||||
platform = timsp430
|
platform = timsp430
|
||||||
framework = energia
|
framework = energia
|
||||||
board = lpmsp430g2553
|
board = lpmsp430g2553
|
||||||
|
|
||||||
[env:launchpad_lm4f120]
|
[env:launchpad_tm4c1230c3pm]
|
||||||
platform = titiva
|
platform = titiva
|
||||||
framework = energia
|
framework = energia
|
||||||
board = lplm4f120h5qr
|
board = lptm4c1230c3pm
|
||||||
build_flags = "-DLED_PIN=GREEN_LED"
|
build_flags = -DLED_PIN=GREEN_LED
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
# Copyright (C) Ivan Kravets <me@ikravets.com>
|
# Copyright (C) Ivan Kravets <me@ikravets.com>
|
||||||
# See LICENSE for details.
|
# See LICENSE for details.
|
||||||
|
|
||||||
VERSION = (0, 10, 0)
|
VERSION = (0, 10, 1)
|
||||||
__version__ = ".".join([str(s) for s in VERSION])
|
__version__ = ".".join([str(s) for s in VERSION])
|
||||||
|
|
||||||
__title__ = "platformio"
|
__title__ = "platformio"
|
||||||
|
@ -35,9 +35,7 @@ def BuildFirmware(env, corelibs):
|
|||||||
join("$BUILD_DIR", "src"), join("$PROJECT_DIR", "src"))
|
join("$BUILD_DIR", "src"), join("$PROJECT_DIR", "src"))
|
||||||
|
|
||||||
# build dependent libs
|
# build dependent libs
|
||||||
deplibs = []
|
deplibs = src.BuildDependentLibraries(vdirs)
|
||||||
for vdir in vdirs:
|
|
||||||
deplibs += src.BuildDependentLibraries(vdir)
|
|
||||||
|
|
||||||
src.MergeFlags(getenv("PIOSRCBUILD_FLAGS", "$SRCBUILD_FLAGS"))
|
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 = []
|
libs = []
|
||||||
deplibs = env.GetDependentLibraries(src_dir)
|
deplibs = env.GetDependentLibraries(src_dirs)
|
||||||
env.Append(CPPPATH=[join("$BUILD_DIR", l) for (l, _) in deplibs])
|
env.Append(CPPPATH=[join("$BUILD_DIR", l) for (l, _) in deplibs])
|
||||||
|
|
||||||
for (libname, inc_dir) in deplibs:
|
for (libname, inc_dir) in deplibs:
|
||||||
@ -80,10 +78,15 @@ def BuildDependentLibraries(env, src_dir):
|
|||||||
return libs
|
return libs
|
||||||
|
|
||||||
|
|
||||||
def GetDependentLibraries(env, src_dir):
|
def GetDependentLibraries(env, src_dirs):
|
||||||
includes = {}
|
includes = {}
|
||||||
|
nodes = []
|
||||||
regexp = re.compile(r"^\s*#include\s+(?:\<|\")([^\>\"\']+)(?:\>|\")", re.M)
|
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:
|
for node in nodes:
|
||||||
env.ParseIncludesRecurive(regexp, node, includes)
|
env.ParseIncludesRecurive(regexp, node, includes)
|
||||||
includes = sorted(includes.items(), key=lambda s: s[0])
|
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:
|
for inc_fname in matches:
|
||||||
if inc_fname in includes:
|
if inc_fname in includes:
|
||||||
continue
|
continue
|
||||||
|
|
||||||
for lsd_dir in env['LIBSOURCE_DIRS']:
|
for lsd_dir in env['LIBSOURCE_DIRS']:
|
||||||
lsd_dir = env.subst(lsd_dir)
|
lsd_dir = env.subst(lsd_dir)
|
||||||
if not isdir(lsd_dir):
|
if not isdir(lsd_dir):
|
||||||
continue
|
continue
|
||||||
|
|
||||||
for libname in listdir(lsd_dir):
|
for libname in listdir(lsd_dir):
|
||||||
inc_dir = join(lsd_dir, libname)
|
inc_dir = join(lsd_dir, libname)
|
||||||
inc_file = join(inc_dir, inc_fname)
|
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)
|
inc_file = join(inc_dir, inc_fname)
|
||||||
if not isfile(inc_file):
|
if not isfile(inc_file):
|
||||||
continue
|
continue
|
||||||
|
|
||||||
includes[inc_fname] = (len(includes) + 1, libname, inc_dir)
|
includes[inc_fname] = (len(includes) + 1, libname, inc_dir)
|
||||||
env.ParseIncludesRecurive(regexp, env.File(inc_file), includes)
|
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,
|
type=click.Path(exists=True, file_okay=False, dir_okay=True,
|
||||||
writable=True, resolve_path=True))
|
writable=True, resolve_path=True))
|
||||||
@click.option("--board", "-b", multiple=True, metavar="TYPE")
|
@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):
|
def cli(project_dir, board, disable_auto_uploading):
|
||||||
|
|
||||||
project_file = join(project_dir, "platformio.ini")
|
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("framework = %s" % framework)
|
||||||
content.append("board = %s" % type_)
|
content.append("board = %s" % type_)
|
||||||
|
|
||||||
content.append("%stargets = upload" % "# " if disable_auto_uploading
|
content.append("%stargets = upload" % ("# " if disable_auto_uploading
|
||||||
else "")
|
else ""))
|
||||||
|
|
||||||
with open(project_file, "a") as f:
|
with open(project_file, "a") as f:
|
||||||
f.write("\n".join(content))
|
f.write("\n".join(content))
|
||||||
|
@ -154,9 +154,15 @@ def lib_uninstall(libid):
|
|||||||
|
|
||||||
|
|
||||||
@cli.command("list", short_help="List installed libraries")
|
@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())
|
lm = LibraryManager(get_lib_dir())
|
||||||
items = lm.get_installed().values()
|
items = lm.get_installed().values()
|
||||||
|
|
||||||
|
if json_output:
|
||||||
|
click.echo(items)
|
||||||
|
return
|
||||||
|
|
||||||
if not items:
|
if not items:
|
||||||
return
|
return
|
||||||
|
|
||||||
|
@ -7,15 +7,26 @@ from platformio.platforms.base import PlatformFactory
|
|||||||
|
|
||||||
|
|
||||||
@click.command("list", short_help="List installed platforms")
|
@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_platforms = PlatformFactory.get_platforms(
|
||||||
installed=True).keys()
|
installed=True).keys()
|
||||||
installed_platforms.sort()
|
installed_platforms.sort()
|
||||||
|
|
||||||
|
data = []
|
||||||
for platform in installed_platforms:
|
for platform in installed_platforms:
|
||||||
p = PlatformFactory.newPlatform(platform)
|
p = PlatformFactory.newPlatform(platform)
|
||||||
click.echo("{name:<20} with packages: {pkgs}".format(
|
data.append({
|
||||||
name=click.style(p.get_name(), fg="cyan"),
|
"name": platform,
|
||||||
pkgs=", ".join(p.get_installed_packages())
|
"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")
|
@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():
|
for item in get_serialports():
|
||||||
click.secho(item['port'], fg="cyan")
|
click.secho(item['port'], fg="cyan")
|
||||||
|
@ -98,7 +98,7 @@ def after_upgrade(ctx):
|
|||||||
click.style("give", fg="cyan"),
|
click.style("give", fg="cyan"),
|
||||||
click.style("https://github.com/ivankravets/platformio", 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()):
|
if not isdir(get_home_dir()):
|
||||||
return
|
return
|
||||||
|
Reference in New Issue
Block a user