mirror of
https://github.com/platformio/platformio-core.git
synced 2025-07-30 10:07:14 +02:00
Merge branch 'release/v2.2.0'
This commit is contained in:
45
HISTORY.rst
45
HISTORY.rst
@ -1,12 +1,42 @@
|
|||||||
Release History
|
Release History
|
||||||
===============
|
===============
|
||||||
|
|
||||||
|
2.2.0 (2015-07-01)
|
||||||
|
------------------
|
||||||
|
|
||||||
|
* Allowed to exclude/include source files from build process using
|
||||||
|
`src_filter <http://docs.platformio.org/en/latest/projectconf.html#src-filter>`__
|
||||||
|
(`issue #240 <https://github.com/platformio/platformio/issues/240>`_)
|
||||||
|
* Launch own extra script before firmware building/uploading processes
|
||||||
|
(`issue #239 <https://github.com/platformio/platformio/issues/239>`_)
|
||||||
|
* Specify own path to the linker script (ld) using
|
||||||
|
`build_flags <http://docs.platformio.org/en/latest/projectconf.html#build-flags>`__
|
||||||
|
option
|
||||||
|
(`issue #233 <https://github.com/platformio/platformio/issues/233>`_)
|
||||||
|
* Specify library compatibility with the all platforms/frameworks
|
||||||
|
using ``*`` symbol in
|
||||||
|
`library.json <http://docs.platformio.org/en/latest/librarymanager/config.html>`__
|
||||||
|
* Added support for new embedded boards: *ST 32L0538DISCOVERY and Delta DFCM-NNN40*
|
||||||
|
to `Framework mbed <http://docs.platformio.org/en/latest/frameworks/mbed.html>`__
|
||||||
|
* Updated packages for
|
||||||
|
`Framework Arduino (AVR, SAM, Espressif and Teensy cores <http://docs.platformio.org/en/latest/frameworks/arduino.html>`__,
|
||||||
|
`Framework mbed <http://docs.platformio.org/en/latest/frameworks/mbed.html>`__,
|
||||||
|
`Espressif ESP8266 SDK <http://docs.platformio.org/en/latest/platforms/espressif.html>`__
|
||||||
|
(`issue #246 <https://github.com/platformio/platformio/issues/246>`_)
|
||||||
|
* Fixed ``stk500v2_command(): command failed``
|
||||||
|
(`issue #238 <https://github.com/platformio/platformio/issues/238>`_)
|
||||||
|
* Fixed IDE project generator when board is specified
|
||||||
|
(`issue #242 <https://github.com/platformio/platformio/issues/242>`_)
|
||||||
|
* Fixed relative path for includes when generating project for IDE
|
||||||
|
(`issue #243 <https://github.com/platformio/platformio/issues/243>`_)
|
||||||
|
* Fixed ESP8266 native SDK exception
|
||||||
|
(`issue #245 <https://github.com/platformio/platformio/issues/245>`_)
|
||||||
|
|
||||||
2.1.2 (2015-06-21)
|
2.1.2 (2015-06-21)
|
||||||
------------------
|
------------------
|
||||||
|
|
||||||
* Fixed broken link to SCons installer
|
* Fixed broken link to SCons installer
|
||||||
|
|
||||||
|
|
||||||
2.1.1 (2015-06-09)
|
2.1.1 (2015-06-09)
|
||||||
------------------
|
------------------
|
||||||
|
|
||||||
@ -43,9 +73,8 @@ Release History
|
|||||||
2.0.1 (2015-05-27)
|
2.0.1 (2015-05-27)
|
||||||
------------------
|
------------------
|
||||||
|
|
||||||
* Handle new environment variables
|
* Handle new environment variable
|
||||||
`PLATFORMIO_BUILD_FLAGS <http://docs.platformio.org/en/latest/envvars.html#platformio-build-flags>`_
|
`PLATFORMIO_BUILD_FLAGS <http://docs.platformio.org/en/latest/envvars.html#platformio-build-flags>`_
|
||||||
and `PLATFORMIO_LDF_CYCLIC <http://docs.platformio.org/en/latest/envvars.html#platformio-ldf-cyclic>`_
|
|
||||||
* Pass to API requests information about Continuous Integration system. This
|
* Pass to API requests information about Continuous Integration system. This
|
||||||
information will be used by PlatformIO-API.
|
information will be used by PlatformIO-API.
|
||||||
* Use ``include`` directories from toolchain when initialising project for IDE
|
* Use ``include`` directories from toolchain when initialising project for IDE
|
||||||
@ -85,11 +114,11 @@ Release History
|
|||||||
(`issue #192 <https://github.com/platformio/platformio/issues/192>`_)
|
(`issue #192 <https://github.com/platformio/platformio/issues/192>`_)
|
||||||
* Control verbosity of `platformio run <http://docs.platformio.org/en/latest/userguide/cmd_run.html#cmdoption-platformio-run-v>`_ command via ``-v/--verbose`` option
|
* Control verbosity of `platformio run <http://docs.platformio.org/en/latest/userguide/cmd_run.html#cmdoption-platformio-run-v>`_ command via ``-v/--verbose`` option
|
||||||
* Add library dependencies for build environment using
|
* Add library dependencies for build environment using
|
||||||
`install_libs <http://docs.platformio.org/en/latest/projectconf.html#install-libs>`_
|
`lib_install <http://docs.platformio.org/en/latest/projectconf.html#lib-install>`_
|
||||||
option in ``platformio.ini``
|
option in ``platformio.ini``
|
||||||
(`issue #134 <https://github.com/platformio/platformio/issues/134>`_)
|
(`issue #134 <https://github.com/platformio/platformio/issues/134>`_)
|
||||||
* Specify libraries which are compatible with build environment using
|
* Specify libraries which are compatible with build environment using
|
||||||
`use_libs <http://docs.platformio.org/en/latest/projectconf.html#use-libs>`_
|
`lib_use <http://docs.platformio.org/en/latest/projectconf.html#lib-use>`_
|
||||||
option in ``platformio.ini``
|
option in ``platformio.ini``
|
||||||
(`issue #148 <https://github.com/platformio/platformio/issues/148>`_)
|
(`issue #148 <https://github.com/platformio/platformio/issues/148>`_)
|
||||||
* Add more boards to PlatformIO project with
|
* Add more boards to PlatformIO project with
|
||||||
@ -277,7 +306,7 @@ Release History
|
|||||||
commands which allows to return the output in `JSON <http://en.wikipedia.org/wiki/JSON>`_ format
|
commands which allows to return the output in `JSON <http://en.wikipedia.org/wiki/JSON>`_ format
|
||||||
(`issue #42 <https://github.com/platformio/platformio/issues/42>`_)
|
(`issue #42 <https://github.com/platformio/platformio/issues/42>`_)
|
||||||
* Allowed to ignore some libs from *Library Dependency Finder* via
|
* Allowed to ignore some libs from *Library Dependency Finder* via
|
||||||
`ignore_libs <http://docs.platformio.org/en/latest/projectconf.html#ignore-libs>`_ option
|
`lib_ignore <http://docs.platformio.org/en/latest/projectconf.html#lib-ignore>`_ option
|
||||||
* Improved `platformio run <http://docs.platformio.org/en/latest/userguide/cmd_run.html>`__
|
* Improved `platformio run <http://docs.platformio.org/en/latest/userguide/cmd_run.html>`__
|
||||||
command: asynchronous output for build process, timing and detailed
|
command: asynchronous output for build process, timing and detailed
|
||||||
information about environment configuration
|
information about environment configuration
|
||||||
@ -445,10 +474,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>`_
|
||||||
|
21
README.rst
21
README.rst
@ -38,15 +38,16 @@ PlatformIO
|
|||||||
`Reddit <http://www.reddit.com/r/platformio/>`_ |
|
`Reddit <http://www.reddit.com/r/platformio/>`_ |
|
||||||
`Twitter <https://twitter.com/PlatformIO_Org>`_
|
`Twitter <https://twitter.com/PlatformIO_Org>`_
|
||||||
|
|
||||||
*Atmel AVR & SAM, Espressif, Freescale Kinetis, Nordic nRF51, NXP LPC,
|
|
||||||
Silicon Labs EFM32, ST STM32, TI MSP430 & Tiva, Teensy, Arduino, mbed,
|
|
||||||
libOpenCM3, etc.*
|
|
||||||
|
|
||||||
.. image:: https://raw.githubusercontent.com/platformio/platformio/develop/docs/_static/platformio-logo.png
|
.. image:: https://raw.githubusercontent.com/platformio/platformio/develop/docs/_static/platformio-logo.png
|
||||||
:target: http://platformio.org
|
:target: http://platformio.org
|
||||||
|
|
||||||
`PlatformIO <http://platformio.org>`_ is a cross-platform code builder
|
`PlatformIO <http://platformio.org>`_ is a cross-platform code builder
|
||||||
and the missing library manager.
|
and the missing library manager (Ready for embedded development, IDE and
|
||||||
|
Continuous integration, Arduino and MBED compatible).
|
||||||
|
|
||||||
|
*Atmel AVR & SAM, Espressif, Freescale Kinetis, Nordic nRF51, NXP LPC,
|
||||||
|
Silicon Labs EFM32, ST STM32, TI MSP430 & Tiva, Teensy, Arduino, mbed,
|
||||||
|
libOpenCM3, etc.*
|
||||||
|
|
||||||
* `Get Started <http://platformio.org/#!/get-started>`_
|
* `Get Started <http://platformio.org/#!/get-started>`_
|
||||||
* `Web 2.0 Library Search <http://platformio.org/#!/lib>`_
|
* `Web 2.0 Library Search <http://platformio.org/#!/lib>`_
|
||||||
@ -81,11 +82,13 @@ Embedded Development. *Easier Than Ever.*
|
|||||||
settings for most popular `Embedded Boards <http://platformio.org/#!/boards>`_.
|
settings for most popular `Embedded Boards <http://platformio.org/#!/boards>`_.
|
||||||
|
|
||||||
* Colourful `command-line output <https://raw.githubusercontent.com/platformio/platformio/develop/examples/platformio-examples.png>`_
|
* Colourful `command-line output <https://raw.githubusercontent.com/platformio/platformio/develop/examples/platformio-examples.png>`_
|
||||||
* Built-in `Serial Port Monitor <http://docs.platformio.org/en/latest/userguide/cmd_serialports.html#platformio-serialports-monitor>`_
|
* `IDE Integration <http://docs.platformio.org/en/latest/ide.html>`_ with
|
||||||
* Configurable `build -flags/-options <http://docs.platformio.org/en/latest/projectconf.html#build-flags>`_
|
*Arduino, Eclipse, Energia, Qt Creator, Sublime Text, Vim, Visual Studio*
|
||||||
|
* `Continuous Integration <http://docs.platformio.org/en/latest/ci/index.html>`_
|
||||||
|
with *AppVeyor, Circle CI, Drone, Shippable, Travis CI*
|
||||||
|
* Built-in `Serial Port Monitor <http://docs.platformio.org/en/latest/userguide/cmd_serialports.html#platformio-serialports-monitor>`_ and configurable
|
||||||
|
`build -flags/-options <http://docs.platformio.org/en/latest/projectconf.html#build-flags>`_
|
||||||
* Automatic **firmware uploading**
|
* Automatic **firmware uploading**
|
||||||
* Integration with `development environments (IDE) <http://docs.platformio.org/en/latest/ide.html>`_
|
|
||||||
* Ready for **Cloud Compiling** and `Continuous Integration <http://docs.platformio.org/en/latest/ci/index.html>`_
|
|
||||||
* Pre-built tool chains, frameworks for the popular `Hardware Platforms <http://platformio.org/#!/platforms>`_
|
* Pre-built tool chains, frameworks for the popular `Hardware Platforms <http://platformio.org/#!/platforms>`_
|
||||||
|
|
||||||
.. image:: https://raw.githubusercontent.com/platformio/platformio-web/develop/app/images/platformio-embedded-development.png
|
.. image:: https://raw.githubusercontent.com/platformio/platformio-web/develop/app/images/platformio-embedded-development.png
|
||||||
|
BIN
docs/_static/ide-platformio-qtcreator-4.png
vendored
BIN
docs/_static/ide-platformio-qtcreator-4.png
vendored
Binary file not shown.
Before Width: | Height: | Size: 67 KiB After Width: | Height: | Size: 66 KiB |
BIN
docs/_static/platformio-logo.png
vendored
BIN
docs/_static/platformio-logo.png
vendored
Binary file not shown.
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 13 KiB |
@ -70,19 +70,26 @@ 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_LDF_CYCLIC:
|
.. _envvar_PLATFORMIO_SRC_FILTER:
|
||||||
|
|
||||||
PLATFORMIO_LDF_CYCLIC
|
PLATFORMIO_SRC_FILTER
|
||||||
~~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
Allows to set :ref:`projectconf` option :ref:`projectconf_ldf_cyclic`.
|
Allows to set :ref:`projectconf` option :ref:`projectconf_src_filter`.
|
||||||
|
|
||||||
|
.. _envvar_PLATFORMIO_EXTRA_SCRIPT:
|
||||||
|
|
||||||
|
PLATFORMIO_EXTRA_SCRIPT
|
||||||
|
~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
Allows to set :ref:`projectconf` option :ref:`projectconf_extra_script`.
|
||||||
|
|
||||||
Settings
|
Settings
|
||||||
--------
|
--------
|
||||||
|
@ -100,3 +100,9 @@ Please upgrade *SetupTools* package:
|
|||||||
# Then re-install PlatformIO
|
# Then re-install PlatformIO
|
||||||
$ [sudo] pip uninstall platformio
|
$ [sudo] pip uninstall platformio
|
||||||
$ [sudo] pip install platformio
|
$ [sudo] pip install platformio
|
||||||
|
|
||||||
|
ARM toolchain: ``cc1plus: error while loading shared libraries``
|
||||||
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
See related answers for
|
||||||
|
`error while loading shared libraries <https://github.com/platformio/platformio/issues?utf8=✓&q=error+while+loading+shared+libraries>`_.
|
||||||
|
@ -59,6 +59,26 @@ CQ Publishing
|
|||||||
- 64 Kb
|
- 64 Kb
|
||||||
- 10 Kb
|
- 10 Kb
|
||||||
|
|
||||||
|
Delta
|
||||||
|
~~~~~
|
||||||
|
|
||||||
|
.. list-table::
|
||||||
|
:header-rows: 1
|
||||||
|
|
||||||
|
* - Type ``board``
|
||||||
|
- Name
|
||||||
|
- Microcontroller
|
||||||
|
- Frequency
|
||||||
|
- Flash
|
||||||
|
- RAM
|
||||||
|
|
||||||
|
* - ``dfcm_nnn40``
|
||||||
|
- `Delta DFCM-NNN40 <https://developer.mbed.org/platforms/Delta-DFCM-NNN40/>`_
|
||||||
|
- NRF51822
|
||||||
|
- 32 MHz
|
||||||
|
- 256 Kb
|
||||||
|
- 32 Kb
|
||||||
|
|
||||||
Embedded Artists
|
Embedded Artists
|
||||||
~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
@ -345,11 +365,11 @@ ST
|
|||||||
- 48 Kb
|
- 48 Kb
|
||||||
|
|
||||||
* - ``disco_f334c8``
|
* - ``disco_f334c8``
|
||||||
- `ST 32F3348DISCOVERY <http://www.st.com/web/catalog/tools/FM116/SC959/SS1532/LN1848/PF260318>`_
|
- `ST 32F3348DISCOVERY <http://www.st.com/web/en/catalog/tools/PF260318>`_
|
||||||
- STM32F334C8T6
|
- STM32F334C8T6
|
||||||
- 72 MHz
|
- 72 MHz
|
||||||
- 64 Kb
|
- 64 Kb
|
||||||
- 16 Kb
|
- 12 Kb
|
||||||
|
|
||||||
* - ``disco_f401vc``
|
* - ``disco_f401vc``
|
||||||
- `ST 32F401CDISCOVERY <http://www.st.com/web/catalog/tools/FM116/SC959/SS1532/LN1848/PF259098>`_
|
- `ST 32F401CDISCOVERY <http://www.st.com/web/catalog/tools/FM116/SC959/SS1532/LN1848/PF259098>`_
|
||||||
@ -372,6 +392,13 @@ ST
|
|||||||
- 2048 Kb
|
- 2048 Kb
|
||||||
- 256 Kb
|
- 256 Kb
|
||||||
|
|
||||||
|
* - ``disco_l053c8``
|
||||||
|
- `ST 32L0538DISCOVERY <http://www.st.com/web/en/catalog/tools/PF260319>`_
|
||||||
|
- STM32L053C8T6
|
||||||
|
- 32 MHz
|
||||||
|
- 64 Kb
|
||||||
|
- 8 Kb
|
||||||
|
|
||||||
* - ``nucleo_f030r8``
|
* - ``nucleo_f030r8``
|
||||||
- `ST Nucleo F030R8 <https://developer.mbed.org/platforms/ST-Nucleo-F030R8/>`_
|
- `ST Nucleo F030R8 <https://developer.mbed.org/platforms/ST-Nucleo-F030R8/>`_
|
||||||
- STM32F030R8T6
|
- STM32F030R8T6
|
||||||
|
@ -29,7 +29,7 @@ Integration
|
|||||||
Project Generator
|
Project Generator
|
||||||
^^^^^^^^^^^^^^^^^
|
^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
SSince PlatformIO 2.0 you can generate Eclipse compatible project using
|
Since PlatformIO 2.0 you can generate Eclipse compatible project using
|
||||||
:option:`platformio init --ide` command. Please choose board type using
|
:option:`platformio init --ide` command. Please choose board type using
|
||||||
:ref:`cmd_boards` command and run:
|
:ref:`cmd_boards` command and run:
|
||||||
|
|
||||||
@ -52,4 +52,4 @@ Screenshot
|
|||||||
----------
|
----------
|
||||||
|
|
||||||
.. image:: ../_static/ide-platformio-eclipse.png
|
.. image:: ../_static/ide-platformio-eclipse.png
|
||||||
:target: http://www.ikravets.com/computer-life/programming/2014/06/20/building-and-debugging-atmel-avr-arduino-based-project-using- eclipse-ideplatformio
|
:target: http://www.ikravets.com/computer-life/programming/2014/06/20/building-and-debugging-atmel-avr-arduino-based-project-using-eclipse-ideplatformio
|
||||||
|
@ -32,6 +32,11 @@ Since PlatformIO 2.0 you can generate Qt Creator compatible project using
|
|||||||
Then import this project via ``File > New File or Project > Import Project``
|
Then import this project via ``File > New File or Project > Import Project``
|
||||||
and specify root directory where is located :ref:`projectconf`.
|
and specify root directory where is located :ref:`projectconf`.
|
||||||
|
|
||||||
|
After import, we need to delete default build and clean steps and configure project with PlatformIO source code builder (click on Projects label on left menu or ``Ctrl+5`` shortcut):
|
||||||
|
|
||||||
|
.. image:: ../_static/ide-platformio-qtcreator-3.png
|
||||||
|
:target: http://docs.platformio.org/en/latest/_static/ide-platformio-qtcreator-3.png
|
||||||
|
|
||||||
Manual Integration
|
Manual Integration
|
||||||
^^^^^^^^^^^^^^^^^^
|
^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
@ -41,14 +46,16 @@ Setup New Project
|
|||||||
First of all, let's create new project from Qt Creator Start Page: ``New Project`` or using ``Menu: File > New File or Project``, then select project with ``Empty Qt Project`` type (``Other Project > Empty Qt Project``), fill ``Name``, ``Create in``.
|
First of all, let's create new project from Qt Creator Start Page: ``New Project`` or using ``Menu: File > New File or Project``, then select project with ``Empty Qt Project`` type (``Other Project > Empty Qt Project``), fill ``Name``, ``Create in``.
|
||||||
|
|
||||||
.. image:: ../_static/ide-platformio-qtcreator-1.png
|
.. image:: ../_static/ide-platformio-qtcreator-1.png
|
||||||
|
:target: http://docs.platformio.org/en/latest/_static/ide-platformio-qtcreator-1.png
|
||||||
|
|
||||||
On the next steps select any available kit and click Finish button.
|
On the next steps select any available kit and click Finish button.
|
||||||
|
|
||||||
.. image:: ../_static/ide-platformio-qtcreator-2.png
|
.. image:: ../_static/ide-platformio-qtcreator-2.png
|
||||||
|
|
||||||
Secondly, we need to configure project with PlatformIO source code builder (click on Projects label on left menu or ``Ctrl+5`` shortcut):
|
Secondly, we need to delete default build and clean steps and configure project with PlatformIO source code builder (click on Projects label on left menu or ``Ctrl+5`` shortcut):
|
||||||
|
|
||||||
.. image:: ../_static/ide-platformio-qtcreator-3.png
|
.. image:: ../_static/ide-platformio-qtcreator-3.png
|
||||||
|
:target: http://docs.platformio.org/en/latest/_static/ide-platformio-qtcreator-3.png
|
||||||
|
|
||||||
Thirdly, change project file by adding path to directories with header files. Please edit project file to match the following contents:
|
Thirdly, change project file by adding path to directories with header files. Please edit project file to match the following contents:
|
||||||
|
|
||||||
@ -58,15 +65,14 @@ Thirdly, change project file by adding path to directories with header files. Pl
|
|||||||
HOMEDIR += $$(USERPROFILE)
|
HOMEDIR += $$(USERPROFILE)
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
HOMEDIR += $$(PWD)
|
HOMEDIR += $$(HOME)
|
||||||
}
|
}
|
||||||
|
|
||||||
INCLUDEPATH += "$$HOMEDIR/.platformio/packages/framework-arduinoavr/cores/arduino"
|
INCLUDEPATH += "$${HOMEDIR}/.platformio/packages/framework-arduinoavr/cores/arduino"
|
||||||
INCLUDEPATH += "$$HOMEDIR/.platformio/packages/toolchain-atmelavr/avr/include"
|
INCLUDEPATH += "$${HOMEDIR}/.platformio/packages/toolchain-atmelavr/avr/include"
|
||||||
|
|
||||||
win32:INCLUDEPATH ~= s,/,\\,g
|
|
||||||
|
|
||||||
.. image:: ../_static/ide-platformio-qtcreator-4.png
|
.. image:: ../_static/ide-platformio-qtcreator-4.png
|
||||||
|
:target: http://docs.platformio.org/en/latest/_static/ide-platformio-qtcreator-4.png
|
||||||
|
|
||||||
First program in Qt Creator
|
First program in Qt Creator
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
@ -77,6 +83,7 @@ Simple "Blink" project will consist from two files:
|
|||||||
Let's create new text file named ``main.c`` using ``Menu: New File or Project > General > Text File``:
|
Let's create new text file named ``main.c`` using ``Menu: New File or Project > General > Text File``:
|
||||||
|
|
||||||
.. image:: ../_static/ide-platformio-qtcreator-5.png
|
.. image:: ../_static/ide-platformio-qtcreator-5.png
|
||||||
|
:target: http://docs.platformio.org/en/latest/_static/ide-platformio-qtcreator-5.png
|
||||||
|
|
||||||
Copy the source code which is described below to file ``main.c``.
|
Copy the source code which is described below to file ``main.c``.
|
||||||
|
|
||||||
@ -101,6 +108,7 @@ Copy the source code which is described below to file ``main.c``.
|
|||||||
3. Locate the project configuration file named ``platformio.ini`` at the root of the project directory and open it.
|
3. Locate the project configuration file named ``platformio.ini`` at the root of the project directory and open it.
|
||||||
|
|
||||||
.. image:: ../_static/ide-platformio-qtcreator-6.png
|
.. image:: ../_static/ide-platformio-qtcreator-6.png
|
||||||
|
:target: http://docs.platformio.org/en/latest/_static/ide-platformio-qtcreator-6.png
|
||||||
|
|
||||||
Edit the content to match the code described below.
|
Edit the content to match the code described below.
|
||||||
|
|
||||||
@ -128,3 +136,5 @@ Conclusion
|
|||||||
Taking everything into account, we can build project with shortcut ``Ctrl+Shift+B`` or using ``Menu: Build > Build All``:
|
Taking everything into account, we can build project with shortcut ``Ctrl+Shift+B`` or using ``Menu: Build > Build All``:
|
||||||
|
|
||||||
.. image:: ../_static/ide-platformio-qtcreator-7.png
|
.. image:: ../_static/ide-platformio-qtcreator-7.png
|
||||||
|
:target: http://docs.platformio.org/en/latest/_static/ide-platformio-qtcreator-7.png
|
||||||
|
|
||||||
|
@ -123,3 +123,4 @@ Conclusion
|
|||||||
Taking everything into account, we can build project with shortcut ``Ctrl+Shift+B`` or using ``Menu: Build > Build Solution``:
|
Taking everything into account, we can build project with shortcut ``Ctrl+Shift+B`` or using ``Menu: Build > Build Solution``:
|
||||||
|
|
||||||
.. image:: ../_static/ide-vs-platformio-newproject-8.png
|
.. image:: ../_static/ide-vs-platformio-newproject-8.png
|
||||||
|
:target: http://docs.platformio.org/en/latest/_static/ide-vs-platformio-newproject-8.png
|
||||||
|
@ -1,5 +1,8 @@
|
|||||||
PlatformIO: A cross-platform code builder and the missing library manager
|
PlatformIO is a cross-platform code builder and the missing library manager
|
||||||
=========================================================================
|
===========================================================================
|
||||||
|
|
||||||
|
**Ready for embedded development, IDE and Continuous integration, Arduino and
|
||||||
|
MBED compatible**
|
||||||
|
|
||||||
*Atmel AVR & SAM, Espressif, Freescale Kinetis, Nordic nRF51, NXP LPC,
|
*Atmel AVR & SAM, Espressif, Freescale Kinetis, Nordic nRF51, NXP LPC,
|
||||||
Silicon Labs EFM32, ST STM32, TI MSP430 & Tiva, Teensy, Arduino, mbed,
|
Silicon Labs EFM32, ST STM32, TI MSP430 & Tiva, Teensy, Arduino, mbed,
|
||||||
@ -27,11 +30,13 @@ Embedded Development. *Easier Than Ever.*
|
|||||||
-----------------------------------------
|
-----------------------------------------
|
||||||
|
|
||||||
* Colourful command-line output
|
* Colourful command-line output
|
||||||
* Built-in :ref:`Serial Port Monitor <cmd_serialports_monitor>`
|
* :ref:`IDE Integration <ide>` with *Arduino, Eclipse, Energia, Qt Creator,
|
||||||
* Configurable build :ref:`-flags/-options <projectconf_build_flags>`
|
Sublime Text, Vim, Visual Studio*
|
||||||
* Integration with :ref:`development environments (IDE) <ide>`
|
* :ref:`ci` with *AppVeyor, Circle CI, Drone, Shippable, Travis CI*
|
||||||
* Ready for Cloud Compiling and :ref:`ci`
|
* Built-in :ref:`Serial Port Monitor <cmd_serialports_monitor>` and
|
||||||
* Pre-built tool chains, :ref:`frameworks` for the popular Hardware Platforms
|
configurable build :ref:`-flags/-options <projectconf_build_flags>`
|
||||||
|
* Pre-built tool chains, :ref:`frameworks` for the
|
||||||
|
:ref:`Development Platforms <platforms>`
|
||||||
|
|
||||||
Smart Code Builder. *Fast and Reliable.*
|
Smart Code Builder. *Fast and Reliable.*
|
||||||
----------------------------------------
|
----------------------------------------
|
||||||
|
@ -122,18 +122,12 @@ Development Version
|
|||||||
.. warning::
|
.. warning::
|
||||||
We don't recommend to use ``develop`` version in production.
|
We don't recommend to use ``develop`` version in production.
|
||||||
|
|
||||||
1. If you had have already installed PlatformIO, please uninstall it:
|
Install the latest PlatformIO from the ``develop`` branch:
|
||||||
|
|
||||||
.. code-block:: bash
|
|
||||||
|
|
||||||
$ pip uninstall platformio
|
|
||||||
|
|
||||||
2. Install the latest PlatformIO from the ``develop`` branch:
|
|
||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
$ pip install https://github.com/platformio/platformio/archive/develop.zip
|
$ pip install https://github.com/platformio/platformio/archive/develop.zip
|
||||||
|
|
||||||
If you want to be up-to-date with the latest ``develop`` version of PlatformIO,
|
If you want to be up-to-date with the latest ``develop`` version of PlatformIO,
|
||||||
then you need to perform step #2 each time if you see the new commits in
|
then you need to re-install PlatformIO each time if you see the new commits in
|
||||||
`PlatformIO GitHub repository <https://github.com/platformio/platformio/commits/develop>`_.
|
`PlatformIO GitHub repository (branch: develop) <https://github.com/platformio/platformio/commits/develop>`_.
|
||||||
|
@ -249,6 +249,12 @@ patterns.
|
|||||||
A list with compatible frameworks. The available framework types are defined in
|
A list with compatible frameworks. The available framework types are defined in
|
||||||
the :ref:`platforms` section.
|
the :ref:`platforms` section.
|
||||||
|
|
||||||
|
If the library is compatible with the all frameworks, then you can use ``*``
|
||||||
|
symbol:
|
||||||
|
|
||||||
|
.. code-block:: javascript
|
||||||
|
|
||||||
|
"frameworks": "*"
|
||||||
|
|
||||||
.. _libjson_platforms:
|
.. _libjson_platforms:
|
||||||
|
|
||||||
@ -260,6 +266,13 @@ the :ref:`platforms` section.
|
|||||||
A list with compatible platforms. The available platform types are
|
A list with compatible platforms. The available platform types are
|
||||||
defined in :ref:`platforms` section.
|
defined in :ref:`platforms` section.
|
||||||
|
|
||||||
|
If the library is compatible with the all platforms, then you can use ``*``
|
||||||
|
symbol:
|
||||||
|
|
||||||
|
.. code-block:: javascript
|
||||||
|
|
||||||
|
"platforms": "*"
|
||||||
|
|
||||||
|
|
||||||
.. _libjson_dependencies:
|
.. _libjson_dependencies:
|
||||||
|
|
||||||
|
@ -49,6 +49,26 @@ Boards
|
|||||||
* For more detailed ``board`` information please scroll tables below by
|
* For more detailed ``board`` information please scroll tables below by
|
||||||
horizontal.
|
horizontal.
|
||||||
|
|
||||||
|
Delta
|
||||||
|
~~~~~
|
||||||
|
|
||||||
|
.. list-table::
|
||||||
|
:header-rows: 1
|
||||||
|
|
||||||
|
* - Type ``board``
|
||||||
|
- Name
|
||||||
|
- Microcontroller
|
||||||
|
- Frequency
|
||||||
|
- Flash
|
||||||
|
- RAM
|
||||||
|
|
||||||
|
* - ``dfcm_nnn40``
|
||||||
|
- `Delta DFCM-NNN40 <https://developer.mbed.org/platforms/Delta-DFCM-NNN40/>`_
|
||||||
|
- NRF51822
|
||||||
|
- 32 MHz
|
||||||
|
- 256 Kb
|
||||||
|
- 32 Kb
|
||||||
|
|
||||||
JKSoft
|
JKSoft
|
||||||
~~~~~~
|
~~~~~~
|
||||||
|
|
||||||
|
@ -142,11 +142,11 @@ ST
|
|||||||
- 48 Kb
|
- 48 Kb
|
||||||
|
|
||||||
* - ``disco_f334c8``
|
* - ``disco_f334c8``
|
||||||
- `ST 32F3348DISCOVERY <http://www.st.com/web/catalog/tools/FM116/SC959/SS1532/LN1848/PF260318>`_
|
- `ST 32F3348DISCOVERY <http://www.st.com/web/en/catalog/tools/PF260318>`_
|
||||||
- STM32F334C8T6
|
- STM32F334C8T6
|
||||||
- 72 MHz
|
- 72 MHz
|
||||||
- 64 Kb
|
- 64 Kb
|
||||||
- 16 Kb
|
- 12 Kb
|
||||||
|
|
||||||
* - ``disco_f401vc``
|
* - ``disco_f401vc``
|
||||||
- `ST 32F401CDISCOVERY <http://www.st.com/web/catalog/tools/FM116/SC959/SS1532/LN1848/PF259098>`_
|
- `ST 32F401CDISCOVERY <http://www.st.com/web/catalog/tools/FM116/SC959/SS1532/LN1848/PF259098>`_
|
||||||
@ -169,6 +169,13 @@ ST
|
|||||||
- 2048 Kb
|
- 2048 Kb
|
||||||
- 256 Kb
|
- 256 Kb
|
||||||
|
|
||||||
|
* - ``disco_l053c8``
|
||||||
|
- `ST 32L0538DISCOVERY <http://www.st.com/web/en/catalog/tools/PF260319>`_
|
||||||
|
- STM32L053C8T6
|
||||||
|
- 32 MHz
|
||||||
|
- 64 Kb
|
||||||
|
- 8 Kb
|
||||||
|
|
||||||
* - ``disco_l152rb``
|
* - ``disco_l152rb``
|
||||||
- `ST STM32LDISCOVERY <http://www.st.com/web/catalog/tools/FM116/SC959/SS1532/LN1848/PF258515>`_
|
- `ST STM32LDISCOVERY <http://www.st.com/web/catalog/tools/FM116/SC959/SS1532/LN1848/PF258515>`_
|
||||||
- STM32L152RBT6
|
- STM32L152RBT6
|
||||||
|
@ -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``
|
||||||
@ -226,10 +213,6 @@ processes:
|
|||||||
* - Format
|
* - Format
|
||||||
- Scope
|
- Scope
|
||||||
- Description
|
- Description
|
||||||
* - ``-Wp,option``
|
|
||||||
- CPPFLAGS
|
|
||||||
- Bypass the compiler driver and pass *option* directly through to the
|
|
||||||
preprocessor
|
|
||||||
* - ``-D name``
|
* - ``-D name``
|
||||||
- CPPDEFINES
|
- CPPDEFINES
|
||||||
- Predefine *name* as a macro, with definition 1.
|
- Predefine *name* as a macro, with definition 1.
|
||||||
@ -241,6 +224,10 @@ processes:
|
|||||||
- CPPDEFINES
|
- CPPDEFINES
|
||||||
- Cancel any previous definition of *name*, either built in or provided
|
- Cancel any previous definition of *name*, either built in or provided
|
||||||
with a ``-D`` option.
|
with a ``-D`` option.
|
||||||
|
* - ``-Wp,option``
|
||||||
|
- CPPFLAGS
|
||||||
|
- Bypass the compiler driver and pass *option* directly through to the
|
||||||
|
preprocessor
|
||||||
* - ``-Wall``
|
* - ``-Wall``
|
||||||
- CCFLAGS
|
- CCFLAGS
|
||||||
- Turns on all optional warnings which are desirable for normal code.
|
- Turns on all optional warnings which are desirable for normal code.
|
||||||
@ -254,10 +241,18 @@ processes:
|
|||||||
- CCFLAGS
|
- CCFLAGS
|
||||||
- Process *file* as if ``#include "file"`` appeared as the first line of
|
- Process *file* as if ``#include "file"`` appeared as the first line of
|
||||||
the primary source file.
|
the primary source file.
|
||||||
|
* - ``-Idir``
|
||||||
|
- CPPPATH
|
||||||
|
- Add the directory *dir* to the list of directories to be searched
|
||||||
|
for header files.
|
||||||
* - ``-Wa,option``
|
* - ``-Wa,option``
|
||||||
- ASFLAGS, CCFLAGS
|
- ASFLAGS, CCFLAGS
|
||||||
- Pass *option* as an option to the assembler. If *option* contains
|
- Pass *option* as an option to the assembler. If *option* contains
|
||||||
commas, it is split into multiple options at the commas.
|
commas, it is split into multiple options at the commas.
|
||||||
|
* - ``-Wl,option``
|
||||||
|
- LINKFLAGS
|
||||||
|
- Pass *option* as an option to the linker. If *option* contains
|
||||||
|
commas, it is split into multiple options at the commas.
|
||||||
* - ``-llibrary``
|
* - ``-llibrary``
|
||||||
- LIBS
|
- LIBS
|
||||||
- Search the *library* named library when linking
|
- Search the *library* named library when linking
|
||||||
@ -265,10 +260,6 @@ processes:
|
|||||||
- LIBPATH
|
- LIBPATH
|
||||||
- Add directory *dir* to the list of directories to be searched for
|
- Add directory *dir* to the list of directories to be searched for
|
||||||
``-l``.
|
``-l``.
|
||||||
* - ``-Idir``
|
|
||||||
- CPPPATH
|
|
||||||
- Add the directory *dir* to the list of directories to be searched
|
|
||||||
for header files.
|
|
||||||
|
|
||||||
This option can be set by global environment variable
|
This option can be set by global environment variable
|
||||||
:ref:`envvar_PLATFORMIO_BUILD_FLAGS`.
|
:ref:`envvar_PLATFORMIO_BUILD_FLAGS`.
|
||||||
@ -278,11 +269,14 @@ Example:
|
|||||||
.. code-block:: ini
|
.. code-block:: ini
|
||||||
|
|
||||||
[env:specific_defines]
|
[env:specific_defines]
|
||||||
build_flags = -O2 -Dfoo -Dbar=1
|
build_flags = -Dfoo -Dbar=1
|
||||||
|
|
||||||
[env:specific_inclibs]
|
[env:specific_inclibs]
|
||||||
build_flags = -I/opt/include -L/opt/lib -lfoo
|
build_flags = -I/opt/include -L/opt/lib -lfoo
|
||||||
|
|
||||||
|
[env:specific_ld_script]
|
||||||
|
build_flags = -Wl,-T/path/to/ld_script.ld
|
||||||
|
|
||||||
|
|
||||||
For more detailed information about available flags/options go to:
|
For more detailed information about available flags/options go to:
|
||||||
|
|
||||||
@ -300,20 +294,42 @@ 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`.
|
||||||
|
|
||||||
``install_libs``
|
.. _projectconf_src_filter:
|
||||||
^^^^^^^^^^^^^^^^
|
|
||||||
|
``src_filter``
|
||||||
|
^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
This option allows to specify which source files should be included/excluded
|
||||||
|
from build process. Filter supports 2 templates:
|
||||||
|
|
||||||
|
* ``+<PATH>`` include template
|
||||||
|
* ``-<PATH>`` exclude template
|
||||||
|
|
||||||
|
``PATH`` MAST BE related from :ref:`projectconf_pio_src_dir`. All patterns will
|
||||||
|
be applied in theirs order.
|
||||||
|
`GLOB Patterns <http://en.wikipedia.org/wiki/Glob_(programming)>`_ are allowed.
|
||||||
|
|
||||||
|
By default, ``src_filter`` is predefined to
|
||||||
|
``+<*> -<.git/> -<svn/> -<examples/>``, which means "includes ALL files, then
|
||||||
|
exclude ``.git`` and ``svn`` repository folders and exclude ``examples`` folder.
|
||||||
|
|
||||||
|
This option can be set by global environment variable
|
||||||
|
:ref:`envvar_PLATFORMIO_SRC_FILTER`.
|
||||||
|
|
||||||
|
``lib_install``
|
||||||
|
^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
Specify dependent libraries which should be installed before environment
|
Specify dependent libraries which should be installed before environment
|
||||||
process. The only library IDs are allowed. Multiple libraries can be passed
|
process. The only library IDs are allowed. Multiple libraries can be passed
|
||||||
@ -323,43 +339,41 @@ You can obtain library IDs using :ref:`cmd_lib_search` command.
|
|||||||
|
|
||||||
Example:
|
Example:
|
||||||
|
|
||||||
.. code-block:: ini
|
.. code-block:: ini
|
||||||
|
|
||||||
[env:depends_on_some_libs]
|
[env:depends_on_some_libs]
|
||||||
install_libs = 1,13,19
|
lib_install = 1,13,19
|
||||||
|
|
||||||
``use_libs``
|
``lib_use``
|
||||||
^^^^^^^^^^^^
|
^^^^^^^^^^^
|
||||||
|
|
||||||
Specify libraries which should be used by ``Library Dependency Finder (LDF)`` with
|
Specify libraries which should be used by ``Library Dependency Finder (LDF)`` with
|
||||||
the highest priority.
|
the highest priority.
|
||||||
|
|
||||||
Example:
|
Example:
|
||||||
|
|
||||||
.. code-block:: ini
|
.. code-block:: ini
|
||||||
|
|
||||||
[env:libs_with_highest_priority]
|
[env:libs_with_highest_priority]
|
||||||
use_libs = OneWire_ID1
|
lib_use = OneWire_ID1,SPI
|
||||||
|
|
||||||
``ignore_libs``
|
``lib_ignore``
|
||||||
^^^^^^^^^^^^^^^
|
^^^^^^^^^^^^^^
|
||||||
|
|
||||||
Specify libraries which should be ignored by ``Library Dependency Finder (LDF)``
|
Specify libraries which should be ignored by ``Library Dependency Finder (LDF)``
|
||||||
|
|
||||||
Example:
|
Example:
|
||||||
|
|
||||||
.. code-block:: ini
|
.. code-block:: ini
|
||||||
|
|
||||||
[env:ignore_some_libs]
|
[env:ignore_some_libs]
|
||||||
ignore_libs = SPI,EngduinoV3_ID123
|
lib_ignore = SPI,EngduinoV3_ID123
|
||||||
|
|
||||||
.. _projectconf_ldf_cyclic:
|
``lib_dfcyclic``
|
||||||
|
^^^^^^^^^^^^^^^^
|
||||||
``ldf_cyclic``
|
|
||||||
^^^^^^^^^^^^^^
|
|
||||||
|
|
||||||
Control cyclic (recursive) behaviour for ``Library Dependency Finder (LDF)``.
|
Control cyclic (recursive) behaviour for ``Library Dependency Finder (LDF)``.
|
||||||
By default, this option is turned OFF (``ldf_cyclic=False``) and means, that
|
By default, this option is turned OFF (``lib_dfcyclic=False``) and means, that
|
||||||
``LDF`` will find only libraries which are included in source files from the
|
``LDF`` will find only libraries which are included in source files from the
|
||||||
project :ref:`projectconf_pio_src_dir`.
|
project :ref:`projectconf_pio_src_dir`.
|
||||||
|
|
||||||
@ -367,16 +381,76 @@ If you want to enable cyclic (recursive, nested) search, please set this option
|
|||||||
to ``True``. Founded library will be treated like a new source files and
|
to ``True``. Founded library will be treated like a new source files and
|
||||||
``LDF`` will search dependencies for it.
|
``LDF`` will search dependencies for it.
|
||||||
|
|
||||||
This option can be set by global environment variable
|
|
||||||
:ref:`envvar_PLATFORMIO_LDF_CYCLIC`.
|
|
||||||
|
|
||||||
Example:
|
Example:
|
||||||
|
|
||||||
.. code-block:: ini
|
.. code-block:: ini
|
||||||
|
|
||||||
[env:libs_with_enabled_ldf_cyclic]
|
[env:libs_with_enabled_ldf_cyclic]
|
||||||
ldf_cyclic = True
|
lib_dfcyclic = True
|
||||||
|
|
||||||
|
.. _projectconf_extra_script:
|
||||||
|
|
||||||
|
``extra_script``
|
||||||
|
^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
Allows to launch extra script using `SCons <http://www.scons.org>`_ software
|
||||||
|
construction tool. For more details please follow to "Construction Environments"
|
||||||
|
section of
|
||||||
|
`SCons documentation <http://www.scons.org/doc/production/HTML/scons-user.html#chap-environments>`_.
|
||||||
|
|
||||||
|
This option can be set by global environment variable
|
||||||
|
:ref:`envvar_PLATFORMIO_EXTRA_SCRIPT`.
|
||||||
|
|
||||||
|
Example, specify own upload command for :ref:`platform_atmelavr`:
|
||||||
|
|
||||||
|
``platformio.ini``:
|
||||||
|
|
||||||
|
.. code-block:: ini
|
||||||
|
|
||||||
|
[env:env_with_specific_extra_script]
|
||||||
|
platform = atmelavr
|
||||||
|
extra_script = /path/to/extra_script.py
|
||||||
|
|
||||||
|
``extra_script.py``:
|
||||||
|
|
||||||
|
.. code-block:: python
|
||||||
|
|
||||||
|
from SCons.Script import DefaultEnvironment
|
||||||
|
|
||||||
|
env = DefaultEnvironment()
|
||||||
|
|
||||||
|
env.Replace(UPLOADHEXCMD='"$UPLOADER" --uploader --flags')
|
||||||
|
|
||||||
|
# uncomment line below to see environment variables
|
||||||
|
# print env.Dump()
|
||||||
|
|
||||||
|
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".
|
||||||
|
|
||||||
|
Pre-built targets:
|
||||||
|
|
||||||
|
* ``clean`` delete compiled object files, libraries and firmware binaries
|
||||||
|
* ``upload`` enable "auto-uploading" for embedded platforms after building
|
||||||
|
operation
|
||||||
|
* ``envdump`` dump current build environment
|
||||||
|
|
||||||
|
**Tip!** You can use these targets like an option to
|
||||||
|
:option:`platformio run --target` command. For example:
|
||||||
|
|
||||||
|
.. code-block:: bash
|
||||||
|
|
||||||
|
# clean project
|
||||||
|
platformio run -t clean
|
||||||
|
|
||||||
|
# dump curent build environment
|
||||||
|
platformio run --target envdump
|
||||||
|
|
||||||
|
When no targets are defined, *PlatformIO* will build only sources by default.
|
||||||
|
|
||||||
.. _projectconf_examples:
|
.. _projectconf_examples:
|
||||||
|
|
||||||
|
@ -1,14 +1,15 @@
|
|||||||
# Copyright (C) Ivan Kravets <me@ikravets.com>
|
# Copyright (C) Ivan Kravets <me@ikravets.com>
|
||||||
# See LICENSE for details.
|
# See LICENSE for details.
|
||||||
|
|
||||||
VERSION = (2, 1, 2)
|
VERSION = (2, 2, 0)
|
||||||
__version__ = ".".join([str(s) for s in VERSION])
|
__version__ = ".".join([str(s) for s in VERSION])
|
||||||
|
|
||||||
__title__ = "platformio"
|
__title__ = "platformio"
|
||||||
__description__ = ("A cross-platform code builder and the missing library "
|
__description__ = (
|
||||||
"manager (Atmel AVR & SAM, Espressif, Freescale Kinetis, "
|
"Cross-platform code builder and the missing library manager "
|
||||||
"Nordic nRF51, NXP LPC, Silicon Labs EFM32, ST STM32, "
|
"(Ready for embedded development, IDE and Continuous integration, "
|
||||||
"TI MSP430 & Tiva, Teensy, Arduino, mbed, libOpenCM3, etc)")
|
"Arduino and MBED compatible)"
|
||||||
|
)
|
||||||
__url__ = "http://platformio.org"
|
__url__ = "http://platformio.org"
|
||||||
|
|
||||||
__author__ = "Ivan Kravets"
|
__author__ = "Ivan Kravets"
|
||||||
|
@ -41,10 +41,10 @@ class PlatformioCLI(click.MultiCommand): # pylint: disable=R0904
|
|||||||
def _handle_obsolate_command(name):
|
def _handle_obsolate_command(name):
|
||||||
if name in ("install", "list", "search", "show", "uninstall"):
|
if name in ("install", "list", "search", "show", "uninstall"):
|
||||||
click.secho(
|
click.secho(
|
||||||
"Warning! `platformio %s` command is obsoleted and will be "
|
"Warning! `platformio %s` command is deprecated and will be "
|
||||||
"removed in the next release! Please use "
|
"removed in the next release! Please use "
|
||||||
"`platformio platforms %s` instead." % (name, name),
|
"`platformio platforms %s` instead." % (name, name),
|
||||||
fg="red"
|
fg="yellow"
|
||||||
)
|
)
|
||||||
from platformio.commands import platforms
|
from platformio.commands import platforms
|
||||||
return getattr(platforms, "platforms_" + name)
|
return getattr(platforms, "platforms_" + name)
|
||||||
|
@ -126,5 +126,21 @@
|
|||||||
},
|
},
|
||||||
"url": "http://developer.mbed.org/platforms/Seeed-Tiny-BLE/",
|
"url": "http://developer.mbed.org/platforms/Seeed-Tiny-BLE/",
|
||||||
"vendor": "SeeedStudio"
|
"vendor": "SeeedStudio"
|
||||||
|
},
|
||||||
|
"dfcm_nnn40": {
|
||||||
|
"build": {
|
||||||
|
"f_cpu": "32000000L",
|
||||||
|
"cpu": "cortex-m0",
|
||||||
|
"mcu": "nrf51822"
|
||||||
|
},
|
||||||
|
"frameworks": ["mbed"],
|
||||||
|
"name": "Delta DFCM-NNN40",
|
||||||
|
"platform": "nordicnrf51",
|
||||||
|
"upload": {
|
||||||
|
"maximum_ram_size": 32768,
|
||||||
|
"maximum_size": 262144
|
||||||
|
},
|
||||||
|
"url": "https://developer.mbed.org/platforms/Delta-DFCM-NNN40/",
|
||||||
|
"vendor": "Delta"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -390,5 +390,37 @@
|
|||||||
},
|
},
|
||||||
"url": "http://docs.armstrap.org/en/latest/hardware-overview.html",
|
"url": "http://docs.armstrap.org/en/latest/hardware-overview.html",
|
||||||
"vendor": "Armstrap"
|
"vendor": "Armstrap"
|
||||||
|
},
|
||||||
|
"disco_l053c8": {
|
||||||
|
"build": {
|
||||||
|
"f_cpu": "32000000L",
|
||||||
|
"cpu": "cortex-m0plus",
|
||||||
|
"mcu": "stm32l053c8t6"
|
||||||
|
},
|
||||||
|
"frameworks": ["mbed"],
|
||||||
|
"name": "ST 32L0538DISCOVERY",
|
||||||
|
"platform": "ststm32",
|
||||||
|
"upload": {
|
||||||
|
"maximum_ram_size": 8192,
|
||||||
|
"maximum_size": 65536
|
||||||
|
},
|
||||||
|
"url": "http://www.st.com/web/en/catalog/tools/PF260319",
|
||||||
|
"vendor": "ST"
|
||||||
|
},
|
||||||
|
"disco_f334c8": {
|
||||||
|
"build": {
|
||||||
|
"f_cpu": "72000000L",
|
||||||
|
"cpu": "cortex-m4",
|
||||||
|
"mcu": "stm32f334c8t6"
|
||||||
|
},
|
||||||
|
"frameworks": ["mbed"],
|
||||||
|
"name": "ST 32F3348DISCOVERY",
|
||||||
|
"platform": "ststm32",
|
||||||
|
"upload": {
|
||||||
|
"maximum_ram_size": 12288,
|
||||||
|
"maximum_size": 65536
|
||||||
|
},
|
||||||
|
"url": "http://www.st.com/web/en/catalog/tools/PF260318",
|
||||||
|
"vendor": "ST"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -11,11 +11,13 @@ except ImportError:
|
|||||||
break
|
break
|
||||||
from platformio import util
|
from platformio import util
|
||||||
|
|
||||||
|
import json
|
||||||
|
from os import getenv
|
||||||
from os.path import isfile, join
|
from os.path import isfile, join
|
||||||
from time import time
|
from time import time
|
||||||
|
|
||||||
from SCons.Script import (DefaultEnvironment, Exit, SConscript,
|
from SCons.Script import (COMMAND_LINE_TARGETS, DefaultEnvironment, Exit,
|
||||||
SConscriptChdir, Variables)
|
SConscript, SConscriptChdir, Variables)
|
||||||
|
|
||||||
from platformio.exception import UnknownBoard
|
from platformio.exception import UnknownBoard
|
||||||
|
|
||||||
@ -25,6 +27,7 @@ from platformio.exception import UnknownBoard
|
|||||||
commonvars = Variables(None)
|
commonvars = Variables(None)
|
||||||
commonvars.AddVariables(
|
commonvars.AddVariables(
|
||||||
("BUILD_SCRIPT",),
|
("BUILD_SCRIPT",),
|
||||||
|
("EXTRA_SCRIPT",),
|
||||||
("PIOENV",),
|
("PIOENV",),
|
||||||
("PLATFORM",),
|
("PLATFORM",),
|
||||||
|
|
||||||
@ -35,10 +38,11 @@ commonvars.AddVariables(
|
|||||||
# options
|
# options
|
||||||
("FRAMEWORK",),
|
("FRAMEWORK",),
|
||||||
("BUILD_FLAGS",),
|
("BUILD_FLAGS",),
|
||||||
("SRCBUILD_FLAGS",),
|
("SRC_BUILD_FLAGS",),
|
||||||
("IGNORE_LIBS",),
|
("SRC_FILTER",),
|
||||||
("USE_LIBS",),
|
("LIB_DFCYCLIC",),
|
||||||
("LDF_CYCLIC",),
|
("LIB_IGNORE",),
|
||||||
|
("LIB_USE",),
|
||||||
|
|
||||||
# board options
|
# board options
|
||||||
("BOARD",),
|
("BOARD",),
|
||||||
@ -54,7 +58,7 @@ commonvars.AddVariables(
|
|||||||
DefaultEnvironment(
|
DefaultEnvironment(
|
||||||
tools=[
|
tools=[
|
||||||
"gcc", "g++", "as", "ar", "gnulink",
|
"gcc", "g++", "as", "ar", "gnulink",
|
||||||
"platformio", "pioupload", "pioar"
|
"platformio", "pioupload", "pioar", "piomisc"
|
||||||
],
|
],
|
||||||
toolpath=[join("$PIOBUILDER_DIR", "tools")],
|
toolpath=[join("$PIOBUILDER_DIR", "tools")],
|
||||||
variables=commonvars,
|
variables=commonvars,
|
||||||
@ -71,6 +75,7 @@ DefaultEnvironment(
|
|||||||
PIOPACKAGES_DIR=join("$PIOHOME_DIR", "packages"),
|
PIOPACKAGES_DIR=join("$PIOHOME_DIR", "packages"),
|
||||||
|
|
||||||
BUILD_DIR=join("$PIOENVS_DIR", "$PIOENV"),
|
BUILD_DIR=join("$PIOENVS_DIR", "$PIOENV"),
|
||||||
|
BUILDSRC_DIR=join("$BUILD_DIR", "src"),
|
||||||
LIBSOURCE_DIRS=[
|
LIBSOURCE_DIRS=[
|
||||||
"$PROJECTLIB_DIR",
|
"$PROJECTLIB_DIR",
|
||||||
util.get_lib_dir(),
|
util.get_lib_dir(),
|
||||||
@ -113,8 +118,10 @@ if "BOARD" in env:
|
|||||||
env.get("BOARD_OPTIONS", {}).get("platform")))
|
env.get("BOARD_OPTIONS", {}).get("platform")))
|
||||||
|
|
||||||
|
|
||||||
if "IGNORE_LIBS" in env:
|
for opt in ("LIB_IGNORE", "LIB_USE"):
|
||||||
env['IGNORE_LIBS'] = [l.strip() for l in env['IGNORE_LIBS'].split(",")]
|
if opt not in env:
|
||||||
|
continue
|
||||||
|
env[opt] = [l.strip() for l in env[opt].split(",") if l.strip()]
|
||||||
|
|
||||||
env.PrependENVPath(
|
env.PrependENVPath(
|
||||||
"PATH",
|
"PATH",
|
||||||
@ -123,3 +130,14 @@ env.PrependENVPath(
|
|||||||
|
|
||||||
SConscriptChdir(0)
|
SConscriptChdir(0)
|
||||||
SConscript(env.subst("$BUILD_SCRIPT"))
|
SConscript(env.subst("$BUILD_SCRIPT"))
|
||||||
|
|
||||||
|
if getenv("PLATFORMIO_EXTRA_SCRIPT", env.get("EXTRA_SCRIPT", None)):
|
||||||
|
SConscript(getenv("PLATFORMIO_EXTRA_SCRIPT", env.get("EXTRA_SCRIPT")))
|
||||||
|
|
||||||
|
if "envdump" in COMMAND_LINE_TARGETS:
|
||||||
|
print env.Dump()
|
||||||
|
Exit()
|
||||||
|
|
||||||
|
if "idedata" in COMMAND_LINE_TARGETS:
|
||||||
|
print json.dumps(env.DumpIDEData())
|
||||||
|
Exit()
|
||||||
|
@ -30,7 +30,10 @@ def BeforeUpload(target, source, env): # pylint: disable=W0613,W0621
|
|||||||
env.Replace(UPLOAD_SPEED=None)
|
env.Replace(UPLOAD_SPEED=None)
|
||||||
|
|
||||||
if env.subst("$UPLOAD_SPEED"):
|
if env.subst("$UPLOAD_SPEED"):
|
||||||
env.Append(UPLOADERFLAGS=["-b", "$UPLOAD_SPEED"])
|
env.Append(UPLOADERFLAGS=[
|
||||||
|
"-b", "$UPLOAD_SPEED",
|
||||||
|
"-D"
|
||||||
|
])
|
||||||
|
|
||||||
if not upload_options.get("require_upload_port", False):
|
if not upload_options.get("require_upload_port", False):
|
||||||
return
|
return
|
||||||
|
@ -77,7 +77,7 @@ env.Replace(
|
|||||||
"-cp", "$UPLOAD_PORT",
|
"-cp", "$UPLOAD_PORT",
|
||||||
"-ca", "0x00000",
|
"-ca", "0x00000",
|
||||||
"-cf", "${SOURCES[0]}",
|
"-cf", "${SOURCES[0]}",
|
||||||
"-ca", "0x10000",
|
"-ca", "0x40000" if "FRAMEWORK" not in env else "0x10000",
|
||||||
"-cf", "${SOURCES[1]}"
|
"-cf", "${SOURCES[1]}"
|
||||||
],
|
],
|
||||||
UPLOADCMD='$UPLOADER $UPLOADERFLAGS'
|
UPLOADCMD='$UPLOADER $UPLOADERFLAGS'
|
||||||
@ -140,7 +140,8 @@ if "uploadlazy" in COMMAND_LINE_TARGETS:
|
|||||||
else:
|
else:
|
||||||
target_firm = env.ElfToBin(
|
target_firm = env.ElfToBin(
|
||||||
[join("$BUILD_DIR", "firmware_00000"),
|
[join("$BUILD_DIR", "firmware_00000"),
|
||||||
join("$BUILD_DIR", "firmware_10000")], target_elf)
|
join("$BUILD_DIR", "firmware_%s" %
|
||||||
|
("40000" if "FRAMEWORK" not in env else "10000"))], target_elf)
|
||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
|
@ -32,9 +32,6 @@ env.Replace(
|
|||||||
)
|
)
|
||||||
|
|
||||||
MBED_VARIANTS = {
|
MBED_VARIANTS = {
|
||||||
"stm32f3discovery": "DISCO_F303VC",
|
|
||||||
"stm32f4discovery": "DISCO_F407VG",
|
|
||||||
"stm32f429discovery": "DISCO_F429ZI",
|
|
||||||
"blueboard_lpc11u24": "LPC11U24",
|
"blueboard_lpc11u24": "LPC11U24",
|
||||||
"dipcortexm0": "LPC11U24",
|
"dipcortexm0": "LPC11U24",
|
||||||
"seeeduinoArchPro": "ARCH_PRO",
|
"seeeduinoArchPro": "ARCH_PRO",
|
||||||
@ -54,7 +51,8 @@ MBED_VARIANTS = {
|
|||||||
"frdm_kl05z": "KL05Z",
|
"frdm_kl05z": "KL05Z",
|
||||||
"frdm_k20d50m": "K20D50M",
|
"frdm_k20d50m": "K20D50M",
|
||||||
"frdm_k22f": "K22F",
|
"frdm_k22f": "K22F",
|
||||||
"teensy31": "TEENSY3_1"
|
"teensy31": "TEENSY3_1",
|
||||||
|
"dfcm_nnn40": "DELTA_DFCM_NNN40"
|
||||||
}
|
}
|
||||||
|
|
||||||
MBED_LIBS_MAP = {
|
MBED_LIBS_MAP = {
|
||||||
|
@ -38,10 +38,7 @@ env.Append(
|
|||||||
envsafe = env.Clone()
|
envsafe = env.Clone()
|
||||||
|
|
||||||
envsafe.Append(
|
envsafe.Append(
|
||||||
CPPPATH=[
|
CPPPATH=["$BUILDSRC_DIR"],
|
||||||
join("$BUILD_DIR", "src")
|
|
||||||
],
|
|
||||||
|
|
||||||
CPPDEFINES=[
|
CPPDEFINES=[
|
||||||
"USE_STDPERIPH_DRIVER"
|
"USE_STDPERIPH_DRIVER"
|
||||||
]
|
]
|
||||||
@ -52,22 +49,22 @@ envsafe.Append(
|
|||||||
#
|
#
|
||||||
|
|
||||||
extra_flags = env.get("BOARD_OPTIONS", {}).get("build", {}).get("extra_flags")
|
extra_flags = env.get("BOARD_OPTIONS", {}).get("build", {}).get("extra_flags")
|
||||||
ignore_files = []
|
src_filter_patterns = ["+<*>"]
|
||||||
if "STM32F40_41xxx" in extra_flags:
|
if "STM32F40_41xxx" in extra_flags:
|
||||||
ignore_files += ["stm32f4xx_fmc.c"]
|
src_filter_patterns += ["-<stm32f4xx_fmc.c>"]
|
||||||
if "STM32F427_437xx" in extra_flags:
|
if "STM32F427_437xx" in extra_flags:
|
||||||
ignore_files += ["stm32f4xx_fsmc.c"]
|
src_filter_patterns += ["-<stm32f4xx_fsmc.c>"]
|
||||||
elif "STM32F303xC" in extra_flags:
|
elif "STM32F303xC" in extra_flags:
|
||||||
ignore_files += ["stm32f30x_hrtim.c"]
|
src_filter_patterns += ["-<stm32f30x_hrtim.c>"]
|
||||||
elif "STM32L1XX_MD" in extra_flags:
|
elif "STM32L1XX_MD" in extra_flags:
|
||||||
ignore_files += ["stm32l1xx_flash_ramfunc.c"]
|
src_filter_patterns += ["-<stm32l1xx_flash_ramfunc.c>"]
|
||||||
|
|
||||||
libs = []
|
libs = []
|
||||||
libs.append(envsafe.BuildLibrary(
|
libs.append(envsafe.BuildLibrary(
|
||||||
join("$BUILD_DIR", "FrameworkSPL"),
|
join("$BUILD_DIR", "FrameworkSPL"),
|
||||||
join("$PLATFORMFW_DIR", "${BOARD_OPTIONS['build']['core']}", "variants",
|
join("$PLATFORMFW_DIR", "${BOARD_OPTIONS['build']['core']}", "variants",
|
||||||
"${BOARD_OPTIONS['build']['variant']}", "src"),
|
"${BOARD_OPTIONS['build']['variant']}", "src"),
|
||||||
ignore_files
|
src_filter=" ".join(src_filter_patterns)
|
||||||
))
|
))
|
||||||
|
|
||||||
env.Append(LIBS=libs)
|
env.Append(LIBS=libs)
|
||||||
|
167
platformio/builder/tools/piomisc.py
Normal file
167
platformio/builder/tools/piomisc.py
Normal file
@ -0,0 +1,167 @@
|
|||||||
|
# Copyright (C) Ivan Kravets <me@ikravets.com>
|
||||||
|
# See LICENSE for details.
|
||||||
|
|
||||||
|
import atexit
|
||||||
|
import re
|
||||||
|
from glob import glob
|
||||||
|
from os import remove
|
||||||
|
from os.path import basename, join
|
||||||
|
|
||||||
|
|
||||||
|
class InoToCPPConverter(object):
|
||||||
|
|
||||||
|
PROTOTYPE_RE = re.compile(
|
||||||
|
r"""^(
|
||||||
|
(\s*[a-z_\d]+){1,2} # return type
|
||||||
|
(\s+[a-z_\d]+\s*) # name of prototype
|
||||||
|
\([a-z_,\.\*\&\[\]\s\d]*\) # arguments
|
||||||
|
)\s*\{ # must end with {
|
||||||
|
""",
|
||||||
|
re.X | re.M | re.I
|
||||||
|
)
|
||||||
|
|
||||||
|
DETECTMAIN_RE = re.compile(r"void\s+(setup|loop)\s*\(", re.M | re.I)
|
||||||
|
|
||||||
|
STRIPCOMMENTS_RE = re.compile(r"(/\*.*?\*/|(^|\s+)//[^\r\n]*$)",
|
||||||
|
re.M | re.S)
|
||||||
|
|
||||||
|
def __init__(self, nodes):
|
||||||
|
self.nodes = nodes
|
||||||
|
|
||||||
|
def is_main_node(self, contents):
|
||||||
|
return self.DETECTMAIN_RE.search(contents)
|
||||||
|
|
||||||
|
@staticmethod
|
||||||
|
def _replace_comments_callback(match):
|
||||||
|
if "\n" in match.group(1):
|
||||||
|
return "\n" * match.group(1).count("\n")
|
||||||
|
else:
|
||||||
|
return " "
|
||||||
|
|
||||||
|
def _parse_prototypes(self, contents):
|
||||||
|
prototypes = []
|
||||||
|
reserved_keywords = set(["if", "else", "while"])
|
||||||
|
for item in self.PROTOTYPE_RE.findall(contents):
|
||||||
|
if set([item[1].strip(), item[2].strip()]) & reserved_keywords:
|
||||||
|
continue
|
||||||
|
prototypes.append(item[0])
|
||||||
|
return prototypes
|
||||||
|
|
||||||
|
def append_prototypes(self, fname, contents, prototypes):
|
||||||
|
contents = self.STRIPCOMMENTS_RE.sub(self._replace_comments_callback,
|
||||||
|
contents)
|
||||||
|
result = []
|
||||||
|
is_appended = False
|
||||||
|
linenum = 0
|
||||||
|
for line in contents.splitlines():
|
||||||
|
linenum += 1
|
||||||
|
line = line.strip()
|
||||||
|
|
||||||
|
if not is_appended and line and not line.startswith("#"):
|
||||||
|
is_appended = True
|
||||||
|
result.append("%s;" % ";\n".join(prototypes))
|
||||||
|
result.append('#line %d "%s"' % (linenum, fname))
|
||||||
|
|
||||||
|
result.append(line)
|
||||||
|
|
||||||
|
return result
|
||||||
|
|
||||||
|
def convert(self):
|
||||||
|
prototypes = []
|
||||||
|
data = []
|
||||||
|
for node in self.nodes:
|
||||||
|
ino_contents = node.get_text_contents()
|
||||||
|
prototypes += self._parse_prototypes(ino_contents)
|
||||||
|
|
||||||
|
item = (basename(node.get_path()), ino_contents)
|
||||||
|
if self.is_main_node(ino_contents):
|
||||||
|
data = [item] + data
|
||||||
|
else:
|
||||||
|
data.append(item)
|
||||||
|
|
||||||
|
if not data:
|
||||||
|
return None
|
||||||
|
|
||||||
|
result = ["#include <Arduino.h>"]
|
||||||
|
is_first = True
|
||||||
|
|
||||||
|
for name, contents in data:
|
||||||
|
if is_first and prototypes:
|
||||||
|
result += self.append_prototypes(name, contents, prototypes)
|
||||||
|
else:
|
||||||
|
result.append('#line 1 "%s"' % name)
|
||||||
|
result.append(contents)
|
||||||
|
is_first = False
|
||||||
|
|
||||||
|
return "\n".join(result)
|
||||||
|
|
||||||
|
|
||||||
|
def ConvertInoToCpp(env):
|
||||||
|
|
||||||
|
def delete_tmpcpp_file(file_):
|
||||||
|
remove(file_)
|
||||||
|
|
||||||
|
ino_nodes = (env.Glob(join("$PROJECTSRC_DIR", "*.ino")) +
|
||||||
|
env.Glob(join("$PROJECTSRC_DIR", "*.pde")))
|
||||||
|
|
||||||
|
c = InoToCPPConverter(ino_nodes)
|
||||||
|
data = c.convert()
|
||||||
|
|
||||||
|
if not data:
|
||||||
|
return
|
||||||
|
|
||||||
|
tmpcpp_file = join(env.subst("$PROJECTSRC_DIR"), "tmp_ino_to.cpp")
|
||||||
|
with open(tmpcpp_file, "w") as f:
|
||||||
|
f.write(data)
|
||||||
|
|
||||||
|
atexit.register(delete_tmpcpp_file, tmpcpp_file)
|
||||||
|
|
||||||
|
|
||||||
|
def DumpIDEData(env):
|
||||||
|
data = {
|
||||||
|
"defines": [],
|
||||||
|
"includes": []
|
||||||
|
}
|
||||||
|
|
||||||
|
# includes from framework and libs
|
||||||
|
for item in env.get("VARIANT_DIRS", []):
|
||||||
|
if "$BUILDSRC_DIR" in item[0]:
|
||||||
|
continue
|
||||||
|
data['includes'].append(env.subst(item[1]))
|
||||||
|
|
||||||
|
# includes from toolchain
|
||||||
|
toolchain_dir = env.subst(
|
||||||
|
join("$PIOPACKAGES_DIR", "$PIOPACKAGE_TOOLCHAIN"))
|
||||||
|
toolchain_incglobs = [
|
||||||
|
join(toolchain_dir, "*", "include"),
|
||||||
|
join(toolchain_dir, "lib", "gcc", "*", "*", "include")
|
||||||
|
]
|
||||||
|
for g in toolchain_incglobs:
|
||||||
|
data['includes'].extend(glob(g))
|
||||||
|
|
||||||
|
# global symbols
|
||||||
|
for item in env.get("CPPDEFINES", []):
|
||||||
|
if isinstance(item, list):
|
||||||
|
item = "=".join(item)
|
||||||
|
data['defines'].append(env.subst(item))
|
||||||
|
|
||||||
|
# special symbol for Atmel AVR MCU
|
||||||
|
board = env.get("BOARD_OPTIONS", {})
|
||||||
|
if board and board['platform'] == "atmelavr":
|
||||||
|
data['defines'].append(
|
||||||
|
"__AVR_%s__" % board['build']['mcu'].upper()
|
||||||
|
.replace("ATMEGA", "ATmega")
|
||||||
|
.replace("ATTINY", "ATtiny")
|
||||||
|
)
|
||||||
|
|
||||||
|
return data
|
||||||
|
|
||||||
|
|
||||||
|
def exists(_):
|
||||||
|
return True
|
||||||
|
|
||||||
|
|
||||||
|
def generate(env):
|
||||||
|
env.AddMethod(ConvertInoToCpp)
|
||||||
|
env.AddMethod(DumpIDEData)
|
||||||
|
return env
|
@ -1,20 +1,24 @@
|
|||||||
# Copyright (C) Ivan Kravets <me@ikravets.com>
|
# Copyright (C) Ivan Kravets <me@ikravets.com>
|
||||||
# See LICENSE for details.
|
# See LICENSE for details.
|
||||||
|
|
||||||
import atexit
|
|
||||||
import json
|
|
||||||
import re
|
import re
|
||||||
from glob import glob
|
from glob import glob
|
||||||
from os import getenv, listdir, remove, sep, walk
|
from os import getenv, listdir, sep, walk
|
||||||
from os.path import basename, dirname, isdir, isfile, join, normpath
|
from os.path import basename, dirname, isdir, isfile, join, normpath
|
||||||
|
|
||||||
from SCons.Script import (COMMAND_LINE_TARGETS, DefaultEnvironment, Exit,
|
from SCons.Script import DefaultEnvironment, Exit, SConscript
|
||||||
SConscript, SConscriptChdir)
|
|
||||||
from SCons.Util import case_sensitive_suffixes
|
from SCons.Util import case_sensitive_suffixes
|
||||||
|
|
||||||
from platformio.util import pioversion_to_intstr
|
from platformio.util import pioversion_to_intstr
|
||||||
|
|
||||||
|
|
||||||
|
SRC_BUILD_EXT = ["c", "cpp", "S", "spp", "SPP", "sx", "s", "asm", "ASM"]
|
||||||
|
SRC_HEADER_EXT = ["h", "hpp"]
|
||||||
|
SRC_DEFAULT_FILTER = " ".join([
|
||||||
|
"+<*>", "-<.git%s>" % sep, "-<svn%s>" % sep, "-<examples%s>" % sep
|
||||||
|
])
|
||||||
|
|
||||||
|
|
||||||
def BuildFirmware(env):
|
def BuildFirmware(env):
|
||||||
|
|
||||||
# fix ASM handling under non-casitive OS
|
# fix ASM handling under non-casitive OS
|
||||||
@ -27,49 +31,41 @@ def BuildFirmware(env):
|
|||||||
env.ProcessFlags()
|
env.ProcessFlags()
|
||||||
env.BuildFramework()
|
env.BuildFramework()
|
||||||
|
|
||||||
firmenv = env.Clone()
|
|
||||||
vdirs = firmenv.VariantDirRecursive(
|
|
||||||
join("$BUILD_DIR", "src"), "$PROJECTSRC_DIR", duplicate=False)
|
|
||||||
|
|
||||||
# build dependent libs
|
# build dependent libs
|
||||||
deplibs = firmenv.BuildDependentLibraries("$PROJECTSRC_DIR")
|
deplibs = env.BuildDependentLibraries("$PROJECTSRC_DIR")
|
||||||
|
|
||||||
# append specified LD_SCRIPT
|
# append specified LD_SCRIPT
|
||||||
if "LDSCRIPT_PATH" in firmenv:
|
if ("LDSCRIPT_PATH" in env and
|
||||||
firmenv.Append(
|
not any(["-Wl,-T" in f for f in env['LINKFLAGS']])):
|
||||||
LINKFLAGS=["-T", "$LDSCRIPT_PATH"]
|
env.Append(
|
||||||
|
LINKFLAGS=["-Wl,-T", "$LDSCRIPT_PATH"]
|
||||||
)
|
)
|
||||||
|
|
||||||
# enable "cyclic reference" for linker
|
# enable "cyclic reference" for linker
|
||||||
firmenv.Prepend(
|
env.Prepend(
|
||||||
_LIBFLAGS="-Wl,--start-group "
|
_LIBFLAGS="-Wl,--start-group "
|
||||||
)
|
)
|
||||||
firmenv.Append(
|
env.Append(
|
||||||
_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):
|
||||||
firmenv.MergeFlags(getenv("PLATFORMIO_SRCBUILD_FLAGS"))
|
env.MergeFlags(getenv("PLATFORMIO_SRC_BUILD_FLAGS"))
|
||||||
if "SRCBUILD_FLAGS" in env:
|
if "SRC_BUILD_FLAGS" in env:
|
||||||
firmenv.MergeFlags(env['SRCBUILD_FLAGS'])
|
env.MergeFlags(env['SRC_BUILD_FLAGS'])
|
||||||
|
|
||||||
firmenv.Append(
|
env.Append(
|
||||||
CPPDEFINES=["PLATFORMIO={0:02d}{1:02d}{2:02d}".format(
|
CPPDEFINES=["PLATFORMIO={0:02d}{1:02d}{2:02d}".format(
|
||||||
*pioversion_to_intstr())]
|
*pioversion_to_intstr())]
|
||||||
)
|
)
|
||||||
|
|
||||||
if "envdump" in COMMAND_LINE_TARGETS:
|
return env.Program(
|
||||||
print env.Dump()
|
|
||||||
Exit()
|
|
||||||
|
|
||||||
if "idedata" in COMMAND_LINE_TARGETS:
|
|
||||||
print json.dumps(env.DumpIDEData())
|
|
||||||
Exit()
|
|
||||||
|
|
||||||
return firmenv.Program(
|
|
||||||
join("$BUILD_DIR", "firmware"),
|
join("$BUILD_DIR", "firmware"),
|
||||||
[firmenv.GlobCXXFiles(vdir) for vdir in vdirs],
|
env.LookupSources(
|
||||||
|
"$BUILDSRC_DIR", "$PROJECTSRC_DIR", duplicate=False,
|
||||||
|
src_filter=getenv("PLATFORMIO_SRC_FILTER",
|
||||||
|
env.get("SRC_FILTER", None))),
|
||||||
LIBS=env.get("LIBS", []) + deplibs,
|
LIBS=env.get("LIBS", []) + deplibs,
|
||||||
LIBPATH=env.get("LIBPATH", []) + ["$BUILD_DIR"],
|
LIBPATH=env.get("LIBPATH", []) + ["$BUILD_DIR"],
|
||||||
PROGSUFFIX=".elf"
|
PROGSUFFIX=".elf"
|
||||||
@ -95,13 +91,13 @@ def ProcessFlags(env):
|
|||||||
env.Append(_CPPDEFFLAGS=" %s" % " ".join(undefines))
|
env.Append(_CPPDEFFLAGS=" %s" % " ".join(undefines))
|
||||||
|
|
||||||
|
|
||||||
def GlobCXXFiles(env, path):
|
def IsFileWithExt(env, file_, ext): # pylint: disable=W0613
|
||||||
files = []
|
if basename(file_).startswith("."):
|
||||||
for suff in ["c", "cpp", "S", "spp", "SPP", "sx", "s", "asm", "ASM"]:
|
return False
|
||||||
_list = env.Glob(join(path, "*.%s" % suff))
|
for e in ext:
|
||||||
if _list:
|
if file_.endswith(".%s" % e):
|
||||||
files += _list
|
return True
|
||||||
return files
|
return False
|
||||||
|
|
||||||
|
|
||||||
def VariantDirWrap(env, variant_dir, src_dir, duplicate=True):
|
def VariantDirWrap(env, variant_dir, src_dir, duplicate=True):
|
||||||
@ -109,20 +105,53 @@ def VariantDirWrap(env, variant_dir, src_dir, duplicate=True):
|
|||||||
env.VariantDir(variant_dir, src_dir, duplicate)
|
env.VariantDir(variant_dir, src_dir, duplicate)
|
||||||
|
|
||||||
|
|
||||||
def VariantDirRecursive(env, variant_dir, src_dir, duplicate=True,
|
def LookupSources(env, variant_dir, src_dir, duplicate=True, src_filter=None):
|
||||||
ignore_pattern=None):
|
|
||||||
if not ignore_pattern:
|
SRC_FILTER_PATTERNS_RE = re.compile(r"(\+|\-)<([^>]+)>")
|
||||||
ignore_pattern = (".git", ".svn")
|
|
||||||
|
def _append_build_item(items, item, src_dir):
|
||||||
|
if env.IsFileWithExt(item, SRC_BUILD_EXT + SRC_HEADER_EXT):
|
||||||
|
items.add(item.replace(src_dir + sep, ""))
|
||||||
|
|
||||||
|
def _match_sources(src_dir, src_filter):
|
||||||
|
matches = set()
|
||||||
|
# correct fs directory separator
|
||||||
|
src_filter = src_filter.replace("/", sep).replace("\\", sep)
|
||||||
|
for (action, pattern) in SRC_FILTER_PATTERNS_RE.findall(src_filter):
|
||||||
|
items = set()
|
||||||
|
for item in glob(join(src_dir, pattern)):
|
||||||
|
if isdir(item):
|
||||||
|
for root, _, files in walk(item, followlinks=True):
|
||||||
|
for f in files:
|
||||||
|
_append_build_item(items, join(root, f), src_dir)
|
||||||
|
else:
|
||||||
|
_append_build_item(items, item, src_dir)
|
||||||
|
if action == "+":
|
||||||
|
matches |= items
|
||||||
|
else:
|
||||||
|
matches -= items
|
||||||
|
return sorted(list(matches))
|
||||||
|
|
||||||
|
sources = []
|
||||||
variants = []
|
variants = []
|
||||||
|
|
||||||
src_dir = env.subst(src_dir)
|
src_dir = env.subst(src_dir)
|
||||||
for root, _, _ in walk(src_dir, followlinks=True):
|
if src_dir.endswith(sep):
|
||||||
_src_dir = root
|
src_dir = src_dir[:-1]
|
||||||
_var_dir = variant_dir + root.replace(src_dir, "")
|
|
||||||
if any([s in _var_dir.lower() for s in ignore_pattern]):
|
for item in _match_sources(src_dir, src_filter or SRC_DEFAULT_FILTER):
|
||||||
continue
|
_reldir = dirname(item)
|
||||||
env.VariantDirWrap(_var_dir, _src_dir, duplicate)
|
_src_dir = join(src_dir, _reldir) if _reldir else src_dir
|
||||||
variants.append(_var_dir)
|
_var_dir = join(variant_dir, _reldir) if _reldir else variant_dir
|
||||||
return variants
|
|
||||||
|
if _var_dir not in variants:
|
||||||
|
variants.append(_var_dir)
|
||||||
|
env.VariantDirWrap(_var_dir, _src_dir, duplicate)
|
||||||
|
|
||||||
|
if env.IsFileWithExt(item, SRC_BUILD_EXT):
|
||||||
|
sources.append(env.File(join(_var_dir, basename(item))))
|
||||||
|
|
||||||
|
return sources
|
||||||
|
|
||||||
|
|
||||||
def BuildFramework(env):
|
def BuildFramework(env):
|
||||||
@ -135,7 +164,6 @@ def BuildFramework(env):
|
|||||||
for f in env['FRAMEWORK'].split(","):
|
for f in env['FRAMEWORK'].split(","):
|
||||||
framework = f.strip().lower()
|
framework = f.strip().lower()
|
||||||
if framework in env.get("BOARD_OPTIONS", {}).get("frameworks"):
|
if framework in env.get("BOARD_OPTIONS", {}).get("frameworks"):
|
||||||
SConscriptChdir(0)
|
|
||||||
SConscript(
|
SConscript(
|
||||||
env.subst(join("$PIOBUILDER_DIR", "scripts", "frameworks",
|
env.subst(join("$PIOBUILDER_DIR", "scripts", "frameworks",
|
||||||
"%s.py" % framework))
|
"%s.py" % framework))
|
||||||
@ -145,18 +173,11 @@ def BuildFramework(env):
|
|||||||
framework)
|
framework)
|
||||||
|
|
||||||
|
|
||||||
def BuildLibrary(env, variant_dir, library_dir, ignore_files=None):
|
def BuildLibrary(env, variant_dir, src_dir, src_filter=None):
|
||||||
lib = env.Clone()
|
lib = env.Clone()
|
||||||
vdirs = lib.VariantDirRecursive(
|
|
||||||
variant_dir, library_dir, ignore_pattern=(".git", ".svn", "examples"))
|
|
||||||
srcfiles = []
|
|
||||||
for vdir in vdirs:
|
|
||||||
for item in lib.GlobCXXFiles(vdir):
|
|
||||||
if not ignore_files or item.name not in ignore_files:
|
|
||||||
srcfiles.append(item)
|
|
||||||
return lib.Library(
|
return lib.Library(
|
||||||
lib.subst(variant_dir),
|
lib.subst(variant_dir),
|
||||||
srcfiles
|
lib.LookupSources(variant_dir, src_dir, src_filter=src_filter)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
@ -165,8 +186,6 @@ def BuildDependentLibraries(env, src_dir): # pylint: disable=R0914
|
|||||||
INCLUDES_RE = re.compile(
|
INCLUDES_RE = re.compile(
|
||||||
r"^\s*#include\s+(\<|\")([^\>\"\']+)(?:\>|\")", re.M)
|
r"^\s*#include\s+(\<|\")([^\>\"\']+)(?:\>|\")", re.M)
|
||||||
LIBSOURCE_DIRS = [env.subst(d) for d in env.get("LIBSOURCE_DIRS", [])]
|
LIBSOURCE_DIRS = [env.subst(d) for d in env.get("LIBSOURCE_DIRS", [])]
|
||||||
USE_LIBS = [l.strip() for l in env.get("USE_LIBS", "").split(",")
|
|
||||||
if l.strip()]
|
|
||||||
|
|
||||||
# start internal prototypes
|
# start internal prototypes
|
||||||
|
|
||||||
@ -207,7 +226,7 @@ def BuildDependentLibraries(env, src_dir): # pylint: disable=R0914
|
|||||||
if not isdir(lsd_dir):
|
if not isdir(lsd_dir):
|
||||||
continue
|
continue
|
||||||
|
|
||||||
for ld in USE_LIBS + sorted(listdir(lsd_dir)):
|
for ld in env.get("LIB_USE", []) + sorted(listdir(lsd_dir)):
|
||||||
if not isdir(join(lsd_dir, ld)):
|
if not isdir(join(lsd_dir, ld)):
|
||||||
continue
|
continue
|
||||||
|
|
||||||
@ -220,7 +239,7 @@ def BuildDependentLibraries(env, src_dir): # pylint: disable=R0914
|
|||||||
lib_name = basename(lib_dir)
|
lib_name = basename(lib_dir)
|
||||||
|
|
||||||
# ignore user's specified libs
|
# ignore user's specified libs
|
||||||
if "IGNORE_LIBS" in env and lib_name in env['IGNORE_LIBS']:
|
if lib_name in env.get("LIB_IGNORE", []):
|
||||||
continue
|
continue
|
||||||
|
|
||||||
if not isfile(inc_path):
|
if not isfile(inc_path):
|
||||||
@ -250,10 +269,10 @@ def BuildDependentLibraries(env, src_dir): # pylint: disable=R0914
|
|||||||
return result
|
return result
|
||||||
|
|
||||||
def _process_src_dir(state, src_dir):
|
def _process_src_dir(state, src_dir):
|
||||||
for root, _, _ in walk(src_dir, followlinks=True):
|
for root, _, files in walk(src_dir, followlinks=True):
|
||||||
for node in (env.GlobCXXFiles(root) +
|
for f in files:
|
||||||
env.Glob(join(root, "*.h"))):
|
if env.IsFileWithExt(f, SRC_BUILD_EXT + SRC_HEADER_EXT):
|
||||||
state = _parse_includes(state, node)
|
state = _parse_includes(state, env.File(join(root, f)))
|
||||||
return state
|
return state
|
||||||
|
|
||||||
def _parse_includes(state, node):
|
def _parse_includes(state, node):
|
||||||
@ -279,8 +298,7 @@ def BuildDependentLibraries(env, src_dir): # pylint: disable=R0914
|
|||||||
_lib_dir))
|
_lib_dir))
|
||||||
state['libs'].add(_lib_dir)
|
state['libs'].add(_lib_dir)
|
||||||
|
|
||||||
if getenv("PLATFORMIO_LDF_CYCLIC",
|
if env.subst("$LIB_DFCYCLIC").lower() == "true":
|
||||||
env.subst("$LDF_CYCLIC")).lower() == "true":
|
|
||||||
state = _process_src_dir(state, _lib_dir)
|
state = _process_src_dir(state, _lib_dir)
|
||||||
return state
|
return state
|
||||||
|
|
||||||
@ -306,151 +324,6 @@ def BuildDependentLibraries(env, src_dir): # pylint: disable=R0914
|
|||||||
return libs
|
return libs
|
||||||
|
|
||||||
|
|
||||||
class InoToCPPConverter(object):
|
|
||||||
|
|
||||||
PROTOTYPE_RE = re.compile(
|
|
||||||
r"""^(
|
|
||||||
(\s*[a-z_\d]+){1,2} # return type
|
|
||||||
(\s+[a-z_\d]+\s*) # name of prototype
|
|
||||||
\([a-z_,\.\*\&\[\]\s\d]*\) # arguments
|
|
||||||
)\s*\{ # must end with {
|
|
||||||
""",
|
|
||||||
re.X | re.M | re.I
|
|
||||||
)
|
|
||||||
|
|
||||||
DETECTMAIN_RE = re.compile(r"void\s+(setup|loop)\s*\(", re.M | re.I)
|
|
||||||
|
|
||||||
STRIPCOMMENTS_RE = re.compile(r"(/\*.*?\*/|(^|\s+)//[^\r\n]*$)",
|
|
||||||
re.M | re.S)
|
|
||||||
|
|
||||||
def __init__(self, nodes):
|
|
||||||
self.nodes = nodes
|
|
||||||
|
|
||||||
def is_main_node(self, contents):
|
|
||||||
return self.DETECTMAIN_RE.search(contents)
|
|
||||||
|
|
||||||
@staticmethod
|
|
||||||
def _replace_comments_callback(match):
|
|
||||||
if "\n" in match.group(1):
|
|
||||||
return "\n" * match.group(1).count("\n")
|
|
||||||
else:
|
|
||||||
return " "
|
|
||||||
|
|
||||||
def _parse_prototypes(self, contents):
|
|
||||||
prototypes = []
|
|
||||||
reserved_keywords = set(["if", "else", "while"])
|
|
||||||
for item in self.PROTOTYPE_RE.findall(contents):
|
|
||||||
if set([item[1].strip(), item[2].strip()]) & reserved_keywords:
|
|
||||||
continue
|
|
||||||
prototypes.append(item[0])
|
|
||||||
return prototypes
|
|
||||||
|
|
||||||
def append_prototypes(self, fname, contents, prototypes):
|
|
||||||
contents = self.STRIPCOMMENTS_RE.sub(self._replace_comments_callback,
|
|
||||||
contents)
|
|
||||||
result = []
|
|
||||||
is_appended = False
|
|
||||||
linenum = 0
|
|
||||||
for line in contents.splitlines():
|
|
||||||
linenum += 1
|
|
||||||
line = line.strip()
|
|
||||||
|
|
||||||
if not is_appended and line and not line.startswith("#"):
|
|
||||||
is_appended = True
|
|
||||||
result.append("%s;" % ";\n".join(prototypes))
|
|
||||||
result.append('#line %d "%s"' % (linenum, fname))
|
|
||||||
|
|
||||||
result.append(line)
|
|
||||||
|
|
||||||
return result
|
|
||||||
|
|
||||||
def convert(self):
|
|
||||||
prototypes = []
|
|
||||||
data = []
|
|
||||||
for node in self.nodes:
|
|
||||||
ino_contents = node.get_text_contents()
|
|
||||||
prototypes += self._parse_prototypes(ino_contents)
|
|
||||||
|
|
||||||
item = (basename(node.get_path()), ino_contents)
|
|
||||||
if self.is_main_node(ino_contents):
|
|
||||||
data = [item] + data
|
|
||||||
else:
|
|
||||||
data.append(item)
|
|
||||||
|
|
||||||
if not data:
|
|
||||||
return None
|
|
||||||
|
|
||||||
result = ["#include <Arduino.h>"]
|
|
||||||
is_first = True
|
|
||||||
|
|
||||||
for name, contents in data:
|
|
||||||
if is_first and prototypes:
|
|
||||||
result += self.append_prototypes(name, contents, prototypes)
|
|
||||||
else:
|
|
||||||
result.append('#line 1 "%s"' % name)
|
|
||||||
result.append(contents)
|
|
||||||
is_first = False
|
|
||||||
|
|
||||||
return "\n".join(result)
|
|
||||||
|
|
||||||
|
|
||||||
def ConvertInoToCpp(env):
|
|
||||||
|
|
||||||
def delete_tmpcpp_file(file_):
|
|
||||||
remove(file_)
|
|
||||||
|
|
||||||
ino_nodes = (env.Glob(join("$PROJECTSRC_DIR", "*.ino")) +
|
|
||||||
env.Glob(join("$PROJECTSRC_DIR", "*.pde")))
|
|
||||||
|
|
||||||
c = InoToCPPConverter(ino_nodes)
|
|
||||||
data = c.convert()
|
|
||||||
|
|
||||||
if not data:
|
|
||||||
return
|
|
||||||
|
|
||||||
tmpcpp_file = join(env.subst("$PROJECTSRC_DIR"), "tmp_ino_to.cpp")
|
|
||||||
with open(tmpcpp_file, "w") as f:
|
|
||||||
f.write(data)
|
|
||||||
|
|
||||||
atexit.register(delete_tmpcpp_file, tmpcpp_file)
|
|
||||||
|
|
||||||
|
|
||||||
def DumpIDEData(env):
|
|
||||||
data = {
|
|
||||||
"defines": [],
|
|
||||||
"includes": []
|
|
||||||
}
|
|
||||||
|
|
||||||
# includes from framework and libs
|
|
||||||
for item in env.get("VARIANT_DIRS", []):
|
|
||||||
data['includes'].append(env.subst(item[1]))
|
|
||||||
|
|
||||||
# includes from toolchain
|
|
||||||
toolchain_dir = env.subst(
|
|
||||||
join("$PIOPACKAGES_DIR", "$PIOPACKAGE_TOOLCHAIN"))
|
|
||||||
toolchain_incglobs = [
|
|
||||||
join(toolchain_dir, "*", "include"),
|
|
||||||
join(toolchain_dir, "lib", "gcc", "*", "*", "include")
|
|
||||||
]
|
|
||||||
for g in toolchain_incglobs:
|
|
||||||
data['includes'].extend(glob(g))
|
|
||||||
|
|
||||||
# global symbols
|
|
||||||
for item in env.get("CPPDEFINES", []):
|
|
||||||
data['defines'].append(env.subst(item))
|
|
||||||
|
|
||||||
# special symbol for Atmel AVR MCU
|
|
||||||
board = env.get("BOARD_OPTIONS", {})
|
|
||||||
if board and board['platform'] == "atmelavr":
|
|
||||||
data['defines'].append(
|
|
||||||
"__AVR_%s__" % board['build']['mcu'].upper()
|
|
||||||
.replace("ATMEGA", "ATmega")
|
|
||||||
.replace("ATTINY", "ATtiny")
|
|
||||||
)
|
|
||||||
|
|
||||||
return data
|
|
||||||
|
|
||||||
|
|
||||||
def exists(_):
|
def exists(_):
|
||||||
return True
|
return True
|
||||||
|
|
||||||
@ -458,12 +331,10 @@ def exists(_):
|
|||||||
def generate(env):
|
def generate(env):
|
||||||
env.AddMethod(BuildFirmware)
|
env.AddMethod(BuildFirmware)
|
||||||
env.AddMethod(ProcessFlags)
|
env.AddMethod(ProcessFlags)
|
||||||
env.AddMethod(GlobCXXFiles)
|
env.AddMethod(IsFileWithExt)
|
||||||
env.AddMethod(VariantDirWrap)
|
env.AddMethod(VariantDirWrap)
|
||||||
env.AddMethod(VariantDirRecursive)
|
env.AddMethod(LookupSources)
|
||||||
env.AddMethod(BuildFramework)
|
env.AddMethod(BuildFramework)
|
||||||
env.AddMethod(BuildLibrary)
|
env.AddMethod(BuildLibrary)
|
||||||
env.AddMethod(BuildDependentLibraries)
|
env.AddMethod(BuildDependentLibraries)
|
||||||
env.AddMethod(ConvertInoToCpp)
|
|
||||||
env.AddMethod(DumpIDEData)
|
|
||||||
return env
|
return env
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
import stat
|
import stat
|
||||||
from glob import glob
|
from glob import glob
|
||||||
from os import chmod, getenv, makedirs, remove
|
from os import chmod, getenv, makedirs, remove
|
||||||
from os.path import abspath, basename, isdir, isfile, join
|
from os.path import abspath, basename, expanduser, isdir, isfile, join
|
||||||
from shutil import copyfile, copytree, rmtree
|
from shutil import copyfile, copytree, rmtree
|
||||||
from tempfile import mkdtemp
|
from tempfile import mkdtemp
|
||||||
|
|
||||||
@ -19,8 +19,12 @@ from platformio.util import get_boards
|
|||||||
|
|
||||||
def validate_path(ctx, param, value): # pylint: disable=W0613
|
def validate_path(ctx, param, value): # pylint: disable=W0613
|
||||||
invalid_path = None
|
invalid_path = None
|
||||||
for p in value:
|
value = list(value)
|
||||||
if not glob(p):
|
for i, p in enumerate(value):
|
||||||
|
if p.startswith("~"):
|
||||||
|
value[i] = expanduser(p)
|
||||||
|
value[i] = abspath(value[i])
|
||||||
|
if not glob(value[i]):
|
||||||
invalid_path = p
|
invalid_path = p
|
||||||
break
|
break
|
||||||
try:
|
try:
|
||||||
@ -109,7 +113,6 @@ def _copy_contents(dst_dir, contents):
|
|||||||
}
|
}
|
||||||
|
|
||||||
for path in contents:
|
for path in contents:
|
||||||
path = abspath(path)
|
|
||||||
if isdir(path):
|
if isdir(path):
|
||||||
items['dirs'].add(path)
|
items['dirs'].add(path)
|
||||||
elif isfile(path):
|
elif isfile(path):
|
||||||
|
@ -86,7 +86,7 @@ def cli(project_dir, board, ide, disable_auto_uploading, env_prefix):
|
|||||||
project_file, board, disable_auto_uploading, env_prefix)
|
project_file, board, disable_auto_uploading, env_prefix)
|
||||||
|
|
||||||
if ide:
|
if ide:
|
||||||
pg = ProjectGenerator(project_dir, ide)
|
pg = ProjectGenerator(project_dir, ide, board[0] if board else None)
|
||||||
pg.generate()
|
pg.generate()
|
||||||
|
|
||||||
click.secho(
|
click.secho(
|
||||||
|
@ -73,11 +73,19 @@ def cli(ctx, environment, target, upload_port, # pylint: disable=R0913,R0914
|
|||||||
|
|
||||||
class EnvironmentProcessor(object):
|
class EnvironmentProcessor(object):
|
||||||
|
|
||||||
|
RENAMED_OPTIONS = {
|
||||||
|
"INSTALL_LIBS": "LIB_INSTALL",
|
||||||
|
"IGNORE_LIBS": "LIB_IGNORE",
|
||||||
|
"USE_LIBS": "LIB_USE",
|
||||||
|
"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
|
||||||
targets, upload_port, verbose):
|
targets, upload_port, verbose):
|
||||||
self.cmd_ctx = cmd_ctx
|
self.cmd_ctx = cmd_ctx
|
||||||
self.name = name
|
self.name = name
|
||||||
self.options = options
|
self.options = self._validate_options(options)
|
||||||
self.targets = targets
|
self.targets = targets
|
||||||
self.upload_port = upload_port
|
self.upload_port = upload_port
|
||||||
self.verbose_level = int(verbose)
|
self.verbose_level = int(verbose)
|
||||||
@ -108,6 +116,23 @@ class EnvironmentProcessor(object):
|
|||||||
|
|
||||||
return not is_error
|
return not is_error
|
||||||
|
|
||||||
|
def _validate_options(self, options):
|
||||||
|
result = {}
|
||||||
|
for k, v in options.items():
|
||||||
|
_k = k.upper()
|
||||||
|
# process obsolete options
|
||||||
|
if _k in self.RENAMED_OPTIONS:
|
||||||
|
click.secho(
|
||||||
|
"Warning! `%s` option is deprecated and will be "
|
||||||
|
"removed in the next release! Please use "
|
||||||
|
"`%s` instead." % (
|
||||||
|
k, self.RENAMED_OPTIONS[_k].lower()),
|
||||||
|
fg="yellow"
|
||||||
|
)
|
||||||
|
k = self.RENAMED_OPTIONS[_k].lower()
|
||||||
|
result[k] = v
|
||||||
|
return result
|
||||||
|
|
||||||
def _get_build_variables(self):
|
def _get_build_variables(self):
|
||||||
variables = ["PIOENV=" + self.name]
|
variables = ["PIOENV=" + self.name]
|
||||||
if self.upload_port:
|
if self.upload_port:
|
||||||
@ -116,7 +141,7 @@ class EnvironmentProcessor(object):
|
|||||||
k = k.upper()
|
k = k.upper()
|
||||||
if k == "TARGETS" or (k == "UPLOAD_PORT" and self.upload_port):
|
if k == "TARGETS" or (k == "UPLOAD_PORT" and self.upload_port):
|
||||||
continue
|
continue
|
||||||
variables.append("%s=%s" % (k.upper(), v))
|
variables.append("%s=%s" % (k, v))
|
||||||
return variables
|
return variables
|
||||||
|
|
||||||
def _get_build_targets(self):
|
def _get_build_targets(self):
|
||||||
@ -139,8 +164,8 @@ class EnvironmentProcessor(object):
|
|||||||
|
|
||||||
# install platform and libs dependencies
|
# install platform and libs dependencies
|
||||||
_autoinstall_platform(self.cmd_ctx, platform)
|
_autoinstall_platform(self.cmd_ctx, platform)
|
||||||
if "install_libs" in self.options:
|
if "lib_install" in self.options:
|
||||||
_autoinstall_libs(self.cmd_ctx, self.options['install_libs'])
|
_autoinstall_libs(self.cmd_ctx, self.options['lib_install'])
|
||||||
|
|
||||||
p = PlatformFactory.newPlatform(platform)
|
p = PlatformFactory.newPlatform(platform)
|
||||||
return p.run(build_vars, build_targets, self.verbose_level)
|
return p.run(build_vars, build_targets, self.verbose_level)
|
||||||
|
@ -30,7 +30,7 @@ class UnknownPlatform(PlatformioException):
|
|||||||
class PlatformNotInstalledYet(PlatformioException):
|
class PlatformNotInstalledYet(PlatformioException):
|
||||||
|
|
||||||
MESSAGE = ("The platform '%s' has not been installed yet. "
|
MESSAGE = ("The platform '%s' has not been installed yet. "
|
||||||
"Use `platformio install` command")
|
"Use `platformio platforms install` command")
|
||||||
|
|
||||||
|
|
||||||
class UnknownCLICommand(PlatformioException):
|
class UnknownCLICommand(PlatformioException):
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
import json
|
import json
|
||||||
from glob import glob
|
from glob import glob
|
||||||
from os import listdir, walk
|
from os import listdir, walk
|
||||||
from os.path import basename, isdir, join
|
from os.path import abspath, basename, expanduser, isdir, join, relpath
|
||||||
|
|
||||||
import bottle
|
import bottle
|
||||||
|
|
||||||
@ -13,9 +13,10 @@ from platformio import util
|
|||||||
|
|
||||||
class ProjectGenerator(object):
|
class ProjectGenerator(object):
|
||||||
|
|
||||||
def __init__(self, project_dir, ide):
|
def __init__(self, project_dir, ide, board=None):
|
||||||
self.project_dir = project_dir
|
self.project_dir = project_dir
|
||||||
self.ide = ide
|
self.ide = ide
|
||||||
|
self.board = board
|
||||||
self._tplvars = {}
|
self._tplvars = {}
|
||||||
|
|
||||||
self._gather_tplvars()
|
self._gather_tplvars()
|
||||||
@ -26,6 +27,7 @@ class ProjectGenerator(object):
|
|||||||
return sorted([d for d in listdir(tpls_dir)
|
return sorted([d for d in listdir(tpls_dir)
|
||||||
if isdir(join(tpls_dir, d))])
|
if isdir(join(tpls_dir, d))])
|
||||||
|
|
||||||
|
@util.memoized
|
||||||
def get_project_env(self):
|
def get_project_env(self):
|
||||||
data = {"env_name": "PlatformIO"}
|
data = {"env_name": "PlatformIO"}
|
||||||
with util.cd(self.project_dir):
|
with util.cd(self.project_dir):
|
||||||
@ -33,9 +35,11 @@ class ProjectGenerator(object):
|
|||||||
for section in config.sections():
|
for section in config.sections():
|
||||||
if not section.startswith("env:"):
|
if not section.startswith("env:"):
|
||||||
continue
|
continue
|
||||||
data['env_name'] = section[4:]
|
data = {"env_name": section[4:]}
|
||||||
for k, v in config.items(section):
|
for k, v in config.items(section):
|
||||||
data[k] = v
|
data[k] = v
|
||||||
|
if self.board and self.board == data.get("board"):
|
||||||
|
break
|
||||||
return data
|
return data
|
||||||
|
|
||||||
@util.memoized
|
@util.memoized
|
||||||
@ -63,12 +67,12 @@ class ProjectGenerator(object):
|
|||||||
def get_project_name(self):
|
def get_project_name(self):
|
||||||
return basename(self.project_dir)
|
return basename(self.project_dir)
|
||||||
|
|
||||||
@staticmethod
|
def get_srcfiles(self):
|
||||||
def get_srcfiles():
|
|
||||||
result = []
|
result = []
|
||||||
for root, _, files in walk(util.get_projectsrc_dir()):
|
with util.cd(self.project_dir):
|
||||||
for f in files:
|
for root, _, files in walk(util.get_projectsrc_dir()):
|
||||||
result.append(join(root, f))
|
for f in files:
|
||||||
|
result.append(relpath(join(root, f)))
|
||||||
return result
|
return result
|
||||||
|
|
||||||
def get_tpls(self):
|
def get_tpls(self):
|
||||||
@ -99,5 +103,6 @@ class ProjectGenerator(object):
|
|||||||
"defines": (build_data['defines']
|
"defines": (build_data['defines']
|
||||||
if build_data and "defines" in build_data else []),
|
if build_data and "defines" in build_data else []),
|
||||||
"srcfiles": self.get_srcfiles(),
|
"srcfiles": self.get_srcfiles(),
|
||||||
|
"user_home_dir": abspath(expanduser("~")),
|
||||||
"project_dir": self.project_dir
|
"project_dir": self.project_dir
|
||||||
})
|
})
|
||||||
|
@ -24,8 +24,12 @@
|
|||||||
<tool id="org.eclipse.cdt.build.core.settings.holder.1624502120" name="Assembly" superClass="org.eclipse.cdt.build.core.settings.holder">
|
<tool id="org.eclipse.cdt.build.core.settings.holder.1624502120" name="Assembly" superClass="org.eclipse.cdt.build.core.settings.holder">
|
||||||
<option id="org.eclipse.cdt.build.core.settings.holder.incpaths.239157887" name="Include Paths" superClass="org.eclipse.cdt.build.core.settings.holder.incpaths" valueType="includePath">
|
<option id="org.eclipse.cdt.build.core.settings.holder.incpaths.239157887" name="Include Paths" superClass="org.eclipse.cdt.build.core.settings.holder.incpaths" valueType="includePath">
|
||||||
% for include in includes:
|
% for include in includes:
|
||||||
|
% if include.startswith(user_home_dir):
|
||||||
|
<listOptionValue builtIn="false" value="${HOME}{{include.replace(user_home_dir, '')}}"/>
|
||||||
|
% else:
|
||||||
<listOptionValue builtIn="false" value="{{include}}"/>
|
<listOptionValue builtIn="false" value="{{include}}"/>
|
||||||
% end
|
% end
|
||||||
|
% end
|
||||||
</option>
|
</option>
|
||||||
<option id="org.eclipse.cdt.build.core.settings.holder.symbols.922107295" name="Symbols" superClass="org.eclipse.cdt.build.core.settings.holder.symbols" valueType="definedSymbols">
|
<option id="org.eclipse.cdt.build.core.settings.holder.symbols.922107295" name="Symbols" superClass="org.eclipse.cdt.build.core.settings.holder.symbols" valueType="definedSymbols">
|
||||||
% for define in defines:
|
% for define in defines:
|
||||||
@ -37,8 +41,12 @@
|
|||||||
<tool id="org.eclipse.cdt.build.core.settings.holder.54121539" name="GNU C++" superClass="org.eclipse.cdt.build.core.settings.holder">
|
<tool id="org.eclipse.cdt.build.core.settings.holder.54121539" name="GNU C++" superClass="org.eclipse.cdt.build.core.settings.holder">
|
||||||
<option id="org.eclipse.cdt.build.core.settings.holder.incpaths.1096940598" name="Include Paths" superClass="org.eclipse.cdt.build.core.settings.holder.incpaths" valueType="includePath">
|
<option id="org.eclipse.cdt.build.core.settings.holder.incpaths.1096940598" name="Include Paths" superClass="org.eclipse.cdt.build.core.settings.holder.incpaths" valueType="includePath">
|
||||||
% for include in includes:
|
% for include in includes:
|
||||||
|
% if include.startswith(user_home_dir):
|
||||||
|
<listOptionValue builtIn="false" value="${HOME}{{include.replace(user_home_dir, '')}}"/>
|
||||||
|
% else:
|
||||||
<listOptionValue builtIn="false" value="{{include}}"/>
|
<listOptionValue builtIn="false" value="{{include}}"/>
|
||||||
% end
|
% end
|
||||||
|
% end
|
||||||
</option>
|
</option>
|
||||||
<option id="org.eclipse.cdt.build.core.settings.holder.symbols.1198905600" name="Symbols" superClass="org.eclipse.cdt.build.core.settings.holder.symbols" valueType="definedSymbols">
|
<option id="org.eclipse.cdt.build.core.settings.holder.symbols.1198905600" name="Symbols" superClass="org.eclipse.cdt.build.core.settings.holder.symbols" valueType="definedSymbols">
|
||||||
% for define in defines:
|
% for define in defines:
|
||||||
@ -50,8 +58,12 @@
|
|||||||
<tool id="org.eclipse.cdt.build.core.settings.holder.1310559623" name="GNU C" superClass="org.eclipse.cdt.build.core.settings.holder">
|
<tool id="org.eclipse.cdt.build.core.settings.holder.1310559623" name="GNU C" superClass="org.eclipse.cdt.build.core.settings.holder">
|
||||||
<option id="org.eclipse.cdt.build.core.settings.holder.incpaths.41298875" name="Include Paths" superClass="org.eclipse.cdt.build.core.settings.holder.incpaths" valueType="includePath">
|
<option id="org.eclipse.cdt.build.core.settings.holder.incpaths.41298875" name="Include Paths" superClass="org.eclipse.cdt.build.core.settings.holder.incpaths" valueType="includePath">
|
||||||
% for include in includes:
|
% for include in includes:
|
||||||
|
% if include.startswith(user_home_dir):
|
||||||
|
<listOptionValue builtIn="false" value="${HOME}{{include.replace(user_home_dir, '')}}"/>
|
||||||
|
% else:
|
||||||
<listOptionValue builtIn="false" value="{{include}}"/>
|
<listOptionValue builtIn="false" value="{{include}}"/>
|
||||||
% end
|
% end
|
||||||
|
% end
|
||||||
</option>
|
</option>
|
||||||
<option id="org.eclipse.cdt.build.core.settings.holder.symbols.884639970" name="Symbols" superClass="org.eclipse.cdt.build.core.settings.holder.symbols" valueType="definedSymbols">
|
<option id="org.eclipse.cdt.build.core.settings.holder.symbols.884639970" name="Symbols" superClass="org.eclipse.cdt.build.core.settings.holder.symbols" valueType="definedSymbols">
|
||||||
% for define in defines:
|
% for define in defines:
|
||||||
|
@ -2,14 +2,16 @@ win32 {
|
|||||||
HOMEDIR += $$(USERPROFILE)
|
HOMEDIR += $$(USERPROFILE)
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
HOMEDIR += $$(PWD)
|
HOMEDIR += $$(HOME)
|
||||||
}
|
}
|
||||||
|
|
||||||
% for include in includes:
|
% for include in includes:
|
||||||
|
% if include.startswith(user_home_dir):
|
||||||
|
INCLUDEPATH += "$${HOMEDIR}{{include.replace(user_home_dir, "")}}"
|
||||||
|
% else:
|
||||||
INCLUDEPATH += "{{include}}"
|
INCLUDEPATH += "{{include}}"
|
||||||
% end
|
% end
|
||||||
|
% end
|
||||||
win32:INCLUDEPATH ~= s,/,\\,g
|
|
||||||
|
|
||||||
% for define in defines:
|
% for define in defines:
|
||||||
DEFINES += "{{define}}"
|
DEFINES += "{{define}}"
|
||||||
|
@ -1,231 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<!DOCTYPE QtCreatorProject>
|
|
||||||
<!-- Written by QtCreator 3.2.2, 2015-05-07T12:57:08. -->
|
|
||||||
<qtcreator>
|
|
||||||
<data>
|
|
||||||
<variable>EnvironmentId</variable>
|
|
||||||
<value type="QByteArray">{00248b6a-4380-4f03-8dea-a03053177907}</value>
|
|
||||||
</data>
|
|
||||||
<data>
|
|
||||||
<variable>ProjectExplorer.Project.ActiveTarget</variable>
|
|
||||||
<value type="int">0</value>
|
|
||||||
</data>
|
|
||||||
<data>
|
|
||||||
<variable>ProjectExplorer.Project.EditorSettings</variable>
|
|
||||||
<valuemap type="QVariantMap">
|
|
||||||
<value type="bool" key="EditorConfiguration.AutoIndent">true</value>
|
|
||||||
<value type="bool" key="EditorConfiguration.AutoSpacesForTabs">false</value>
|
|
||||||
<value type="bool" key="EditorConfiguration.CamelCaseNavigation">true</value>
|
|
||||||
<valuemap type="QVariantMap" key="EditorConfiguration.CodeStyle.0">
|
|
||||||
<value type="QString" key="language">Cpp</value>
|
|
||||||
<valuemap type="QVariantMap" key="value">
|
|
||||||
<value type="QByteArray" key="CurrentPreferences">CppGlobal</value>
|
|
||||||
</valuemap>
|
|
||||||
</valuemap>
|
|
||||||
<valuemap type="QVariantMap" key="EditorConfiguration.CodeStyle.1">
|
|
||||||
<value type="QString" key="language">QmlJS</value>
|
|
||||||
<valuemap type="QVariantMap" key="value">
|
|
||||||
<value type="QByteArray" key="CurrentPreferences">QmlJSGlobal</value>
|
|
||||||
</valuemap>
|
|
||||||
</valuemap>
|
|
||||||
<value type="int" key="EditorConfiguration.CodeStyle.Count">2</value>
|
|
||||||
<value type="QByteArray" key="EditorConfiguration.Codec">UTF-8</value>
|
|
||||||
<value type="bool" key="EditorConfiguration.ConstrainTooltips">false</value>
|
|
||||||
<value type="int" key="EditorConfiguration.IndentSize">4</value>
|
|
||||||
<value type="bool" key="EditorConfiguration.KeyboardTooltips">false</value>
|
|
||||||
<value type="int" key="EditorConfiguration.MarginColumn">80</value>
|
|
||||||
<value type="bool" key="EditorConfiguration.MouseHiding">true</value>
|
|
||||||
<value type="bool" key="EditorConfiguration.MouseNavigation">true</value>
|
|
||||||
<value type="int" key="EditorConfiguration.PaddingMode">1</value>
|
|
||||||
<value type="bool" key="EditorConfiguration.ScrollWheelZooming">true</value>
|
|
||||||
<value type="bool" key="EditorConfiguration.ShowMargin">false</value>
|
|
||||||
<value type="int" key="EditorConfiguration.SmartBackspaceBehavior">0</value>
|
|
||||||
<value type="bool" key="EditorConfiguration.SpacesForTabs">true</value>
|
|
||||||
<value type="int" key="EditorConfiguration.TabKeyBehavior">0</value>
|
|
||||||
<value type="int" key="EditorConfiguration.TabSize">8</value>
|
|
||||||
<value type="bool" key="EditorConfiguration.UseGlobal">true</value>
|
|
||||||
<value type="int" key="EditorConfiguration.Utf8BomBehavior">1</value>
|
|
||||||
<value type="bool" key="EditorConfiguration.addFinalNewLine">true</value>
|
|
||||||
<value type="bool" key="EditorConfiguration.cleanIndentation">true</value>
|
|
||||||
<value type="bool" key="EditorConfiguration.cleanWhitespace">true</value>
|
|
||||||
<value type="bool" key="EditorConfiguration.inEntireDocument">false</value>
|
|
||||||
</valuemap>
|
|
||||||
</data>
|
|
||||||
<data>
|
|
||||||
<variable>ProjectExplorer.Project.PluginSettings</variable>
|
|
||||||
<valuemap type="QVariantMap"/>
|
|
||||||
</data>
|
|
||||||
<data>
|
|
||||||
<variable>ProjectExplorer.Project.Target.0</variable>
|
|
||||||
<valuemap type="QVariantMap">
|
|
||||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">{{project_name}}</value>
|
|
||||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">{{project_name}}</value>
|
|
||||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">qt.53.win32_mingw482_kit</value>
|
|
||||||
<value type="int" key="ProjectExplorer.Target.ActiveBuildConfiguration">1</value>
|
|
||||||
<value type="int" key="ProjectExplorer.Target.ActiveDeployConfiguration">0</value>
|
|
||||||
<value type="int" key="ProjectExplorer.Target.ActiveRunConfiguration">0</value>
|
|
||||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.0">
|
|
||||||
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">{{project_dir}}</value>
|
|
||||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
|
||||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
|
||||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
|
||||||
<value type="QString" key="ProjectExplorer.ProcessStep.Arguments">--force run</value>
|
|
||||||
<value type="QString" key="ProjectExplorer.ProcessStep.Command">platformio</value>
|
|
||||||
<value type="QString" key="ProjectExplorer.ProcessStep.WorkingDirectory">%{buildDir}</value>
|
|
||||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Custom Process Step</value>
|
|
||||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
|
||||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.ProcessStep</value>
|
|
||||||
</valuemap>
|
|
||||||
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
|
|
||||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value>
|
|
||||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
|
||||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
|
|
||||||
</valuemap>
|
|
||||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
|
|
||||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
|
||||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
|
||||||
<value type="QString" key="ProjectExplorer.ProcessStep.Arguments">--force run --target clean</value>
|
|
||||||
<value type="QString" key="ProjectExplorer.ProcessStep.Command">platformio</value>
|
|
||||||
<value type="QString" key="ProjectExplorer.ProcessStep.WorkingDirectory">%{buildDir}</value>
|
|
||||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Custom Process Step</value>
|
|
||||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
|
||||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.ProcessStep</value>
|
|
||||||
</valuemap>
|
|
||||||
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
|
|
||||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value>
|
|
||||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
|
||||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
|
|
||||||
</valuemap>
|
|
||||||
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
|
|
||||||
<value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
|
|
||||||
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
|
|
||||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Debug</value>
|
|
||||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
|
||||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value>
|
|
||||||
<value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">2</value>
|
|
||||||
<value type="bool" key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild">true</value>
|
|
||||||
</valuemap>
|
|
||||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.1">
|
|
||||||
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">{{project_dir}}</value>
|
|
||||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
|
||||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
|
||||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
|
||||||
<value type="QString" key="ProjectExplorer.ProcessStep.Arguments">--force run</value>
|
|
||||||
<value type="QString" key="ProjectExplorer.ProcessStep.Command">platformio</value>
|
|
||||||
<value type="QString" key="ProjectExplorer.ProcessStep.WorkingDirectory">%{buildDir}</value>
|
|
||||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Custom Process Step</value>
|
|
||||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
|
||||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.ProcessStep</value>
|
|
||||||
</valuemap>
|
|
||||||
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
|
|
||||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value>
|
|
||||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
|
||||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
|
|
||||||
</valuemap>
|
|
||||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
|
|
||||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
|
||||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
|
||||||
<value type="QString" key="ProjectExplorer.ProcessStep.Arguments">--force run --target clean</value>
|
|
||||||
<value type="QString" key="ProjectExplorer.ProcessStep.Command">platformio</value>
|
|
||||||
<value type="QString" key="ProjectExplorer.ProcessStep.WorkingDirectory">%{buildDir}</value>
|
|
||||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Custom Process Step</value>
|
|
||||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
|
||||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.ProcessStep</value>
|
|
||||||
</valuemap>
|
|
||||||
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
|
|
||||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value>
|
|
||||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
|
||||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
|
|
||||||
</valuemap>
|
|
||||||
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
|
|
||||||
<value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
|
|
||||||
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
|
|
||||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Release</value>
|
|
||||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
|
||||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value>
|
|
||||||
<value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">0</value>
|
|
||||||
<value type="bool" key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild">true</value>
|
|
||||||
</valuemap>
|
|
||||||
<value type="int" key="ProjectExplorer.Target.BuildConfigurationCount">2</value>
|
|
||||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.DeployConfiguration.0">
|
|
||||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
|
||||||
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">0</value>
|
|
||||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Deploy</value>
|
|
||||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
|
||||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Deploy</value>
|
|
||||||
</valuemap>
|
|
||||||
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">1</value>
|
|
||||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Deploy locally</value>
|
|
||||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
|
||||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.DefaultDeployConfiguration</value>
|
|
||||||
</valuemap>
|
|
||||||
<value type="int" key="ProjectExplorer.Target.DeployConfigurationCount">1</value>
|
|
||||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.PluginSettings"/>
|
|
||||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.RunConfiguration.0">
|
|
||||||
<valuelist type="QVariantList" key="Analyzer.Valgrind.AddedSuppressionFiles"/>
|
|
||||||
<value type="bool" key="Analyzer.Valgrind.Callgrind.CollectBusEvents">false</value>
|
|
||||||
<value type="bool" key="Analyzer.Valgrind.Callgrind.CollectSystime">false</value>
|
|
||||||
<value type="bool" key="Analyzer.Valgrind.Callgrind.EnableBranchSim">false</value>
|
|
||||||
<value type="bool" key="Analyzer.Valgrind.Callgrind.EnableCacheSim">false</value>
|
|
||||||
<value type="bool" key="Analyzer.Valgrind.Callgrind.EnableEventToolTips">true</value>
|
|
||||||
<value type="double" key="Analyzer.Valgrind.Callgrind.MinimumCostRatio">0.01</value>
|
|
||||||
<value type="double" key="Analyzer.Valgrind.Callgrind.VisualisationMinimumCostRatio">10</value>
|
|
||||||
<value type="bool" key="Analyzer.Valgrind.FilterExternalIssues">true</value>
|
|
||||||
<value type="int" key="Analyzer.Valgrind.LeakCheckOnFinish">1</value>
|
|
||||||
<value type="int" key="Analyzer.Valgrind.NumCallers">25</value>
|
|
||||||
<valuelist type="QVariantList" key="Analyzer.Valgrind.RemovedSuppressionFiles"/>
|
|
||||||
<value type="int" key="Analyzer.Valgrind.SelfModifyingCodeDetection">1</value>
|
|
||||||
<value type="bool" key="Analyzer.Valgrind.Settings.UseGlobalSettings">true</value>
|
|
||||||
<value type="bool" key="Analyzer.Valgrind.ShowReachable">false</value>
|
|
||||||
<value type="bool" key="Analyzer.Valgrind.TrackOrigins">true</value>
|
|
||||||
<value type="QString" key="Analyzer.Valgrind.ValgrindExecutable">valgrind</value>
|
|
||||||
<valuelist type="QVariantList" key="Analyzer.Valgrind.VisibleErrorKinds">
|
|
||||||
<value type="int">0</value>
|
|
||||||
<value type="int">1</value>
|
|
||||||
<value type="int">2</value>
|
|
||||||
<value type="int">3</value>
|
|
||||||
<value type="int">4</value>
|
|
||||||
<value type="int">5</value>
|
|
||||||
<value type="int">6</value>
|
|
||||||
<value type="int">7</value>
|
|
||||||
<value type="int">8</value>
|
|
||||||
<value type="int">9</value>
|
|
||||||
<value type="int">10</value>
|
|
||||||
<value type="int">11</value>
|
|
||||||
<value type="int">12</value>
|
|
||||||
<value type="int">13</value>
|
|
||||||
<value type="int">14</value>
|
|
||||||
</valuelist>
|
|
||||||
<value type="int" key="PE.EnvironmentAspect.Base">2</value>
|
|
||||||
<valuelist type="QVariantList" key="PE.EnvironmentAspect.Changes"/>
|
|
||||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">platformio</value>
|
|
||||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
|
||||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4RunConfiguration:{{project_dir}}/platformio.pro</value>
|
|
||||||
<value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.CommandLineArguments"></value>
|
|
||||||
<value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.ProFile">platformio.pro</value>
|
|
||||||
<value type="bool" key="Qt4ProjectManager.Qt4RunConfiguration.UseDyldImageSuffix">false</value>
|
|
||||||
<value type="bool" key="Qt4ProjectManager.Qt4RunConfiguration.UseTerminal">false</value>
|
|
||||||
<value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.UserWorkingDirectory"></value>
|
|
||||||
<value type="uint" key="RunConfiguration.QmlDebugServerPort">3768</value>
|
|
||||||
<value type="bool" key="RunConfiguration.UseCppDebugger">false</value>
|
|
||||||
<value type="bool" key="RunConfiguration.UseCppDebuggerAuto">true</value>
|
|
||||||
<value type="bool" key="RunConfiguration.UseMultiProcess">false</value>
|
|
||||||
<value type="bool" key="RunConfiguration.UseQmlDebugger">false</value>
|
|
||||||
<value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">true</value>
|
|
||||||
</valuemap>
|
|
||||||
<value type="int" key="ProjectExplorer.Target.RunConfigurationCount">1</value>
|
|
||||||
</valuemap>
|
|
||||||
</data>
|
|
||||||
<data>
|
|
||||||
<variable>ProjectExplorer.Project.TargetCount</variable>
|
|
||||||
<value type="int">1</value>
|
|
||||||
</data>
|
|
||||||
<data>
|
|
||||||
<variable>ProjectExplorer.Project.Updater.FileVersion</variable>
|
|
||||||
<value type="int">16</value>
|
|
||||||
</data>
|
|
||||||
<data>
|
|
||||||
<variable>Version</variable>
|
|
||||||
<value type="int">16</value>
|
|
||||||
</data>
|
|
||||||
</qtcreator>
|
|
@ -3,27 +3,27 @@
|
|||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Filter Include="Source Files">
|
<Filter Include="Source Files">
|
||||||
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
|
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
|
||||||
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
|
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx;ino;pde</Extensions>
|
||||||
</Filter>
|
</Filter>
|
||||||
<Filter Include="Header Files">
|
<Filter Include="Header Files">
|
||||||
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
|
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
|
||||||
<Extensions>h;hh;hpp;hxx;hm;inl;inc;xsd</Extensions>
|
<Extensions>h;hh;hpp;hxx;hm;inl;inc;xsd</Extensions>
|
||||||
</Filter>
|
</Filter>
|
||||||
<Filter Include="Resource Files">
|
|
||||||
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
|
|
||||||
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
|
|
||||||
</Filter>
|
|
||||||
<Filter Include="Source Files\src">
|
|
||||||
<UniqueIdentifier>{cad450ef-1a84-42d4-a5b5-a1736b8833d3}</UniqueIdentifier>
|
|
||||||
</Filter>
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<Text Include="readme.txt" />
|
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<None Include="platformio.ini" />
|
<None Include="platformio.ini" />
|
||||||
<None Include="src\blink.pde">
|
|
||||||
<Filter>Source Files\src</Filter>
|
|
||||||
</None>
|
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
% for file in srcfiles:
|
||||||
|
<ItemGroup>
|
||||||
|
% if any([file.endswith(".%s" % e) for e in ("h", "hh", "hpp", "inc")]):
|
||||||
|
<ClInclude Include="{{file}}">
|
||||||
|
<Filter>Header Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
% else:
|
||||||
|
<ClCompile Include="{{file}}">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
%end
|
||||||
|
</ItemGroup>
|
||||||
|
% end
|
||||||
</Project>
|
</Project>
|
||||||
|
@ -39,26 +39,33 @@
|
|||||||
<NMakeBuildCommandLine>platformio --force run</NMakeBuildCommandLine>
|
<NMakeBuildCommandLine>platformio --force run</NMakeBuildCommandLine>
|
||||||
<NMakeCleanCommandLine>platformio --force run --target clean</NMakeCleanCommandLine>
|
<NMakeCleanCommandLine>platformio --force run --target clean</NMakeCleanCommandLine>
|
||||||
<NMakePreprocessorDefinitions>{{";".join(defines)}}</NMakePreprocessorDefinitions>
|
<NMakePreprocessorDefinitions>{{";".join(defines)}}</NMakePreprocessorDefinitions>
|
||||||
<NMakeIncludeSearchPath>{{";".join(includes)}}</NMakeIncludeSearchPath>
|
<NMakeIncludeSearchPath>{{";".join(["$(HOMEDRIVE)$(HOMEPATH)%s" % i.replace(user_home_dir, "") if i.startswith(user_home_dir) else i for i in includes])}}</NMakeIncludeSearchPath>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||||
<NMakeBuildCommandLine>platformio run</NMakeBuildCommandLine>
|
<NMakeBuildCommandLine>platformio run</NMakeBuildCommandLine>
|
||||||
<NMakeCleanCommandLine>platformio run --target clean</NMakeCleanCommandLine>
|
<NMakeCleanCommandLine>platformio run --target clean</NMakeCleanCommandLine>
|
||||||
<NMakePreprocessorDefinitions>{";".join(defines)}}</NMakePreprocessorDefinitions>
|
<NMakePreprocessorDefinitions>{";".join(defines)}}</NMakePreprocessorDefinitions>
|
||||||
<NMakeIncludeSearchPath>{{";".join(includes)}}</NMakeIncludeSearchPath>
|
<NMakeIncludeSearchPath>{{";".join(["$(HOMEDRIVE)$(HOMEPATH)%s" % i.replace(user_home_dir, "") if i.startswith(user_home_dir) else i for i in includes])}}</NMakeIncludeSearchPath>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemDefinitionGroup>
|
<ItemDefinitionGroup>
|
||||||
</ItemDefinitionGroup>
|
</ItemDefinitionGroup>
|
||||||
<ItemGroup>
|
|
||||||
<Text Include="readme.txt" />
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<None Include="platformio.ini" />
|
|
||||||
% for file in srcfiles:
|
|
||||||
<None Include="{{file}}" />
|
|
||||||
% end
|
|
||||||
</ItemGroup>
|
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||||
<ImportGroup Label="ExtensionTargets">
|
<ImportGroup Label="ExtensionTargets">
|
||||||
</ImportGroup>
|
</ImportGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<None Include="platformio.ini" />
|
||||||
|
</ItemGroup>
|
||||||
|
% for file in srcfiles:
|
||||||
|
<ItemGroup>
|
||||||
|
% if any([file.endswith(".%s" % e) for e in ("h", "hh", "hpp", "inc")]):
|
||||||
|
<ClInclude Include="{{file}}">
|
||||||
|
<Filter>Header Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
% else:
|
||||||
|
<ClCompile Include="{{file}}">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
%end
|
||||||
|
</ItemGroup>
|
||||||
|
% end
|
||||||
</Project>
|
</Project>
|
||||||
|
@ -86,7 +86,7 @@ class Upgrader(object):
|
|||||||
def _upgrade_to_0_9_0(self, ctx): # pylint: disable=R0201
|
def _upgrade_to_0_9_0(self, ctx): # pylint: disable=R0201
|
||||||
prev_platforms = []
|
prev_platforms = []
|
||||||
|
|
||||||
# remove platform's folder (obsoleted package structure)
|
# remove platform's folder (obsolete package structure)
|
||||||
for name in PlatformFactory.get_platforms().keys():
|
for name in PlatformFactory.get_platforms().keys():
|
||||||
pdir = join(get_home_dir(), name)
|
pdir = join(get_home_dir(), name)
|
||||||
if not isdir(pdir):
|
if not isdir(pdir):
|
||||||
|
9
setup.py
9
setup.py
@ -50,7 +50,10 @@ setup(
|
|||||||
"Topic :: Software Development :: Build Tools",
|
"Topic :: Software Development :: Build Tools",
|
||||||
"Topic :: Software Development :: Compilers"
|
"Topic :: Software Development :: Compilers"
|
||||||
],
|
],
|
||||||
keywords=("builder library manager atmel avr sam espressif esp freescale "
|
keywords=(
|
||||||
"kinetis nordic nrf51 nxp lpc silicon labs efm32 st stm32 ti "
|
"builder library manager embedded development ide continuous "
|
||||||
"msp430 tiva teensy arduino mbed libopencm3")
|
"integration atmel avr sam espressif esp freescale kinetis nordic "
|
||||||
|
"nrf51 nxp lpc silicon labs efm32 st stm32 ti msp430 tiva teensy "
|
||||||
|
"arduino mbed libopencm3"
|
||||||
|
)
|
||||||
)
|
)
|
||||||
|
Reference in New Issue
Block a user