Rename "srcbuild_flags" env option to "src_build_flags"

This commit is contained in:
Ivan Kravets
2015-06-28 20:18:16 +03:00
parent e288499db9
commit 1af6eba151
6 changed files with 33 additions and 33 deletions

View File

@@ -465,10 +465,10 @@ Release History
* Implemented `platformio serialports <http://docs.platformio.org/en/latest/userguide/cmd_serialports.html>`_ command * Implemented `platformio serialports <http://docs.platformio.org/en/latest/userguide/cmd_serialports.html>`_ command
* Allowed to put special build flags only for ``src`` files via * Allowed to put special build flags only for ``src`` files via
`srcbuild_flags <http://docs.platformio.org/en/latest/projectconf.html#srcbuild-flags>`_ `src_build_flags <http://docs.platformio.org/en/latest/projectconf.html#src_build-flags>`_
environment option environment option
* Allowed to override some of settings via system environment variables * Allowed to override some of settings via system environment variables
such as: ``PLATFORMIO_SRCBUILD_FLAGS`` and ``PLATFORMIO_ENVS_DIR`` such as: ``PLATFORMIO_SRC_BUILD_FLAGS`` and ``PLATFORMIO_ENVS_DIR``
* Added ``--upload-port`` option for `platformio run <http://docs.platformio.org/en/latest/userguide/cmd_run.html#cmdoption--upload-port>`__ command * Added ``--upload-port`` option for `platformio run <http://docs.platformio.org/en/latest/userguide/cmd_run.html#cmdoption--upload-port>`__ command
* Implemented (especially for `SmartAnthill <http://docs.smartanthill.ikravets.com/>`_) * Implemented (especially for `SmartAnthill <http://docs.smartanthill.ikravets.com/>`_)
`platformio run -t uploadlazy <http://docs.platformio.org/en/latest/userguide/cmd_run.html>`_ `platformio run -t uploadlazy <http://docs.platformio.org/en/latest/userguide/cmd_run.html>`_

View File

@@ -70,12 +70,12 @@ PLATFORMIO_BUILD_FLAGS
Allows to set :ref:`projectconf` option :ref:`projectconf_build_flags`. Allows to set :ref:`projectconf` option :ref:`projectconf_build_flags`.
.. _envvar_PLATFORMIO_SRCBUILD_FLAGS: .. _envvar_PLATFORMIO_SRC_BUILD_FLAGS:
PLATFORMIO_SRCBUILD_FLAGS PLATFORMIO_SRC_BUILD_FLAGS
~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~
Allows to set :ref:`projectconf` option :ref:`projectconf_srcbuild_flags`. Allows to set :ref:`projectconf` option :ref:`projectconf_src_build_flags`.
.. _envvar_PLATFORMIO_SRC_FILTER: .. _envvar_PLATFORMIO_SRC_FILTER:

View File

@@ -145,7 +145,8 @@ need to specify ``board_mcu``, ``board_f_cpu``, ``upload_protocol`` or
``upload_speed`` options. Just define a ``board`` type and *PlatformIO* will ``upload_speed`` options. Just define a ``board`` type and *PlatformIO* will
pre-fill options described above with appropriate values. pre-fill options described above with appropriate values.
You can find the ``board`` type in *Boards* section of each :ref:`platforms`. You can find the ``board`` type in *Boards* section of each :ref:`platforms` or
using `PlatformIO Embedded Boards Explorer <http://platformio.org/#!/boards>`_.
``board_mcu`` ``board_mcu``
@@ -198,20 +199,6 @@ A protocol that "uploader" tool uses to talk to the board.
A connection speed (`baud rate <http://en.wikipedia.org/wiki/Baud>`_) A connection speed (`baud rate <http://en.wikipedia.org/wiki/Baud>`_)
which "uploader" tool uses when sending firmware to board. which "uploader" tool uses when sending firmware to board.
``targets``
^^^^^^^^^^^
A list with targets which will be processed by :ref:`cmd_run` command by
default. You can enter more then one target separated with "space".
When no targets are defined, *PlatformIO* will build only sources by default.
.. note::
This option is useful to enable "auto-uploading" after building operation
(``targets = upload``).
.. _projectconf_build_flags: .. _projectconf_build_flags:
``build_flags`` ``build_flags``
@@ -307,17 +294,17 @@ For more detailed information about available flags/options go to:
* `Options for Directory Search * `Options for Directory Search
<https://gcc.gnu.org/onlinedocs/gcc/Directory-Options.html>`_ <https://gcc.gnu.org/onlinedocs/gcc/Directory-Options.html>`_
.. _projectconf_srcbuild_flags: .. _projectconf_src_build_flags:
``srcbuild_flags`` ``src_build_flags``
^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^
An option ``srcbuild_flags`` has the same behaviour like ``build_flags`` An option ``src_build_flags`` has the same behaviour like ``build_flags``
but will be applied only for the project source code from but will be applied only for the project source code from
:ref:`projectconf_pio_src_dir` directory. :ref:`projectconf_pio_src_dir` directory.
This option can be set by global environment variable This option can be set by global environment variable
:ref:`envvar_PLATFORMIO_SRCBUILD_FLAGS`. :ref:`envvar_PLATFORMIO_SRC_BUILD_FLAGS`.
.. _projectconf_src_filter: .. _projectconf_src_filter:
@@ -439,6 +426,18 @@ Example, specify own upload command for :ref:`platform_atmelavr`:
See built-in examples of `PlatformIO build scripts <https://github.com/platformio/platformio/tree/develop/platformio/builder/scripts>`_. See built-in examples of `PlatformIO build scripts <https://github.com/platformio/platformio/tree/develop/platformio/builder/scripts>`_.
``targets``
^^^^^^^^^^^
A list with targets which will be processed by :ref:`cmd_run` command by
default. You can enter more then one target separated with "space".
When no targets are defined, *PlatformIO* will build only sources by default.
.. note::
This option is useful to enable "auto-uploading" after building operation
(``targets = upload``).
.. _projectconf_examples: .. _projectconf_examples:
Examples Examples

View File

@@ -38,7 +38,7 @@ commonvars.AddVariables(
# options # options
("FRAMEWORK",), ("FRAMEWORK",),
("BUILD_FLAGS",), ("BUILD_FLAGS",),
("SRCBUILD_FLAGS",), ("SRC_BUILD_FLAGS",),
("SRC_FILTER",), ("SRC_FILTER",),
("LIB_DFCYCLIC",), ("LIB_DFCYCLIC",),
("LIB_IGNORE",), ("LIB_IGNORE",),

View File

@@ -49,11 +49,11 @@ def BuildFirmware(env):
_LIBFLAGS=" -Wl,--end-group" _LIBFLAGS=" -Wl,--end-group"
) )
# Handle SRCBUILD_FLAGS # Handle SRC_BUILD_FLAGS
if getenv("PLATFORMIO_SRCBUILD_FLAGS", None): if getenv("PLATFORMIO_SRC_BUILD_FLAGS", None):
env.MergeFlags(getenv("PLATFORMIO_SRCBUILD_FLAGS")) env.MergeFlags(getenv("PLATFORMIO_SRC_BUILD_FLAGS"))
if "SRCBUILD_FLAGS" in env: if "SRC_BUILD_FLAGS" in env:
env.MergeFlags(env['SRCBUILD_FLAGS']) env.MergeFlags(env['SRC_BUILD_FLAGS'])
env.Append( env.Append(
CPPDEFINES=["PLATFORMIO={0:02d}{1:02d}{2:02d}".format( CPPDEFINES=["PLATFORMIO={0:02d}{1:02d}{2:02d}".format(

View File

@@ -77,7 +77,8 @@ class EnvironmentProcessor(object):
"INSTALL_LIBS": "LIB_INSTALL", "INSTALL_LIBS": "LIB_INSTALL",
"IGNORE_LIBS": "LIB_IGNORE", "IGNORE_LIBS": "LIB_IGNORE",
"USE_LIBS": "LIB_USE", "USE_LIBS": "LIB_USE",
"LDF_CYCLIC": "LIB_DFCYCLIC" "LDF_CYCLIC": "LIB_DFCYCLIC",
"SRCBUILD_FLAGS": "SRC_BUILD_FLAGS"
} }
def __init__(self, cmd_ctx, name, options, # pylint: disable=R0913 def __init__(self, cmd_ctx, name, options, # pylint: disable=R0913