mirror of
https://github.com/platformio/platformio-core.git
synced 2025-12-23 23:28:06 +01:00
Compare commits
44 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ec6af9a460 | ||
|
|
e1c9cb2c00 | ||
|
|
2c0d26e06d | ||
|
|
3c36eafdfa | ||
|
|
e22ab787dd | ||
|
|
948b75aeda | ||
|
|
4dcef89301 | ||
|
|
12b29a760a | ||
|
|
43ca0e149f | ||
|
|
ad1666dd0a | ||
|
|
1b4d4f5695 | ||
|
|
a714e6084a | ||
|
|
a8dd5d85a5 | ||
|
|
83363c7077 | ||
|
|
d99a57365f | ||
|
|
3cb41cf6b0 | ||
|
|
5201626d6a | ||
|
|
f812e74324 | ||
|
|
0668d6d290 | ||
|
|
46d1c2c86c | ||
|
|
ee7fe1fc10 | ||
|
|
c997495b5d | ||
|
|
605b5755bf | ||
|
|
b60c761cce | ||
|
|
12d6df6962 | ||
|
|
34972c77f5 | ||
|
|
2c5db64677 | ||
|
|
fa33d53180 | ||
|
|
57b877f445 | ||
|
|
dcb6d8286b | ||
|
|
3a8c515e21 | ||
|
|
50984f1475 | ||
|
|
4338bade5b | ||
|
|
ed10ecd142 | ||
|
|
6815297b0c | ||
|
|
c72bf9ea31 | ||
|
|
d4f4d9c789 | ||
|
|
61ef27c345 | ||
|
|
9c73e59772 | ||
|
|
0405ba3f31 | ||
|
|
f5f97fe0fd | ||
|
|
82a8bd01fc | ||
|
|
b15408e693 | ||
|
|
ed5f035d1c |
28
HISTORY.rst
28
HISTORY.rst
@@ -4,6 +4,34 @@ Release History
|
||||
PlatformIO 2.0
|
||||
--------------
|
||||
|
||||
2.3.3 (2015-10-02)
|
||||
~~~~~~~~~~~~~~~~~~
|
||||
|
||||
* Added support for LightBlue Bean board
|
||||
(`pull #292 <https://github.com/platformio/platformio/pull/292>`_)
|
||||
* Added support for ST Nucleo F446RE board
|
||||
(`pull #293 <https://github.com/platformio/platformio/pull/293>`_)
|
||||
* Fixed broken lock file for "appstate" storage
|
||||
(`issue #288 <https://github.com/platformio/platformio/issues/288>`_)
|
||||
* Fixed ESP8266 compile errors about RAM size when adding 1 library
|
||||
(`issue #296 <https://github.com/platformio/platformio/issues/296>`_)
|
||||
|
||||
2.3.2 (2015-09-10)
|
||||
~~~~~~~~~~~~~~~~~~
|
||||
|
||||
* Allowed to use ST-Link uploader for mbed-based projects
|
||||
* Explained how to use ``lib`` directory from the PlatformIO based project in
|
||||
``readme.txt`` which will be automatically generated using
|
||||
`platformio init <http://docs.platformio.org/en/latest/userguide/cmd_init.html>`__
|
||||
command
|
||||
(`issue #273 <https://github.com/platformio/platformio/issues/273>`_)
|
||||
* Found solution for "pip/scons error: option --single-version-externally-managed not
|
||||
recognized" when install PlatformIO using ``pip`` package manager
|
||||
(`issue #279 <https://github.com/platformio/platformio/issues/279>`_)
|
||||
* Fixed firmware uploading to Arduino Leonardo board using Mac OS
|
||||
(`issue #287 <https://github.com/platformio/platformio/issues/287>`_)
|
||||
* Fixed `SConsNotInstalled` error for Linux Debian-based distributives
|
||||
|
||||
2.3.1 (2015-09-06)
|
||||
~~~~~~~~~~~~~~~~~~
|
||||
|
||||
|
||||
54
docs/faq.rst
54
docs/faq.rst
@@ -60,6 +60,35 @@ the project developed using PlatformIO is as follows:
|
||||
Troubleshooting
|
||||
---------------
|
||||
|
||||
Installation
|
||||
~~~~~~~~~~~~
|
||||
|
||||
PlatformIO and ``scons`` aren't installed properly
|
||||
''''''''''''''''''''''''''''''''''''''''''''''''''
|
||||
|
||||
Try these solutions:
|
||||
|
||||
1. Upgrade SCons via `pip <https://pip.pypa.io>`_
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
[sudo] pip uninstall scons
|
||||
[sudo] pip install scons
|
||||
|
||||
2. Install PlatformIO using :ref:`installation_installer_script`.
|
||||
|
||||
.. _faq_troubleshooting_sconssingverextmanaged:
|
||||
|
||||
PIP & SCons Error: option --single-version-externally-managed not recognized
|
||||
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
|
||||
|
||||
Answered in `issue #279 <https://github.com/platformio/platformio/issues/279>`_.
|
||||
|
||||
[Errno 1] Operation not permitted
|
||||
'''''''''''''''''''''''''''''''''
|
||||
|
||||
Answered in `issue #295 <https://github.com/platformio/platformio/issues/295#issuecomment-143772005>`_.
|
||||
|
||||
.. _faq_troubleshooting_pioblocksprompt:
|
||||
|
||||
PlatformIO blocks command execution using user prompt
|
||||
@@ -100,8 +129,8 @@ should contain ``/usr/local/bin`` directory.
|
||||
programs to the ``bin`` directory which is included in ``$PATH``. For example,
|
||||
see `issue #272 <https://github.com/platformio/platformio/issues/272#issuecomment-133626112>`_.
|
||||
|
||||
Windows: ``UnicodeDecodeError: 'ascii' codec can't decode byte``
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
Windows UnicodeDecodeError: 'ascii' codec can't decode byte
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Answered in `issue #143 <https://github.com/platformio/platformio/issues/143#issuecomment-88060906>`_.
|
||||
|
||||
@@ -118,20 +147,25 @@ Please upgrade *SetupTools* package:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
$ [sudo] pip uninstall setuptools
|
||||
$ [sudo] pip install setuptools
|
||||
[sudo] pip uninstall setuptools
|
||||
[sudo] pip install setuptools
|
||||
|
||||
# Then re-install PlatformIO
|
||||
$ [sudo] pip uninstall platformio
|
||||
$ [sudo] pip install platformio
|
||||
[sudo] pip uninstall platformio
|
||||
[sudo] pip install platformio
|
||||
|
||||
Windows: ``AttributeError: 'module' object has no attribute 'packages'``
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
Windows AttributeError: 'module' object has no attribute 'packages'
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Answered in `issue #252 <https://github.com/platformio/platformio/issues/252#issuecomment-127072039>`_.
|
||||
|
||||
ARM toolchain: ``cc1plus: error while loading shared libraries``
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
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>`_.
|
||||
|
||||
Archlinux: libncurses.so.5: cannot open shared object file
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Answered in `issue #291 <https://github.com/platformio/platformio/issues/291>`_.
|
||||
|
||||
@@ -630,6 +630,26 @@ PanStamp
|
||||
- 32 Kb
|
||||
- 4 Kb
|
||||
|
||||
Punch Through
|
||||
~~~~~~~~~~~~~
|
||||
|
||||
.. list-table::
|
||||
:header-rows: 1
|
||||
|
||||
* - Type ``board``
|
||||
- Name
|
||||
- Microcontroller
|
||||
- Frequency
|
||||
- Flash
|
||||
- RAM
|
||||
|
||||
* - ``lightblue-bean``
|
||||
- `LightBlue Bean <https://punchthrough.com/bean>`_
|
||||
- ATMEGA328P
|
||||
- 8 MHz
|
||||
- 32 Kb
|
||||
- 2 Kb
|
||||
|
||||
Quirkbot
|
||||
~~~~~~~~
|
||||
|
||||
|
||||
@@ -469,6 +469,13 @@ ST
|
||||
- 512 Kb
|
||||
- 128 Kb
|
||||
|
||||
* - ``nucleo_f446re``
|
||||
- `ST Nucleo F446RE <https://developer.mbed.org/platforms/ST-Nucleo-F446RE/>`_
|
||||
- STM32F446RET6
|
||||
- 180 MHz
|
||||
- 512 Kb
|
||||
- 128 Kb
|
||||
|
||||
* - ``nucleo_l053r8``
|
||||
- `ST Nucleo L053R8 <https://developer.mbed.org/platforms/ST-Nucleo-L053R8/>`_
|
||||
- STM32L053R8T6
|
||||
|
||||
@@ -49,9 +49,12 @@ The latest stable version of PlatformIO may be done via
|
||||
# update dependent packages to the latest versions
|
||||
pip install -U pip setuptools
|
||||
|
||||
# install the latest version of PlatformIO
|
||||
# install/upgrade the latest version of PlatformIO
|
||||
pip install -U platformio
|
||||
|
||||
.. warning::
|
||||
Known Issue: :ref:`faq_troubleshooting_sconssingverextmanaged`
|
||||
|
||||
Note that you may run into permissions issues running these commands. You have
|
||||
a few options here:
|
||||
|
||||
@@ -61,6 +64,8 @@ a few options here:
|
||||
* Run the command in a `virtualenv <https://virtualenv.pypa.io>`_ local to a
|
||||
specific project working set.
|
||||
|
||||
.. _installation_installer_script:
|
||||
|
||||
Installer Script
|
||||
~~~~~~~~~~~~~~~~
|
||||
|
||||
@@ -134,9 +139,6 @@ For upgrading ``platformio`` to the latest version:
|
||||
Development Version
|
||||
~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
.. warning::
|
||||
We don't recommend to use ``develop`` version in production.
|
||||
|
||||
Install the latest PlatformIO from the ``develop`` branch:
|
||||
|
||||
.. code-block:: bash
|
||||
@@ -163,4 +165,5 @@ Troubleshooting
|
||||
**Windows OS**: Please check that you have correctly installed USB driver
|
||||
from board manufacturer
|
||||
|
||||
For further details, frequently questions, please refer to :ref:`faq`.
|
||||
For further details, frequently questions, known issues, please
|
||||
refer to :ref:`faq`.
|
||||
|
||||
@@ -601,6 +601,26 @@ PanStamp
|
||||
- 32 Kb
|
||||
- 2 Kb
|
||||
|
||||
Punch Through
|
||||
~~~~~~~~~~~~~
|
||||
|
||||
.. list-table::
|
||||
:header-rows: 1
|
||||
|
||||
* - Type ``board``
|
||||
- Name
|
||||
- Microcontroller
|
||||
- Frequency
|
||||
- Flash
|
||||
- RAM
|
||||
|
||||
* - ``lightblue-bean``
|
||||
- `LightBlue Bean <https://punchthrough.com/bean>`_
|
||||
- ATMEGA328P
|
||||
- 8 MHz
|
||||
- 32 Kb
|
||||
- 2 Kb
|
||||
|
||||
Quirkbot
|
||||
~~~~~~~~
|
||||
|
||||
|
||||
@@ -256,6 +256,13 @@ ST
|
||||
- 512 Kb
|
||||
- 128 Kb
|
||||
|
||||
* - ``nucleo_f446re``
|
||||
- `ST Nucleo F446RE <https://developer.mbed.org/platforms/ST-Nucleo-F446RE/>`_
|
||||
- STM32F446RET6
|
||||
- 180 MHz
|
||||
- 512 Kb
|
||||
- 128 Kb
|
||||
|
||||
* - ``nucleo_l053r8``
|
||||
- `ST Nucleo L053R8 <https://developer.mbed.org/platforms/ST-Nucleo-L053R8/>`_
|
||||
- STM32L053R8T6
|
||||
|
||||
@@ -475,39 +475,7 @@ Examples
|
||||
targets = upload
|
||||
|
||||
|
||||
2. :ref:`platform_atmelavr`: Microduino Core (ATmega168P, 3.3V) board with
|
||||
auto pre-configured ``board_*`` and ``upload_*`` options (use only
|
||||
``board`` option) and Arduino Wiring-based Framework
|
||||
|
||||
.. code-block:: ini
|
||||
|
||||
[env:atmelavr_microduino_core_board]
|
||||
platform = atmelavr
|
||||
framework = arduino
|
||||
board = 168pa8m
|
||||
|
||||
# enable auto-uploading
|
||||
targets = upload
|
||||
|
||||
|
||||
3. :ref:`platform_atmelavr`: Raspduino board with
|
||||
auto pre-configured ``board_*`` and ``upload_*`` options (use only
|
||||
``board`` option) and Arduino Wiring-based Framework
|
||||
|
||||
.. code-block:: ini
|
||||
|
||||
[env:atmelavr_raspduino_board]
|
||||
platform = atmelavr
|
||||
framework = arduino
|
||||
board = raspduino
|
||||
|
||||
upload_port = /dev/ttyS0
|
||||
|
||||
# enable auto-uploading
|
||||
targets = upload
|
||||
|
||||
|
||||
4. :ref:`platform_atmelavr`: Embedded board that is based on ATmega168 MCU with
|
||||
2. :ref:`platform_atmelavr`: Embedded board that is based on ATmega168 MCU with
|
||||
"arduino" bootloader
|
||||
|
||||
.. code-block:: ini
|
||||
@@ -527,7 +495,7 @@ Examples
|
||||
targets = upload
|
||||
|
||||
|
||||
5. Upload firmware via USB programmer (USBasp) to :ref:`platform_atmelavr`
|
||||
3. Upload firmware via USB programmer (USBasp) to :ref:`platform_atmelavr`
|
||||
microcontrollers
|
||||
|
||||
.. code-block:: ini
|
||||
@@ -536,44 +504,25 @@ Examples
|
||||
platform = atmelavr
|
||||
framework = arduino
|
||||
board = pro8MHzatmega328
|
||||
upload_protocol = usbasp -B5
|
||||
upload_protocol = usbasp - B5
|
||||
|
||||
|
||||
6. :ref:`platform_timsp430`: TI MSP430G2553 LaunchPad with auto pre-configured
|
||||
``board_*`` and ``upload_*`` options (use only ``board`` option) and Energia
|
||||
Wiring-based Framework
|
||||
4. :ref:`platform_ststm32`: Upload firmware using GDB script ``upload.gdb``,
|
||||
`issue #175 <https://github.com/platformio/platformio/issues/175>`_
|
||||
|
||||
.. code-block:: ini
|
||||
|
||||
[env:timsp430_g2553_launchpad]
|
||||
platform = timsp430
|
||||
framework = energia
|
||||
board = lpmsp430g2553
|
||||
[env:st_via_gdb]
|
||||
platform = ststm32
|
||||
board = armstrap_eagle512
|
||||
upload_protocol = gdb
|
||||
|
||||
|
||||
7. :ref:`platform_timsp430`: Embedded board that is based on MSP430G2553 MCU
|
||||
5. :ref:`platform_ststm32`: Upload firmware using ST-Link instead mbed's media
|
||||
disk
|
||||
|
||||
.. code-block:: ini
|
||||
|
||||
[env:timsp430_g2553_board]
|
||||
platform = timsp430
|
||||
board_mcu = msp430g2553
|
||||
board_f_cpu = 16000000L
|
||||
|
||||
upload_protocol = rf2500
|
||||
|
||||
# enable auto-uploading
|
||||
targets = upload
|
||||
|
||||
|
||||
8. :ref:`platform_titiva`: TI Tiva C ARM Series TM4C123G LaunchPad with auto
|
||||
pre-configured ``board_*`` and ``upload_*`` options (use only ``board``
|
||||
option) and Energia Wiring-based Framework
|
||||
|
||||
.. code-block:: ini
|
||||
|
||||
[env:titiva_tm4c1230c3pm_launchpad]
|
||||
platform = titiva
|
||||
framework = energia
|
||||
board = lptm4c1230c3pm
|
||||
|
||||
[env:stlink_for_mbed]
|
||||
platform = ststm32
|
||||
board = disco_f100rb
|
||||
upload_protocol = stlink
|
||||
|
||||
38
examples/atmelavr-and-arduino/adafruit-blink/lib/readme.txt
Normal file
38
examples/atmelavr-and-arduino/adafruit-blink/lib/readme.txt
Normal file
@@ -0,0 +1,38 @@
|
||||
|
||||
This directory is intended for the project specific (private) libraries.
|
||||
PlatformIO will compile them to static libraries and link to executable file.
|
||||
|
||||
The source code of each library should be placed in separate directory, like
|
||||
"lib/private_lib/[here are source files]".
|
||||
|
||||
For example, see how can be organised `Foo` and `Bar` libraries:
|
||||
|
||||
|--lib
|
||||
| |--Bar
|
||||
| | |--docs
|
||||
| | |--examples
|
||||
| | |--src
|
||||
| | |- Bar.c
|
||||
| | |- Bar.h
|
||||
| |--Foo
|
||||
| | |- Foo.c
|
||||
| | |- Foo.h
|
||||
| |- readme.txt --> THIS FILE
|
||||
|- platformio.ini
|
||||
|--src
|
||||
|- main.c
|
||||
|
||||
Then in `src/main.c` you should use:
|
||||
|
||||
#include <Foo.h>
|
||||
#include <Bar.h>
|
||||
|
||||
// rest H/C/CPP code
|
||||
|
||||
PlatformIO will find your libraries automatically, configure preprocessor's
|
||||
include paths and build them.
|
||||
|
||||
See additional options for PlatformIO Library Dependency Finder `lib_*`:
|
||||
|
||||
http://docs.platformio.org/en/latest/projectconf.html#lib-install
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
|
||||
This directory is intended for the project specific (private) libraries.
|
||||
PlatformIO will compile them to static libraries and link to executable file.
|
||||
|
||||
The source code of each library should be placed in separate directory, like
|
||||
"lib/private_lib/[here are source files]".
|
||||
|
||||
For example, see how can be organised `Foo` and `Bar` libraries:
|
||||
|
||||
|--lib
|
||||
| |--Bar
|
||||
| | |--docs
|
||||
| | |--examples
|
||||
| | |--src
|
||||
| | |- Bar.c
|
||||
| | |- Bar.h
|
||||
| |--Foo
|
||||
| | |- Foo.c
|
||||
| | |- Foo.h
|
||||
| |- readme.txt --> THIS FILE
|
||||
|- platformio.ini
|
||||
|--src
|
||||
|- main.c
|
||||
|
||||
Then in `src/main.c` you should use:
|
||||
|
||||
#include <Foo.h>
|
||||
#include <Bar.h>
|
||||
|
||||
// rest H/C/CPP code
|
||||
|
||||
PlatformIO will find your libraries automatically, configure preprocessor's
|
||||
include paths and build them.
|
||||
|
||||
See additional options for PlatformIO Library Dependency Finder `lib_*`:
|
||||
|
||||
http://docs.platformio.org/en/latest/projectconf.html#lib-install
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
|
||||
This directory is intended for the project specific (private) libraries.
|
||||
PlatformIO will compile them to static libraries and link to executable file.
|
||||
|
||||
The source code of each library should be placed in separate directory, like
|
||||
"lib/private_lib/[here are source files]".
|
||||
|
||||
For example, see how can be organised `Foo` and `Bar` libraries:
|
||||
|
||||
|--lib
|
||||
| |--Bar
|
||||
| | |--docs
|
||||
| | |--examples
|
||||
| | |--src
|
||||
| | |- Bar.c
|
||||
| | |- Bar.h
|
||||
| |--Foo
|
||||
| | |- Foo.c
|
||||
| | |- Foo.h
|
||||
| |- readme.txt --> THIS FILE
|
||||
|- platformio.ini
|
||||
|--src
|
||||
|- main.c
|
||||
|
||||
Then in `src/main.c` you should use:
|
||||
|
||||
#include <Foo.h>
|
||||
#include <Bar.h>
|
||||
|
||||
// rest H/C/CPP code
|
||||
|
||||
PlatformIO will find your libraries automatically, configure preprocessor's
|
||||
include paths and build them.
|
||||
|
||||
See additional options for PlatformIO Library Dependency Finder `lib_*`:
|
||||
|
||||
http://docs.platformio.org/en/latest/projectconf.html#lib-install
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
|
||||
This directory is intended for the project specific (private) libraries.
|
||||
PlatformIO will compile them to static libraries and link to executable file.
|
||||
|
||||
The source code of each library should be placed in separate directory, like
|
||||
"lib/private_lib/[here are source files]".
|
||||
|
||||
For example, see how can be organised `Foo` and `Bar` libraries:
|
||||
|
||||
|--lib
|
||||
| |--Bar
|
||||
| | |--docs
|
||||
| | |--examples
|
||||
| | |--src
|
||||
| | |- Bar.c
|
||||
| | |- Bar.h
|
||||
| |--Foo
|
||||
| | |- Foo.c
|
||||
| | |- Foo.h
|
||||
| |- readme.txt --> THIS FILE
|
||||
|- platformio.ini
|
||||
|--src
|
||||
|- main.c
|
||||
|
||||
Then in `src/main.c` you should use:
|
||||
|
||||
#include <Foo.h>
|
||||
#include <Bar.h>
|
||||
|
||||
// rest H/C/CPP code
|
||||
|
||||
PlatformIO will find your libraries automatically, configure preprocessor's
|
||||
include paths and build them.
|
||||
|
||||
See additional options for PlatformIO Library Dependency Finder `lib_*`:
|
||||
|
||||
http://docs.platformio.org/en/latest/projectconf.html#lib-install
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
|
||||
This directory is intended for the project specific (private) libraries.
|
||||
PlatformIO will compile them to static libraries and link to executable file.
|
||||
|
||||
The source code of each library should be placed in separate directory, like
|
||||
"lib/private_lib/[here are source files]".
|
||||
|
||||
For example, see how can be organised `Foo` and `Bar` libraries:
|
||||
|
||||
|--lib
|
||||
| |--Bar
|
||||
| | |--docs
|
||||
| | |--examples
|
||||
| | |--src
|
||||
| | |- Bar.c
|
||||
| | |- Bar.h
|
||||
| |--Foo
|
||||
| | |- Foo.c
|
||||
| | |- Foo.h
|
||||
| |- readme.txt --> THIS FILE
|
||||
|- platformio.ini
|
||||
|--src
|
||||
|- main.c
|
||||
|
||||
Then in `src/main.c` you should use:
|
||||
|
||||
#include <Foo.h>
|
||||
#include <Bar.h>
|
||||
|
||||
// rest H/C/CPP code
|
||||
|
||||
PlatformIO will find your libraries automatically, configure preprocessor's
|
||||
include paths and build them.
|
||||
|
||||
See additional options for PlatformIO Library Dependency Finder `lib_*`:
|
||||
|
||||
http://docs.platformio.org/en/latest/projectconf.html#lib-install
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
|
||||
This directory is intended for the project specific (private) libraries.
|
||||
PlatformIO will compile them to static libraries and link to executable file.
|
||||
|
||||
The source code of each library should be placed in separate directory, like
|
||||
"lib/private_lib/[here are source files]".
|
||||
|
||||
For example, see how can be organised `Foo` and `Bar` libraries:
|
||||
|
||||
|--lib
|
||||
| |--Bar
|
||||
| | |--docs
|
||||
| | |--examples
|
||||
| | |--src
|
||||
| | |- Bar.c
|
||||
| | |- Bar.h
|
||||
| |--Foo
|
||||
| | |- Foo.c
|
||||
| | |- Foo.h
|
||||
| |- readme.txt --> THIS FILE
|
||||
|- platformio.ini
|
||||
|--src
|
||||
|- main.c
|
||||
|
||||
Then in `src/main.c` you should use:
|
||||
|
||||
#include <Foo.h>
|
||||
#include <Bar.h>
|
||||
|
||||
// rest H/C/CPP code
|
||||
|
||||
PlatformIO will find your libraries automatically, configure preprocessor's
|
||||
include paths and build them.
|
||||
|
||||
See additional options for PlatformIO Library Dependency Finder `lib_*`:
|
||||
|
||||
http://docs.platformio.org/en/latest/projectconf.html#lib-install
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
|
||||
This directory is intended for the project specific (private) libraries.
|
||||
PlatformIO will compile them to static libraries and link to executable file.
|
||||
|
||||
The source code of each library should be placed in separate directory, like
|
||||
"lib/private_lib/[here are source files]".
|
||||
|
||||
For example, see how can be organised `Foo` and `Bar` libraries:
|
||||
|
||||
|--lib
|
||||
| |--Bar
|
||||
| | |--docs
|
||||
| | |--examples
|
||||
| | |--src
|
||||
| | |- Bar.c
|
||||
| | |- Bar.h
|
||||
| |--Foo
|
||||
| | |- Foo.c
|
||||
| | |- Foo.h
|
||||
| |- readme.txt --> THIS FILE
|
||||
|- platformio.ini
|
||||
|--src
|
||||
|- main.c
|
||||
|
||||
Then in `src/main.c` you should use:
|
||||
|
||||
#include <Foo.h>
|
||||
#include <Bar.h>
|
||||
|
||||
// rest H/C/CPP code
|
||||
|
||||
PlatformIO will find your libraries automatically, configure preprocessor's
|
||||
include paths and build them.
|
||||
|
||||
See additional options for PlatformIO Library Dependency Finder `lib_*`:
|
||||
|
||||
http://docs.platformio.org/en/latest/projectconf.html#lib-install
|
||||
|
||||
38
examples/atmelavr-and-arduino/panstamp-blink/lib/readme.txt
Normal file
38
examples/atmelavr-and-arduino/panstamp-blink/lib/readme.txt
Normal file
@@ -0,0 +1,38 @@
|
||||
|
||||
This directory is intended for the project specific (private) libraries.
|
||||
PlatformIO will compile them to static libraries and link to executable file.
|
||||
|
||||
The source code of each library should be placed in separate directory, like
|
||||
"lib/private_lib/[here are source files]".
|
||||
|
||||
For example, see how can be organised `Foo` and `Bar` libraries:
|
||||
|
||||
|--lib
|
||||
| |--Bar
|
||||
| | |--docs
|
||||
| | |--examples
|
||||
| | |--src
|
||||
| | |- Bar.c
|
||||
| | |- Bar.h
|
||||
| |--Foo
|
||||
| | |- Foo.c
|
||||
| | |- Foo.h
|
||||
| |- readme.txt --> THIS FILE
|
||||
|- platformio.ini
|
||||
|--src
|
||||
|- main.c
|
||||
|
||||
Then in `src/main.c` you should use:
|
||||
|
||||
#include <Foo.h>
|
||||
#include <Bar.h>
|
||||
|
||||
// rest H/C/CPP code
|
||||
|
||||
PlatformIO will find your libraries automatically, configure preprocessor's
|
||||
include paths and build them.
|
||||
|
||||
See additional options for PlatformIO Library Dependency Finder `lib_*`:
|
||||
|
||||
http://docs.platformio.org/en/latest/projectconf.html#lib-install
|
||||
|
||||
38
examples/desktop/hello-world/lib/readme.txt
Normal file
38
examples/desktop/hello-world/lib/readme.txt
Normal file
@@ -0,0 +1,38 @@
|
||||
|
||||
This directory is intended for the project specific (private) libraries.
|
||||
PlatformIO will compile them to static libraries and link to executable file.
|
||||
|
||||
The source code of each library should be placed in separate directory, like
|
||||
"lib/private_lib/[here are source files]".
|
||||
|
||||
For example, see how can be organised `Foo` and `Bar` libraries:
|
||||
|
||||
|--lib
|
||||
| |--Bar
|
||||
| | |--docs
|
||||
| | |--examples
|
||||
| | |--src
|
||||
| | |- Bar.c
|
||||
| | |- Bar.h
|
||||
| |--Foo
|
||||
| | |- Foo.c
|
||||
| | |- Foo.h
|
||||
| |- readme.txt --> THIS FILE
|
||||
|- platformio.ini
|
||||
|--src
|
||||
|- main.c
|
||||
|
||||
Then in `src/main.c` you should use:
|
||||
|
||||
#include <Foo.h>
|
||||
#include <Bar.h>
|
||||
|
||||
// rest H/C/CPP code
|
||||
|
||||
PlatformIO will find your libraries automatically, configure preprocessor's
|
||||
include paths and build them.
|
||||
|
||||
See additional options for PlatformIO Library Dependency Finder `lib_*`:
|
||||
|
||||
http://docs.platformio.org/en/latest/projectconf.html#lib-install
|
||||
|
||||
38
examples/espressif/esp8266-native/lib/readme.txt
Normal file
38
examples/espressif/esp8266-native/lib/readme.txt
Normal file
@@ -0,0 +1,38 @@
|
||||
|
||||
This directory is intended for the project specific (private) libraries.
|
||||
PlatformIO will compile them to static libraries and link to executable file.
|
||||
|
||||
The source code of each library should be placed in separate directory, like
|
||||
"lib/private_lib/[here are source files]".
|
||||
|
||||
For example, see how can be organised `Foo` and `Bar` libraries:
|
||||
|
||||
|--lib
|
||||
| |--Bar
|
||||
| | |--docs
|
||||
| | |--examples
|
||||
| | |--src
|
||||
| | |- Bar.c
|
||||
| | |- Bar.h
|
||||
| |--Foo
|
||||
| | |- Foo.c
|
||||
| | |- Foo.h
|
||||
| |- readme.txt --> THIS FILE
|
||||
|- platformio.ini
|
||||
|--src
|
||||
|- main.c
|
||||
|
||||
Then in `src/main.c` you should use:
|
||||
|
||||
#include <Foo.h>
|
||||
#include <Bar.h>
|
||||
|
||||
// rest H/C/CPP code
|
||||
|
||||
PlatformIO will find your libraries automatically, configure preprocessor's
|
||||
include paths and build them.
|
||||
|
||||
See additional options for PlatformIO Library Dependency Finder `lib_*`:
|
||||
|
||||
http://docs.platformio.org/en/latest/projectconf.html#lib-install
|
||||
|
||||
38
examples/espressif/esp8266-webserver/lib/readme.txt
Normal file
38
examples/espressif/esp8266-webserver/lib/readme.txt
Normal file
@@ -0,0 +1,38 @@
|
||||
|
||||
This directory is intended for the project specific (private) libraries.
|
||||
PlatformIO will compile them to static libraries and link to executable file.
|
||||
|
||||
The source code of each library should be placed in separate directory, like
|
||||
"lib/private_lib/[here are source files]".
|
||||
|
||||
For example, see how can be organised `Foo` and `Bar` libraries:
|
||||
|
||||
|--lib
|
||||
| |--Bar
|
||||
| | |--docs
|
||||
| | |--examples
|
||||
| | |--src
|
||||
| | |- Bar.c
|
||||
| | |- Bar.h
|
||||
| |--Foo
|
||||
| | |- Foo.c
|
||||
| | |- Foo.h
|
||||
| |- readme.txt --> THIS FILE
|
||||
|- platformio.ini
|
||||
|--src
|
||||
|- main.c
|
||||
|
||||
Then in `src/main.c` you should use:
|
||||
|
||||
#include <Foo.h>
|
||||
#include <Bar.h>
|
||||
|
||||
// rest H/C/CPP code
|
||||
|
||||
PlatformIO will find your libraries automatically, configure preprocessor's
|
||||
include paths and build them.
|
||||
|
||||
See additional options for PlatformIO Library Dependency Finder `lib_*`:
|
||||
|
||||
http://docs.platformio.org/en/latest/projectconf.html#lib-install
|
||||
|
||||
38
examples/espressif/esp8266-wifiscan/lib/readme.txt
Normal file
38
examples/espressif/esp8266-wifiscan/lib/readme.txt
Normal file
@@ -0,0 +1,38 @@
|
||||
|
||||
This directory is intended for the project specific (private) libraries.
|
||||
PlatformIO will compile them to static libraries and link to executable file.
|
||||
|
||||
The source code of each library should be placed in separate directory, like
|
||||
"lib/private_lib/[here are source files]".
|
||||
|
||||
For example, see how can be organised `Foo` and `Bar` libraries:
|
||||
|
||||
|--lib
|
||||
| |--Bar
|
||||
| | |--docs
|
||||
| | |--examples
|
||||
| | |--src
|
||||
| | |- Bar.c
|
||||
| | |- Bar.h
|
||||
| |--Foo
|
||||
| | |- Foo.c
|
||||
| | |- Foo.h
|
||||
| |- readme.txt --> THIS FILE
|
||||
|- platformio.ini
|
||||
|--src
|
||||
|- main.c
|
||||
|
||||
Then in `src/main.c` you should use:
|
||||
|
||||
#include <Foo.h>
|
||||
#include <Bar.h>
|
||||
|
||||
// rest H/C/CPP code
|
||||
|
||||
PlatformIO will find your libraries automatically, configure preprocessor's
|
||||
include paths and build them.
|
||||
|
||||
See additional options for PlatformIO Library Dependency Finder `lib_*`:
|
||||
|
||||
http://docs.platformio.org/en/latest/projectconf.html#lib-install
|
||||
|
||||
@@ -1,8 +1,38 @@
|
||||
|
||||
Documentation: http://docs.platformio.org/en/latest/userguide/cmd_init.html
|
||||
|
||||
This directory is intended for the project specific (private) libraries.
|
||||
PlatformIO will compile them to static libraries and link to executable file.
|
||||
|
||||
The source code of each library should be placed in separate directory.
|
||||
For example, "lib/private_lib/[here are source files]".
|
||||
The source code of each library should be placed in separate directory, like
|
||||
"lib/private_lib/[here are source files]".
|
||||
|
||||
For example, see how can be organised `Foo` and `Bar` libraries:
|
||||
|
||||
|--lib
|
||||
| |--Bar
|
||||
| | |--docs
|
||||
| | |--examples
|
||||
| | |--src
|
||||
| | |- Bar.c
|
||||
| | |- Bar.h
|
||||
| |--Foo
|
||||
| | |- Foo.c
|
||||
| | |- Foo.h
|
||||
| |- readme.txt --> THIS FILE
|
||||
|- platformio.ini
|
||||
|--src
|
||||
|- main.c
|
||||
|
||||
Then in `src/main.c` you should use:
|
||||
|
||||
#include <Foo.h>
|
||||
#include <Bar.h>
|
||||
|
||||
// rest H/C/CPP code
|
||||
|
||||
PlatformIO will find your libraries automatically, configure preprocessor's
|
||||
include paths and build them.
|
||||
|
||||
See additional options for PlatformIO Library Dependency Finder `lib_*`:
|
||||
|
||||
http://docs.platformio.org/en/latest/projectconf.html#lib-install
|
||||
|
||||
|
||||
@@ -1,8 +1,38 @@
|
||||
|
||||
Documentation: http://docs.platformio.org/en/latest/userguide/cmd_init.html
|
||||
|
||||
This directory is intended for the project specific (private) libraries.
|
||||
PlatformIO will compile them to static libraries and link to executable file.
|
||||
|
||||
The source code of each library should be placed in separate directory.
|
||||
For example, "lib/private_lib/[here are source files]".
|
||||
The source code of each library should be placed in separate directory, like
|
||||
"lib/private_lib/[here are source files]".
|
||||
|
||||
For example, see how can be organised `Foo` and `Bar` libraries:
|
||||
|
||||
|--lib
|
||||
| |--Bar
|
||||
| | |--docs
|
||||
| | |--examples
|
||||
| | |--src
|
||||
| | |- Bar.c
|
||||
| | |- Bar.h
|
||||
| |--Foo
|
||||
| | |- Foo.c
|
||||
| | |- Foo.h
|
||||
| |- readme.txt --> THIS FILE
|
||||
|- platformio.ini
|
||||
|--src
|
||||
|- main.c
|
||||
|
||||
Then in `src/main.c` you should use:
|
||||
|
||||
#include <Foo.h>
|
||||
#include <Bar.h>
|
||||
|
||||
// rest H/C/CPP code
|
||||
|
||||
PlatformIO will find your libraries automatically, configure preprocessor's
|
||||
include paths and build them.
|
||||
|
||||
See additional options for PlatformIO Library Dependency Finder `lib_*`:
|
||||
|
||||
http://docs.platformio.org/en/latest/projectconf.html#lib-install
|
||||
|
||||
|
||||
@@ -1,8 +1,38 @@
|
||||
|
||||
Documentation: http://docs.platformio.org/en/latest/userguide/cmd_init.html
|
||||
|
||||
This directory is intended for the project specific (private) libraries.
|
||||
PlatformIO will compile them to static libraries and link to executable file.
|
||||
|
||||
The source code of each library should be placed in separate directory.
|
||||
For example, "lib/private_lib/[here are source files]".
|
||||
The source code of each library should be placed in separate directory, like
|
||||
"lib/private_lib/[here are source files]".
|
||||
|
||||
For example, see how can be organised `Foo` and `Bar` libraries:
|
||||
|
||||
|--lib
|
||||
| |--Bar
|
||||
| | |--docs
|
||||
| | |--examples
|
||||
| | |--src
|
||||
| | |- Bar.c
|
||||
| | |- Bar.h
|
||||
| |--Foo
|
||||
| | |- Foo.c
|
||||
| | |- Foo.h
|
||||
| |- readme.txt --> THIS FILE
|
||||
|- platformio.ini
|
||||
|--src
|
||||
|- main.c
|
||||
|
||||
Then in `src/main.c` you should use:
|
||||
|
||||
#include <Foo.h>
|
||||
#include <Bar.h>
|
||||
|
||||
// rest H/C/CPP code
|
||||
|
||||
PlatformIO will find your libraries automatically, configure preprocessor's
|
||||
include paths and build them.
|
||||
|
||||
See additional options for PlatformIO Library Dependency Finder `lib_*`:
|
||||
|
||||
http://docs.platformio.org/en/latest/projectconf.html#lib-install
|
||||
|
||||
|
||||
@@ -1,8 +1,38 @@
|
||||
|
||||
Documentation: http://docs.platformio.org/en/latest/userguide/cmd_init.html
|
||||
|
||||
This directory is intended for the project specific (private) libraries.
|
||||
PlatformIO will compile them to static libraries and link to executable file.
|
||||
|
||||
The source code of each library should be placed in separate directory.
|
||||
For example, "lib/private_lib/[here are source files]".
|
||||
The source code of each library should be placed in separate directory, like
|
||||
"lib/private_lib/[here are source files]".
|
||||
|
||||
For example, see how can be organised `Foo` and `Bar` libraries:
|
||||
|
||||
|--lib
|
||||
| |--Bar
|
||||
| | |--docs
|
||||
| | |--examples
|
||||
| | |--src
|
||||
| | |- Bar.c
|
||||
| | |- Bar.h
|
||||
| |--Foo
|
||||
| | |- Foo.c
|
||||
| | |- Foo.h
|
||||
| |- readme.txt --> THIS FILE
|
||||
|- platformio.ini
|
||||
|--src
|
||||
|- main.c
|
||||
|
||||
Then in `src/main.c` you should use:
|
||||
|
||||
#include <Foo.h>
|
||||
#include <Bar.h>
|
||||
|
||||
// rest H/C/CPP code
|
||||
|
||||
PlatformIO will find your libraries automatically, configure preprocessor's
|
||||
include paths and build them.
|
||||
|
||||
See additional options for PlatformIO Library Dependency Finder `lib_*`:
|
||||
|
||||
http://docs.platformio.org/en/latest/projectconf.html#lib-install
|
||||
|
||||
|
||||
@@ -1,8 +1,38 @@
|
||||
|
||||
Documentation: http://docs.platformio.org/en/latest/userguide/cmd_init.html
|
||||
|
||||
This directory is intended for the project specific (private) libraries.
|
||||
PlatformIO will compile them to static libraries and link to executable file.
|
||||
|
||||
The source code of each library should be placed in separate directory.
|
||||
For example, "lib/private_lib/[here are source files]".
|
||||
|
||||
This directory is intended for the project specific (private) libraries.
|
||||
PlatformIO will compile them to static libraries and link to executable file.
|
||||
|
||||
The source code of each library should be placed in separate directory, like
|
||||
"lib/private_lib/[here are source files]".
|
||||
|
||||
For example, see how can be organised `Foo` and `Bar` libraries:
|
||||
|
||||
|--lib
|
||||
| |--Bar
|
||||
| | |--docs
|
||||
| | |--examples
|
||||
| | |--src
|
||||
| | |- Bar.c
|
||||
| | |- Bar.h
|
||||
| |--Foo
|
||||
| | |- Foo.c
|
||||
| | |- Foo.h
|
||||
| |- readme.txt --> THIS FILE
|
||||
|- platformio.ini
|
||||
|--src
|
||||
|- main.c
|
||||
|
||||
Then in `src/main.c` you should use:
|
||||
|
||||
#include <Foo.h>
|
||||
#include <Bar.h>
|
||||
|
||||
// rest H/C/CPP code
|
||||
|
||||
PlatformIO will find your libraries automatically, configure preprocessor's
|
||||
include paths and build them.
|
||||
|
||||
See additional options for PlatformIO Library Dependency Finder `lib_*`:
|
||||
|
||||
http://docs.platformio.org/en/latest/projectconf.html#lib-install
|
||||
|
||||
|
||||
38
examples/mbed/mbed-blink/lib/readme.txt
Normal file
38
examples/mbed/mbed-blink/lib/readme.txt
Normal file
@@ -0,0 +1,38 @@
|
||||
|
||||
This directory is intended for the project specific (private) libraries.
|
||||
PlatformIO will compile them to static libraries and link to executable file.
|
||||
|
||||
The source code of each library should be placed in separate directory, like
|
||||
"lib/private_lib/[here are source files]".
|
||||
|
||||
For example, see how can be organised `Foo` and `Bar` libraries:
|
||||
|
||||
|--lib
|
||||
| |--Bar
|
||||
| | |--docs
|
||||
| | |--examples
|
||||
| | |--src
|
||||
| | |- Bar.c
|
||||
| | |- Bar.h
|
||||
| |--Foo
|
||||
| | |- Foo.c
|
||||
| | |- Foo.h
|
||||
| |- readme.txt --> THIS FILE
|
||||
|- platformio.ini
|
||||
|--src
|
||||
|- main.c
|
||||
|
||||
Then in `src/main.c` you should use:
|
||||
|
||||
#include <Foo.h>
|
||||
#include <Bar.h>
|
||||
|
||||
// rest H/C/CPP code
|
||||
|
||||
PlatformIO will find your libraries automatically, configure preprocessor's
|
||||
include paths and build them.
|
||||
|
||||
See additional options for PlatformIO Library Dependency Finder `lib_*`:
|
||||
|
||||
http://docs.platformio.org/en/latest/projectconf.html#lib-install
|
||||
|
||||
38
examples/mbed/mbed-dsp/lib/readme.txt
Normal file
38
examples/mbed/mbed-dsp/lib/readme.txt
Normal file
@@ -0,0 +1,38 @@
|
||||
|
||||
This directory is intended for the project specific (private) libraries.
|
||||
PlatformIO will compile them to static libraries and link to executable file.
|
||||
|
||||
The source code of each library should be placed in separate directory, like
|
||||
"lib/private_lib/[here are source files]".
|
||||
|
||||
For example, see how can be organised `Foo` and `Bar` libraries:
|
||||
|
||||
|--lib
|
||||
| |--Bar
|
||||
| | |--docs
|
||||
| | |--examples
|
||||
| | |--src
|
||||
| | |- Bar.c
|
||||
| | |- Bar.h
|
||||
| |--Foo
|
||||
| | |- Foo.c
|
||||
| | |- Foo.h
|
||||
| |- readme.txt --> THIS FILE
|
||||
|- platformio.ini
|
||||
|--src
|
||||
|- main.c
|
||||
|
||||
Then in `src/main.c` you should use:
|
||||
|
||||
#include <Foo.h>
|
||||
#include <Bar.h>
|
||||
|
||||
// rest H/C/CPP code
|
||||
|
||||
PlatformIO will find your libraries automatically, configure preprocessor's
|
||||
include paths and build them.
|
||||
|
||||
See additional options for PlatformIO Library Dependency Finder `lib_*`:
|
||||
|
||||
http://docs.platformio.org/en/latest/projectconf.html#lib-install
|
||||
|
||||
38
examples/mbed/mbed-http-client/lib/readme.txt
Normal file
38
examples/mbed/mbed-http-client/lib/readme.txt
Normal file
@@ -0,0 +1,38 @@
|
||||
|
||||
This directory is intended for the project specific (private) libraries.
|
||||
PlatformIO will compile them to static libraries and link to executable file.
|
||||
|
||||
The source code of each library should be placed in separate directory, like
|
||||
"lib/private_lib/[here are source files]".
|
||||
|
||||
For example, see how can be organised `Foo` and `Bar` libraries:
|
||||
|
||||
|--lib
|
||||
| |--Bar
|
||||
| | |--docs
|
||||
| | |--examples
|
||||
| | |--src
|
||||
| | |- Bar.c
|
||||
| | |- Bar.h
|
||||
| |--Foo
|
||||
| | |- Foo.c
|
||||
| | |- Foo.h
|
||||
| |- readme.txt --> THIS FILE
|
||||
|- platformio.ini
|
||||
|--src
|
||||
|- main.c
|
||||
|
||||
Then in `src/main.c` you should use:
|
||||
|
||||
#include <Foo.h>
|
||||
#include <Bar.h>
|
||||
|
||||
// rest H/C/CPP code
|
||||
|
||||
PlatformIO will find your libraries automatically, configure preprocessor's
|
||||
include paths and build them.
|
||||
|
||||
See additional options for PlatformIO Library Dependency Finder `lib_*`:
|
||||
|
||||
http://docs.platformio.org/en/latest/projectconf.html#lib-install
|
||||
|
||||
38
examples/mbed/mbed-rtos/lib/readme.txt
Normal file
38
examples/mbed/mbed-rtos/lib/readme.txt
Normal file
@@ -0,0 +1,38 @@
|
||||
|
||||
This directory is intended for the project specific (private) libraries.
|
||||
PlatformIO will compile them to static libraries and link to executable file.
|
||||
|
||||
The source code of each library should be placed in separate directory, like
|
||||
"lib/private_lib/[here are source files]".
|
||||
|
||||
For example, see how can be organised `Foo` and `Bar` libraries:
|
||||
|
||||
|--lib
|
||||
| |--Bar
|
||||
| | |--docs
|
||||
| | |--examples
|
||||
| | |--src
|
||||
| | |- Bar.c
|
||||
| | |- Bar.h
|
||||
| |--Foo
|
||||
| | |- Foo.c
|
||||
| | |- Foo.h
|
||||
| |- readme.txt --> THIS FILE
|
||||
|- platformio.ini
|
||||
|--src
|
||||
|- main.c
|
||||
|
||||
Then in `src/main.c` you should use:
|
||||
|
||||
#include <Foo.h>
|
||||
#include <Bar.h>
|
||||
|
||||
// rest H/C/CPP code
|
||||
|
||||
PlatformIO will find your libraries automatically, configure preprocessor's
|
||||
include paths and build them.
|
||||
|
||||
See additional options for PlatformIO Library Dependency Finder `lib_*`:
|
||||
|
||||
http://docs.platformio.org/en/latest/projectconf.html#lib-install
|
||||
|
||||
38
examples/mbed/mbed-serial/lib/readme.txt
Normal file
38
examples/mbed/mbed-serial/lib/readme.txt
Normal file
@@ -0,0 +1,38 @@
|
||||
|
||||
This directory is intended for the project specific (private) libraries.
|
||||
PlatformIO will compile them to static libraries and link to executable file.
|
||||
|
||||
The source code of each library should be placed in separate directory, like
|
||||
"lib/private_lib/[here are source files]".
|
||||
|
||||
For example, see how can be organised `Foo` and `Bar` libraries:
|
||||
|
||||
|--lib
|
||||
| |--Bar
|
||||
| | |--docs
|
||||
| | |--examples
|
||||
| | |--src
|
||||
| | |- Bar.c
|
||||
| | |- Bar.h
|
||||
| |--Foo
|
||||
| | |- Foo.c
|
||||
| | |- Foo.h
|
||||
| |- readme.txt --> THIS FILE
|
||||
|- platformio.ini
|
||||
|--src
|
||||
|- main.c
|
||||
|
||||
Then in `src/main.c` you should use:
|
||||
|
||||
#include <Foo.h>
|
||||
#include <Bar.h>
|
||||
|
||||
// rest H/C/CPP code
|
||||
|
||||
PlatformIO will find your libraries automatically, configure preprocessor's
|
||||
include paths and build them.
|
||||
|
||||
See additional options for PlatformIO Library Dependency Finder `lib_*`:
|
||||
|
||||
http://docs.platformio.org/en/latest/projectconf.html#lib-install
|
||||
|
||||
38
examples/stm32/stm32-cmsis-blink/lib/readme.txt
Normal file
38
examples/stm32/stm32-cmsis-blink/lib/readme.txt
Normal file
@@ -0,0 +1,38 @@
|
||||
|
||||
This directory is intended for the project specific (private) libraries.
|
||||
PlatformIO will compile them to static libraries and link to executable file.
|
||||
|
||||
The source code of each library should be placed in separate directory, like
|
||||
"lib/private_lib/[here are source files]".
|
||||
|
||||
For example, see how can be organised `Foo` and `Bar` libraries:
|
||||
|
||||
|--lib
|
||||
| |--Bar
|
||||
| | |--docs
|
||||
| | |--examples
|
||||
| | |--src
|
||||
| | |- Bar.c
|
||||
| | |- Bar.h
|
||||
| |--Foo
|
||||
| | |- Foo.c
|
||||
| | |- Foo.h
|
||||
| |- readme.txt --> THIS FILE
|
||||
|- platformio.ini
|
||||
|--src
|
||||
|- main.c
|
||||
|
||||
Then in `src/main.c` you should use:
|
||||
|
||||
#include <Foo.h>
|
||||
#include <Bar.h>
|
||||
|
||||
// rest H/C/CPP code
|
||||
|
||||
PlatformIO will find your libraries automatically, configure preprocessor's
|
||||
include paths and build them.
|
||||
|
||||
See additional options for PlatformIO Library Dependency Finder `lib_*`:
|
||||
|
||||
http://docs.platformio.org/en/latest/projectconf.html#lib-install
|
||||
|
||||
38
examples/stm32/stm32-opencm3-blink/lib/readme.txt
Normal file
38
examples/stm32/stm32-opencm3-blink/lib/readme.txt
Normal file
@@ -0,0 +1,38 @@
|
||||
|
||||
This directory is intended for the project specific (private) libraries.
|
||||
PlatformIO will compile them to static libraries and link to executable file.
|
||||
|
||||
The source code of each library should be placed in separate directory, like
|
||||
"lib/private_lib/[here are source files]".
|
||||
|
||||
For example, see how can be organised `Foo` and `Bar` libraries:
|
||||
|
||||
|--lib
|
||||
| |--Bar
|
||||
| | |--docs
|
||||
| | |--examples
|
||||
| | |--src
|
||||
| | |- Bar.c
|
||||
| | |- Bar.h
|
||||
| |--Foo
|
||||
| | |- Foo.c
|
||||
| | |- Foo.h
|
||||
| |- readme.txt --> THIS FILE
|
||||
|- platformio.ini
|
||||
|--src
|
||||
|- main.c
|
||||
|
||||
Then in `src/main.c` you should use:
|
||||
|
||||
#include <Foo.h>
|
||||
#include <Bar.h>
|
||||
|
||||
// rest H/C/CPP code
|
||||
|
||||
PlatformIO will find your libraries automatically, configure preprocessor's
|
||||
include paths and build them.
|
||||
|
||||
See additional options for PlatformIO Library Dependency Finder `lib_*`:
|
||||
|
||||
http://docs.platformio.org/en/latest/projectconf.html#lib-install
|
||||
|
||||
38
examples/stm32/stm32-spl-blink/lib/readme.txt
Normal file
38
examples/stm32/stm32-spl-blink/lib/readme.txt
Normal file
@@ -0,0 +1,38 @@
|
||||
|
||||
This directory is intended for the project specific (private) libraries.
|
||||
PlatformIO will compile them to static libraries and link to executable file.
|
||||
|
||||
The source code of each library should be placed in separate directory, like
|
||||
"lib/private_lib/[here are source files]".
|
||||
|
||||
For example, see how can be organised `Foo` and `Bar` libraries:
|
||||
|
||||
|--lib
|
||||
| |--Bar
|
||||
| | |--docs
|
||||
| | |--examples
|
||||
| | |--src
|
||||
| | |- Bar.c
|
||||
| | |- Bar.h
|
||||
| |--Foo
|
||||
| | |- Foo.c
|
||||
| | |- Foo.h
|
||||
| |- readme.txt --> THIS FILE
|
||||
|- platformio.ini
|
||||
|--src
|
||||
|- main.c
|
||||
|
||||
Then in `src/main.c` you should use:
|
||||
|
||||
#include <Foo.h>
|
||||
#include <Bar.h>
|
||||
|
||||
// rest H/C/CPP code
|
||||
|
||||
PlatformIO will find your libraries automatically, configure preprocessor's
|
||||
include paths and build them.
|
||||
|
||||
See additional options for PlatformIO Library Dependency Finder `lib_*`:
|
||||
|
||||
http://docs.platformio.org/en/latest/projectconf.html#lib-install
|
||||
|
||||
38
examples/teensy/teensy-hid-usb-mouse/lib/readme.txt
Normal file
38
examples/teensy/teensy-hid-usb-mouse/lib/readme.txt
Normal file
@@ -0,0 +1,38 @@
|
||||
|
||||
This directory is intended for the project specific (private) libraries.
|
||||
PlatformIO will compile them to static libraries and link to executable file.
|
||||
|
||||
The source code of each library should be placed in separate directory, like
|
||||
"lib/private_lib/[here are source files]".
|
||||
|
||||
For example, see how can be organised `Foo` and `Bar` libraries:
|
||||
|
||||
|--lib
|
||||
| |--Bar
|
||||
| | |--docs
|
||||
| | |--examples
|
||||
| | |--src
|
||||
| | |- Bar.c
|
||||
| | |- Bar.h
|
||||
| |--Foo
|
||||
| | |- Foo.c
|
||||
| | |- Foo.h
|
||||
| |- readme.txt --> THIS FILE
|
||||
|- platformio.ini
|
||||
|--src
|
||||
|- main.c
|
||||
|
||||
Then in `src/main.c` you should use:
|
||||
|
||||
#include <Foo.h>
|
||||
#include <Bar.h>
|
||||
|
||||
// rest H/C/CPP code
|
||||
|
||||
PlatformIO will find your libraries automatically, configure preprocessor's
|
||||
include paths and build them.
|
||||
|
||||
See additional options for PlatformIO Library Dependency Finder `lib_*`:
|
||||
|
||||
http://docs.platformio.org/en/latest/projectconf.html#lib-install
|
||||
|
||||
38
examples/teensy/teensy-internal-libs/lib/readme.txt
Normal file
38
examples/teensy/teensy-internal-libs/lib/readme.txt
Normal file
@@ -0,0 +1,38 @@
|
||||
|
||||
This directory is intended for the project specific (private) libraries.
|
||||
PlatformIO will compile them to static libraries and link to executable file.
|
||||
|
||||
The source code of each library should be placed in separate directory, like
|
||||
"lib/private_lib/[here are source files]".
|
||||
|
||||
For example, see how can be organised `Foo` and `Bar` libraries:
|
||||
|
||||
|--lib
|
||||
| |--Bar
|
||||
| | |--docs
|
||||
| | |--examples
|
||||
| | |--src
|
||||
| | |- Bar.c
|
||||
| | |- Bar.h
|
||||
| |--Foo
|
||||
| | |- Foo.c
|
||||
| | |- Foo.h
|
||||
| |- readme.txt --> THIS FILE
|
||||
|- platformio.ini
|
||||
|--src
|
||||
|- main.c
|
||||
|
||||
Then in `src/main.c` you should use:
|
||||
|
||||
#include <Foo.h>
|
||||
#include <Bar.h>
|
||||
|
||||
// rest H/C/CPP code
|
||||
|
||||
PlatformIO will find your libraries automatically, configure preprocessor's
|
||||
include paths and build them.
|
||||
|
||||
See additional options for PlatformIO Library Dependency Finder `lib_*`:
|
||||
|
||||
http://docs.platformio.org/en/latest/projectconf.html#lib-install
|
||||
|
||||
38
examples/timsp430/panstamp-blink/lib/readme.txt
Normal file
38
examples/timsp430/panstamp-blink/lib/readme.txt
Normal file
@@ -0,0 +1,38 @@
|
||||
|
||||
This directory is intended for the project specific (private) libraries.
|
||||
PlatformIO will compile them to static libraries and link to executable file.
|
||||
|
||||
The source code of each library should be placed in separate directory, like
|
||||
"lib/private_lib/[here are source files]".
|
||||
|
||||
For example, see how can be organised `Foo` and `Bar` libraries:
|
||||
|
||||
|--lib
|
||||
| |--Bar
|
||||
| | |--docs
|
||||
| | |--examples
|
||||
| | |--src
|
||||
| | |- Bar.c
|
||||
| | |- Bar.h
|
||||
| |--Foo
|
||||
| | |- Foo.c
|
||||
| | |- Foo.h
|
||||
| |- readme.txt --> THIS FILE
|
||||
|- platformio.ini
|
||||
|--src
|
||||
|- main.c
|
||||
|
||||
Then in `src/main.c` you should use:
|
||||
|
||||
#include <Foo.h>
|
||||
#include <Bar.h>
|
||||
|
||||
// rest H/C/CPP code
|
||||
|
||||
PlatformIO will find your libraries automatically, configure preprocessor's
|
||||
include paths and build them.
|
||||
|
||||
See additional options for PlatformIO Library Dependency Finder `lib_*`:
|
||||
|
||||
http://docs.platformio.org/en/latest/projectconf.html#lib-install
|
||||
|
||||
38
examples/timsp430/timsp430-energia-blink/lib/readme.txt
Normal file
38
examples/timsp430/timsp430-energia-blink/lib/readme.txt
Normal file
@@ -0,0 +1,38 @@
|
||||
|
||||
This directory is intended for the project specific (private) libraries.
|
||||
PlatformIO will compile them to static libraries and link to executable file.
|
||||
|
||||
The source code of each library should be placed in separate directory, like
|
||||
"lib/private_lib/[here are source files]".
|
||||
|
||||
For example, see how can be organised `Foo` and `Bar` libraries:
|
||||
|
||||
|--lib
|
||||
| |--Bar
|
||||
| | |--docs
|
||||
| | |--examples
|
||||
| | |--src
|
||||
| | |- Bar.c
|
||||
| | |- Bar.h
|
||||
| |--Foo
|
||||
| | |- Foo.c
|
||||
| | |- Foo.h
|
||||
| |- readme.txt --> THIS FILE
|
||||
|- platformio.ini
|
||||
|--src
|
||||
|- main.c
|
||||
|
||||
Then in `src/main.c` you should use:
|
||||
|
||||
#include <Foo.h>
|
||||
#include <Bar.h>
|
||||
|
||||
// rest H/C/CPP code
|
||||
|
||||
PlatformIO will find your libraries automatically, configure preprocessor's
|
||||
include paths and build them.
|
||||
|
||||
See additional options for PlatformIO Library Dependency Finder `lib_*`:
|
||||
|
||||
http://docs.platformio.org/en/latest/projectconf.html#lib-install
|
||||
|
||||
38
examples/timsp430/timsp430-native-blink/lib/readme.txt
Normal file
38
examples/timsp430/timsp430-native-blink/lib/readme.txt
Normal file
@@ -0,0 +1,38 @@
|
||||
|
||||
This directory is intended for the project specific (private) libraries.
|
||||
PlatformIO will compile them to static libraries and link to executable file.
|
||||
|
||||
The source code of each library should be placed in separate directory, like
|
||||
"lib/private_lib/[here are source files]".
|
||||
|
||||
For example, see how can be organised `Foo` and `Bar` libraries:
|
||||
|
||||
|--lib
|
||||
| |--Bar
|
||||
| | |--docs
|
||||
| | |--examples
|
||||
| | |--src
|
||||
| | |- Bar.c
|
||||
| | |- Bar.h
|
||||
| |--Foo
|
||||
| | |- Foo.c
|
||||
| | |- Foo.h
|
||||
| |- readme.txt --> THIS FILE
|
||||
|- platformio.ini
|
||||
|--src
|
||||
|- main.c
|
||||
|
||||
Then in `src/main.c` you should use:
|
||||
|
||||
#include <Foo.h>
|
||||
#include <Bar.h>
|
||||
|
||||
// rest H/C/CPP code
|
||||
|
||||
PlatformIO will find your libraries automatically, configure preprocessor's
|
||||
include paths and build them.
|
||||
|
||||
See additional options for PlatformIO Library Dependency Finder `lib_*`:
|
||||
|
||||
http://docs.platformio.org/en/latest/projectconf.html#lib-install
|
||||
|
||||
38
examples/titiva/titiva-energia-blink/lib/readme.txt
Normal file
38
examples/titiva/titiva-energia-blink/lib/readme.txt
Normal file
@@ -0,0 +1,38 @@
|
||||
|
||||
This directory is intended for the project specific (private) libraries.
|
||||
PlatformIO will compile them to static libraries and link to executable file.
|
||||
|
||||
The source code of each library should be placed in separate directory, like
|
||||
"lib/private_lib/[here are source files]".
|
||||
|
||||
For example, see how can be organised `Foo` and `Bar` libraries:
|
||||
|
||||
|--lib
|
||||
| |--Bar
|
||||
| | |--docs
|
||||
| | |--examples
|
||||
| | |--src
|
||||
| | |- Bar.c
|
||||
| | |- Bar.h
|
||||
| |--Foo
|
||||
| | |- Foo.c
|
||||
| | |- Foo.h
|
||||
| |- readme.txt --> THIS FILE
|
||||
|- platformio.ini
|
||||
|--src
|
||||
|- main.c
|
||||
|
||||
Then in `src/main.c` you should use:
|
||||
|
||||
#include <Foo.h>
|
||||
#include <Bar.h>
|
||||
|
||||
// rest H/C/CPP code
|
||||
|
||||
PlatformIO will find your libraries automatically, configure preprocessor's
|
||||
include paths and build them.
|
||||
|
||||
See additional options for PlatformIO Library Dependency Finder `lib_*`:
|
||||
|
||||
http://docs.platformio.org/en/latest/projectconf.html#lib-install
|
||||
|
||||
38
examples/titiva/titiva-native-blink/lib/readme.txt
Normal file
38
examples/titiva/titiva-native-blink/lib/readme.txt
Normal file
@@ -0,0 +1,38 @@
|
||||
|
||||
This directory is intended for the project specific (private) libraries.
|
||||
PlatformIO will compile them to static libraries and link to executable file.
|
||||
|
||||
The source code of each library should be placed in separate directory, like
|
||||
"lib/private_lib/[here are source files]".
|
||||
|
||||
For example, see how can be organised `Foo` and `Bar` libraries:
|
||||
|
||||
|--lib
|
||||
| |--Bar
|
||||
| | |--docs
|
||||
| | |--examples
|
||||
| | |--src
|
||||
| | |- Bar.c
|
||||
| | |- Bar.h
|
||||
| |--Foo
|
||||
| | |- Foo.c
|
||||
| | |- Foo.h
|
||||
| |- readme.txt --> THIS FILE
|
||||
|- platformio.ini
|
||||
|--src
|
||||
|- main.c
|
||||
|
||||
Then in `src/main.c` you should use:
|
||||
|
||||
#include <Foo.h>
|
||||
#include <Bar.h>
|
||||
|
||||
// rest H/C/CPP code
|
||||
|
||||
PlatformIO will find your libraries automatically, configure preprocessor's
|
||||
include paths and build them.
|
||||
|
||||
See additional options for PlatformIO Library Dependency Finder `lib_*`:
|
||||
|
||||
http://docs.platformio.org/en/latest/projectconf.html#lib-install
|
||||
|
||||
38
examples/titiva/titiva-opencm3-blink/lib/readme.txt
Normal file
38
examples/titiva/titiva-opencm3-blink/lib/readme.txt
Normal file
@@ -0,0 +1,38 @@
|
||||
|
||||
This directory is intended for the project specific (private) libraries.
|
||||
PlatformIO will compile them to static libraries and link to executable file.
|
||||
|
||||
The source code of each library should be placed in separate directory, like
|
||||
"lib/private_lib/[here are source files]".
|
||||
|
||||
For example, see how can be organised `Foo` and `Bar` libraries:
|
||||
|
||||
|--lib
|
||||
| |--Bar
|
||||
| | |--docs
|
||||
| | |--examples
|
||||
| | |--src
|
||||
| | |- Bar.c
|
||||
| | |- Bar.h
|
||||
| |--Foo
|
||||
| | |- Foo.c
|
||||
| | |- Foo.h
|
||||
| |- readme.txt --> THIS FILE
|
||||
|- platformio.ini
|
||||
|--src
|
||||
|- main.c
|
||||
|
||||
Then in `src/main.c` you should use:
|
||||
|
||||
#include <Foo.h>
|
||||
#include <Bar.h>
|
||||
|
||||
// rest H/C/CPP code
|
||||
|
||||
PlatformIO will find your libraries automatically, configure preprocessor's
|
||||
include paths and build them.
|
||||
|
||||
See additional options for PlatformIO Library Dependency Finder `lib_*`:
|
||||
|
||||
http://docs.platformio.org/en/latest/projectconf.html#lib-install
|
||||
|
||||
38
examples/wiring-blink/lib/readme.txt
Normal file
38
examples/wiring-blink/lib/readme.txt
Normal file
@@ -0,0 +1,38 @@
|
||||
|
||||
This directory is intended for the project specific (private) libraries.
|
||||
PlatformIO will compile them to static libraries and link to executable file.
|
||||
|
||||
The source code of each library should be placed in separate directory, like
|
||||
"lib/private_lib/[here are source files]".
|
||||
|
||||
For example, see how can be organised `Foo` and `Bar` libraries:
|
||||
|
||||
|--lib
|
||||
| |--Bar
|
||||
| | |--docs
|
||||
| | |--examples
|
||||
| | |--src
|
||||
| | |- Bar.c
|
||||
| | |- Bar.h
|
||||
| |--Foo
|
||||
| | |- Foo.c
|
||||
| | |- Foo.h
|
||||
| |- readme.txt --> THIS FILE
|
||||
|- platformio.ini
|
||||
|--src
|
||||
|- main.c
|
||||
|
||||
Then in `src/main.c` you should use:
|
||||
|
||||
#include <Foo.h>
|
||||
#include <Bar.h>
|
||||
|
||||
// rest H/C/CPP code
|
||||
|
||||
PlatformIO will find your libraries automatically, configure preprocessor's
|
||||
include paths and build them.
|
||||
|
||||
See additional options for PlatformIO Library Dependency Finder `lib_*`:
|
||||
|
||||
http://docs.platformio.org/en/latest/projectconf.html#lib-install
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# Copyright (C) Ivan Kravets <me@ikravets.com>
|
||||
# See LICENSE for details.
|
||||
|
||||
VERSION = (2, 3, 1)
|
||||
VERSION = (2, 3, 3)
|
||||
__version__ = ".".join([str(s) for s in VERSION])
|
||||
|
||||
__title__ = "platformio"
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
|
||||
from os import listdir
|
||||
from os.path import join
|
||||
from platform import system
|
||||
from sys import exit as sys_exit
|
||||
from traceback import format_exc
|
||||
|
||||
@@ -70,6 +71,9 @@ def process_result(ctx, result, force, caller): # pylint: disable=W0613
|
||||
|
||||
def main():
|
||||
try:
|
||||
if "cygwin" in system().lower():
|
||||
raise exception.CygwinEnvDetected()
|
||||
|
||||
# https://urllib3.readthedocs.org
|
||||
# /en/latest/security.html#insecureplatformwarning
|
||||
try:
|
||||
|
||||
@@ -3,7 +3,8 @@
|
||||
|
||||
import json
|
||||
from os import environ, getenv
|
||||
from os.path import isfile, join
|
||||
from os.path import getmtime, isfile, join
|
||||
from time import time
|
||||
|
||||
from lockfile import LockFile
|
||||
|
||||
@@ -68,9 +69,8 @@ class State(object):
|
||||
|
||||
def __enter__(self):
|
||||
try:
|
||||
self._lock_state_file()
|
||||
if isfile(self.path):
|
||||
self._lock = LockFile(self.path)
|
||||
self._lock.acquire()
|
||||
with open(self.path, "r") as fp:
|
||||
self._state = json.load(fp)
|
||||
except ValueError:
|
||||
@@ -85,6 +85,18 @@ class State(object):
|
||||
json.dump(self._state, fp, indent=4)
|
||||
else:
|
||||
json.dump(self._state, fp)
|
||||
self._unlock_state_file()
|
||||
|
||||
def _lock_state_file(self):
|
||||
self._lock = LockFile(self.path)
|
||||
|
||||
if (self._lock.is_locked() and
|
||||
(time() - getmtime(self._lock.lock_file)) > 10):
|
||||
self._lock.break_lock()
|
||||
|
||||
self._lock.acquire()
|
||||
|
||||
def _unlock_state_file(self):
|
||||
if self._lock:
|
||||
self._lock.release()
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
"build": {
|
||||
"core": "esp8266",
|
||||
"extra_flags": "-DARDUINO_ESP8266_ESP01 -DARDUINO_ARCH_ESP8266 -DESP8266",
|
||||
"f_cpu": "80000000L",
|
||||
"f_cpu": "40000000L",
|
||||
"ldscript": "esp8266.flash.512k.ld",
|
||||
"mcu": "esp8266",
|
||||
"variant": "generic"
|
||||
|
||||
22
platformio/boards/punchthrough.json
Normal file
22
platformio/boards/punchthrough.json
Normal file
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"lightblue-bean": {
|
||||
"name": "LightBlue Bean",
|
||||
"vendor": "Punch Through",
|
||||
"url": "https://punchthrough.com/bean",
|
||||
|
||||
"platform": "atmelavr",
|
||||
"frameworks": ["arduino"],
|
||||
|
||||
"build": {
|
||||
"core": "bean",
|
||||
"variant": "bean",
|
||||
"extra_flags": "-DARDUINO_ARCH_AVR",
|
||||
"mcu": "atmega328p",
|
||||
"f_cpu": "8000000L"
|
||||
},
|
||||
"upload": {
|
||||
"maximum_size": 32256,
|
||||
"maximum_ram_size": 2048
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -299,6 +299,22 @@
|
||||
"url": "https://developer.mbed.org/platforms/ST-Nucleo-F411RE/",
|
||||
"vendor": "ST"
|
||||
},
|
||||
"nucleo_f446re": {
|
||||
"build": {
|
||||
"f_cpu": "180000000L",
|
||||
"cpu": "cortex-m4",
|
||||
"mcu": "stm32f446ret6"
|
||||
},
|
||||
"frameworks": ["mbed"],
|
||||
"name": "ST Nucleo F446RE",
|
||||
"platform": "ststm32",
|
||||
"upload": {
|
||||
"maximum_ram_size": 131072,
|
||||
"maximum_size": 524288
|
||||
},
|
||||
"url": "https://developer.mbed.org/platforms/ST-Nucleo-F446RE/",
|
||||
"vendor": "ST"
|
||||
},
|
||||
"nucleo_l053r8": {
|
||||
"build": {
|
||||
"f_cpu": "48000000L",
|
||||
|
||||
@@ -6,13 +6,16 @@ try:
|
||||
except ImportError:
|
||||
import sys
|
||||
for p in sys.path:
|
||||
_new_path = None
|
||||
if not p.endswith("site-packages") and "site-packages" in p:
|
||||
_new_path = p[:p.rfind("site-packages") + 13]
|
||||
elif "platformio" in p:
|
||||
_new_path = p[:p.rfind("platformio") - 1]
|
||||
if _new_path and _new_path not in sys.path:
|
||||
sys.path.insert(0, _new_path)
|
||||
_new_paths = []
|
||||
for item in ("dist-packages", "site-packages"):
|
||||
if not p.endswith(item) and item in p:
|
||||
_new_paths.append(p[:p.rfind(item) + len(item)])
|
||||
if "platformio" in p:
|
||||
_new_paths.append(p[:p.rfind("platformio") - 1])
|
||||
|
||||
for _p in _new_paths:
|
||||
if _p not in sys.path:
|
||||
sys.path.insert(0, _p)
|
||||
try:
|
||||
from platformio import util
|
||||
break
|
||||
|
||||
@@ -31,7 +31,7 @@ env.Replace(
|
||||
ASPPFLAGS=["-x", "assembler-with-cpp"],
|
||||
|
||||
CFLAGS=[
|
||||
"-std=c99",
|
||||
"-std=gnu99",
|
||||
"-Wpointer-arith",
|
||||
"-Wno-implicit-function-declaration",
|
||||
"-Wl,-EL",
|
||||
@@ -76,9 +76,7 @@ env.Replace(
|
||||
"-cb", "$UPLOAD_SPEED",
|
||||
"-cp", "$UPLOAD_PORT",
|
||||
"-ca", "0x00000",
|
||||
"-cf", "${SOURCES[0]}",
|
||||
"-ca", "0x40000" if "FRAMEWORK" not in env else "0x10000",
|
||||
"-cf", "${SOURCES[1]}"
|
||||
"-cf", "$SOURCE"
|
||||
],
|
||||
UPLOADCMD='$UPLOADER $UPLOADERFLAGS',
|
||||
|
||||
@@ -86,23 +84,35 @@ env.Replace(
|
||||
PROGSUFFIX=".elf"
|
||||
)
|
||||
|
||||
if "FRAMEWORK" in env:
|
||||
env.Append(
|
||||
LINKFLAGS=[
|
||||
"-Wl,-wrap,system_restart_local",
|
||||
"-Wl,-wrap,register_chipv6_phy"
|
||||
]
|
||||
)
|
||||
|
||||
env.Append(
|
||||
BUILDERS=dict(
|
||||
ElfToBin=Builder(
|
||||
action=" ".join([
|
||||
"$UPLOADER",
|
||||
"-eo", join("$PLATFORMFW_DIR", "bootloaders",
|
||||
"eboot", "eboot.elf"),
|
||||
"-bo", "$TARGET",
|
||||
"-bm", "dio",
|
||||
"-bf", "${BOARD_OPTIONS['build']['f_cpu'][:2]}",
|
||||
"-bz", str(int(env.get("BOARD_OPTIONS", {}).get(
|
||||
"upload", {}).get("maximum_size") / 1024)) + "K",
|
||||
"-bs", ".text",
|
||||
"-bp", "4096",
|
||||
"-ec",
|
||||
"-eo", "$SOURCES",
|
||||
"-bo", "${TARGETS[0]}",
|
||||
"-bm", "qio",
|
||||
"-bf", "40",
|
||||
"-bz", "512K",
|
||||
"-bs", ".irom0.text",
|
||||
"-bs", ".text",
|
||||
"-bs", ".data",
|
||||
"-bs", ".rodata",
|
||||
"-bc", "-ec",
|
||||
"-eo", "$SOURCES",
|
||||
"-es", ".irom0.text", "${TARGETS[1]}",
|
||||
"-ec", "-v"
|
||||
"-bc", "-ec"
|
||||
]),
|
||||
suffix=".bin"
|
||||
)
|
||||
@@ -119,13 +129,43 @@ if "FRAMEWORK" not in env:
|
||||
join("$PIOPACKAGES_DIR", "sdk-esp8266", "include"),
|
||||
"$PROJECTSRC_DIR"
|
||||
],
|
||||
LIBPATH=[join("$PIOPACKAGES_DIR", "sdk-esp8266", "lib")]
|
||||
LIBPATH=[join("$PIOPACKAGES_DIR", "sdk-esp8266", "lib")],
|
||||
BUILDERS=dict(
|
||||
ElfToBin=Builder(
|
||||
action=" ".join([
|
||||
"$UPLOADER",
|
||||
"-eo", "$SOURCES",
|
||||
"-bo", "${TARGETS[0]}",
|
||||
"-bm", "qio",
|
||||
"-bf", "40",
|
||||
"-bz", "512K",
|
||||
"-bs", ".text",
|
||||
"-bs", ".data",
|
||||
"-bs", ".rodata",
|
||||
"-bc", "-ec",
|
||||
"-eo", "$SOURCES",
|
||||
"-es", ".irom0.text", "${TARGETS[1]}",
|
||||
"-ec", "-v"
|
||||
]),
|
||||
suffix=".bin"
|
||||
)
|
||||
)
|
||||
)
|
||||
env.Replace(
|
||||
LDSCRIPT_PATH=join(
|
||||
"$PIOPACKAGES_DIR", "sdk-esp8266", "ld", "eagle.app.v6.ld"),
|
||||
LIBS=["c", "gcc", "phy", "pp", "net80211", "lwip", "wpa", "main",
|
||||
"json", "upgrade", "smartconfig", "pwm", "at", "ssl"]
|
||||
"json", "upgrade", "smartconfig", "pwm", "at", "ssl"],
|
||||
UPLOADERFLAGS=[
|
||||
"-vv",
|
||||
"-cd", "ck",
|
||||
"-cb", "$UPLOAD_SPEED",
|
||||
"-cp", "$UPLOAD_PORT",
|
||||
"-ca", "0x00000",
|
||||
"-cf", "${SOURCES[0]}",
|
||||
"-ca", "0x40000",
|
||||
"-cf", "${SOURCES[1]}"
|
||||
]
|
||||
)
|
||||
|
||||
#
|
||||
@@ -139,17 +179,20 @@ target_elf = env.BuildProgram()
|
||||
#
|
||||
|
||||
if "uploadlazy" in COMMAND_LINE_TARGETS:
|
||||
target_firm = [
|
||||
join("$BUILD_DIR", "firmware_00000.bin"),
|
||||
join("$BUILD_DIR", "firmware_%s.bin" %
|
||||
("40000" if "FRAMEWORK" not in env else "10000"))
|
||||
]
|
||||
if "FRAMEWORK" not in env:
|
||||
target_firm = [
|
||||
join("$BUILD_DIR", "firmware_00000.bin"),
|
||||
join("$BUILD_DIR", "firmware_40000.bin")
|
||||
]
|
||||
else:
|
||||
target_firm = join("$BUILD_DIR", "firmware.bin")
|
||||
else:
|
||||
target_firm = env.ElfToBin(
|
||||
[join("$BUILD_DIR", "firmware_00000"),
|
||||
join("$BUILD_DIR", "firmware_%s" %
|
||||
("40000" if "FRAMEWORK" not in env else "10000"))], target_elf)
|
||||
|
||||
if "FRAMEWORK" not in env:
|
||||
target_firm = env.ElfToBin(
|
||||
[join("$BUILD_DIR", "firmware_00000"),
|
||||
join("$BUILD_DIR", "firmware_40000")], target_elf)
|
||||
else:
|
||||
target_firm = env.ElfToBin(join("$BUILD_DIR", "firmware"), target_elf)
|
||||
|
||||
#
|
||||
# Target: Print binary size
|
||||
|
||||
@@ -47,7 +47,7 @@ elif env.get("PLATFORM") == "espressif":
|
||||
CPPPATH=[join("$PLATFORMFW_DIR", "sdk", "include")],
|
||||
LIBPATH=[join("$PLATFORMFW_DIR", "sdk", "lib")],
|
||||
LIBS=["smartconfig", "pp", "main", "wpa", "lwip",
|
||||
"net80211", "phy", "hal", "gcc", "m"]
|
||||
"net80211", "wps", "crypto", "phy", "hal", "gcc", "m"]
|
||||
)
|
||||
|
||||
env.Replace(PLATFORMFW_DIR=PLATFORMFW_DIR)
|
||||
|
||||
@@ -15,7 +15,7 @@ env = DefaultEnvironment()
|
||||
|
||||
SConscript(env.subst(join("$PIOBUILDER_DIR", "scripts", "basearm.py")))
|
||||
|
||||
if env['UPLOAD_PROTOCOL'] == "gdb":
|
||||
if env.subst("$UPLOAD_PROTOCOL") == "gdb":
|
||||
if not isfile(join(env.subst("$PROJECT_DIR"), "upload.gdb")):
|
||||
Exit(
|
||||
"You are using GDB as firmware uploader. "
|
||||
@@ -50,7 +50,8 @@ else:
|
||||
|
||||
env.Append(
|
||||
CPPDEFINES=[
|
||||
"${BOARD_OPTIONS['build']['variant'].upper()}"
|
||||
env.get("BOARD_OPTIONS", {}).get(
|
||||
"build", {}).get("variant", "").upper()
|
||||
],
|
||||
|
||||
LIBS=["stdc++", "nosys"],
|
||||
@@ -87,8 +88,9 @@ AlwaysBuild(target_size)
|
||||
# Target: Upload by default .bin file
|
||||
#
|
||||
|
||||
disable_msd = (platform.system() == "Darwin" and
|
||||
platform.release().startswith("14."))
|
||||
disable_msd = (
|
||||
(platform.system() == "Darwin" and platform.release().startswith("14.")) or
|
||||
env.subst("$UPLOAD_PROTOCOL"))
|
||||
if "mbed" in env.subst("$FRAMEWORK") and not disable_msd:
|
||||
upload = env.Alias(["upload", "uploadlazy"],
|
||||
target_firm, env.UploadToDisk)
|
||||
|
||||
@@ -147,7 +147,7 @@ def DumpIDEData(env):
|
||||
for item in env.get("CPPDEFINES", []):
|
||||
if isinstance(item, list):
|
||||
item = "=".join(item)
|
||||
data['defines'].append(env.subst(item))
|
||||
data['defines'].append(env.subst(item).replace('\\"', '"'))
|
||||
|
||||
# special symbol for Atmel AVR MCU
|
||||
board = env.get("BOARD_OPTIONS", {})
|
||||
|
||||
@@ -2,14 +2,13 @@
|
||||
# See LICENSE for details.
|
||||
|
||||
from os.path import join
|
||||
from platform import system
|
||||
from shutil import copyfile
|
||||
from time import sleep
|
||||
|
||||
from SCons.Script import Exit
|
||||
from serial import Serial
|
||||
|
||||
from platformio.util import get_logicaldisks, get_serialports
|
||||
from platformio.util import get_logicaldisks, get_serialports, get_systype
|
||||
|
||||
|
||||
def FlushSerialBuffer(env, port):
|
||||
@@ -24,7 +23,7 @@ def FlushSerialBuffer(env, port):
|
||||
|
||||
|
||||
def TouchSerialPort(env, port, baudrate):
|
||||
if system() == "Linux":
|
||||
if "windows" not in get_systype():
|
||||
try:
|
||||
s = Serial(env.subst(port))
|
||||
s.close()
|
||||
|
||||
@@ -56,7 +56,10 @@ def cli(query, json_output): # pylint: disable=R0912
|
||||
if "maximum_ram_size" in data.get("upload", None):
|
||||
ram_size = int(data['upload']['maximum_ram_size'])
|
||||
if ram_size >= 1024:
|
||||
ram_size = "%dKb" % (ram_size / 1024)
|
||||
if ram_size % 1024:
|
||||
ram_size = "%.1fKb" % (ram_size / 1024.0)
|
||||
else:
|
||||
ram_size = "%dKb" % (ram_size / 1024)
|
||||
else:
|
||||
ram_size = "%dB" % ram_size
|
||||
|
||||
|
||||
@@ -85,13 +85,43 @@ def cli(ctx, project_dir, board, ide, # pylint: disable=R0913
|
||||
if not isfile(join(lib_dir, "readme.txt")):
|
||||
with open(join(lib_dir, "readme.txt"), "w") as f:
|
||||
f.write("""
|
||||
Documentation: http://docs.platformio.org/en/latest/userguide/cmd_init.html
|
||||
|
||||
This directory is intended for the project specific (private) libraries.
|
||||
PlatformIO will compile them to static libraries and link to executable file.
|
||||
|
||||
The source code of each library should be placed in separate directory.
|
||||
For example, "lib/private_lib/[here are source files]".
|
||||
The source code of each library should be placed in separate directory, like
|
||||
"lib/private_lib/[here are source files]".
|
||||
|
||||
For example, see how can be organised `Foo` and `Bar` libraries:
|
||||
|
||||
|--lib
|
||||
| |--Bar
|
||||
| | |--docs
|
||||
| | |--examples
|
||||
| | |--src
|
||||
| | |- Bar.c
|
||||
| | |- Bar.h
|
||||
| |--Foo
|
||||
| | |- Foo.c
|
||||
| | |- Foo.h
|
||||
| |- readme.txt --> THIS FILE
|
||||
|- platformio.ini
|
||||
|--src
|
||||
|- main.c
|
||||
|
||||
Then in `src/main.c` you should use:
|
||||
|
||||
#include <Foo.h>
|
||||
#include <Bar.h>
|
||||
|
||||
// rest H/C/CPP code
|
||||
|
||||
PlatformIO will find your libraries automatically, configure preprocessor's
|
||||
include paths and build them.
|
||||
|
||||
See additional options for PlatformIO Library Dependency Finder `lib_*`:
|
||||
|
||||
http://docs.platformio.org/en/latest/projectconf.html#lib-install
|
||||
|
||||
""")
|
||||
|
||||
if not isfile(project_file):
|
||||
|
||||
@@ -81,4 +81,4 @@ def serialports_monitor(**kwargs):
|
||||
try:
|
||||
miniterm.main()
|
||||
except Exception as e: # pylint: disable=W0702
|
||||
raise MinitermException("Miniterm: %s" % e)
|
||||
raise MinitermException(e)
|
||||
|
||||
@@ -32,6 +32,11 @@ def cli():
|
||||
for cmd in cmds:
|
||||
r = None
|
||||
r = util.exec_command(cmd)
|
||||
|
||||
# try pip with disabled cache
|
||||
if r['returncode'] != 0 and cmd[0] == "pip":
|
||||
r = util.exec_command(["pip", "--no-cache-dir"] + cmd[1:])
|
||||
|
||||
assert r['returncode'] == 0
|
||||
assert last in r['out'].strip()
|
||||
click.secho(
|
||||
@@ -42,7 +47,7 @@ def cli():
|
||||
fg="cyan")
|
||||
except (OSError, AssertionError) as e:
|
||||
if not r:
|
||||
raise exception.PlatformioException(
|
||||
raise exception.PlatformioUpgradeError(
|
||||
"\n".join([str(cmd), str(e)]))
|
||||
if ("Permission denied" in r['err'] and
|
||||
"windows" not in util.get_systype()):
|
||||
@@ -58,7 +63,7 @@ WARNING! Don't use `sudo` for the rest PlatformIO commands.
|
||||
""", fg="yellow", err=True)
|
||||
raise exception.ReturnErrorCode()
|
||||
else:
|
||||
raise exception.PlatformioException(
|
||||
raise exception.PlatformioUpgradeError(
|
||||
"\n".join([str(cmd), r['out'], r['err']]))
|
||||
|
||||
|
||||
|
||||
@@ -87,7 +87,9 @@ class FDSHASumMismatch(PlatformioException):
|
||||
|
||||
class NotPlatformProject(PlatformioException):
|
||||
|
||||
MESSAGE = "Not a PlatformIO project (%s). Use `platformio init` command"
|
||||
MESSAGE = "Not a PlatformIO project. `platformio.ini` file has not been "\
|
||||
"found in current working directory (%s). To initialize new project "\
|
||||
"please use `platformio init` command"
|
||||
|
||||
|
||||
class UndefinedEnvPlatform(PlatformioException):
|
||||
@@ -182,6 +184,25 @@ class SConsNotInstalled(PlatformioException):
|
||||
|
||||
MESSAGE = (
|
||||
"The PlatformIO and `scons` aren't installed properly. "
|
||||
"Please use official installation manual: "
|
||||
"More details in FAQ/Troubleshooting section: "
|
||||
"http://docs.platformio.org/en/latest/faq.html"
|
||||
)
|
||||
|
||||
|
||||
class PlatformioUpgradeError(PlatformioException):
|
||||
|
||||
MESSAGE = (
|
||||
"%s \n\n"
|
||||
"1. Please report this issue here: "
|
||||
"https://github.com/platformio/platformio/issues \n"
|
||||
"2. Try different installation/upgrading steps: "
|
||||
"http://docs.platformio.org/en/latest/installation.html"
|
||||
)
|
||||
|
||||
|
||||
class CygwinEnvDetected(PlatformioException):
|
||||
|
||||
MESSAGE = (
|
||||
"PlatformIO does not work within Cygwin environment. "
|
||||
"Use native Terminal instead."
|
||||
)
|
||||
|
||||
@@ -13,7 +13,7 @@ include_directories("{{include}}")
|
||||
% end
|
||||
|
||||
% for define in defines:
|
||||
add_definitions(-D{{define}})
|
||||
add_definitions(-D{{!define}})
|
||||
% end
|
||||
|
||||
add_custom_target(
|
||||
|
||||
@@ -41,13 +41,13 @@
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<NMakeBuildCommandLine>platformio -f -c visualstudio run</NMakeBuildCommandLine>
|
||||
<NMakeCleanCommandLine>platformio -f -c visualstudio run --target clean</NMakeCleanCommandLine>
|
||||
<NMakePreprocessorDefinitions>{{";".join(defines)}}</NMakePreprocessorDefinitions>
|
||||
<NMakePreprocessorDefinitions>{{!";".join(defines)}}</NMakePreprocessorDefinitions>
|
||||
<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 Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<NMakeBuildCommandLine>platformio run</NMakeBuildCommandLine>
|
||||
<NMakeCleanCommandLine>platformio run --target clean</NMakeCleanCommandLine>
|
||||
<NMakePreprocessorDefinitions>{";".join(defines)}}</NMakePreprocessorDefinitions>
|
||||
<NMakePreprocessorDefinitions>{{!";".join(defines)}}</NMakePreprocessorDefinitions>
|
||||
<NMakeIncludeSearchPath>{{";".join(["$(HOMEDRIVE)$(HOMEPATH)%s" % i.replace(user_home_dir, "") if i.startswith(user_home_dir) else i for i in includes])}}</NMakeIncludeSearchPath>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup>
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
import os
|
||||
import re
|
||||
import sys
|
||||
from glob import glob
|
||||
from imp import load_source
|
||||
from os.path import isdir, isfile, join
|
||||
|
||||
@@ -400,6 +401,22 @@ class BasePlatform(object):
|
||||
def test_scons():
|
||||
try:
|
||||
r = util.exec_command(["scons", "--version"])
|
||||
if "ImportError: No module named SCons.Script" in r['err']:
|
||||
_PYTHONPATH = []
|
||||
for p in sys.path:
|
||||
if not p.endswith("-packages"):
|
||||
continue
|
||||
for item in glob(join(p, "scons*")):
|
||||
if isdir(join(item, "SCons")) and item not in sys.path:
|
||||
_PYTHONPATH.append(item)
|
||||
sys.path.insert(0, item)
|
||||
if _PYTHONPATH:
|
||||
_PYTHONPATH = str(os.pathsep).join(_PYTHONPATH)
|
||||
if os.getenv("PYTHONPATH"):
|
||||
os.environ['PYTHONPATH'] += os.pathsep + _PYTHONPATH
|
||||
else:
|
||||
os.environ['PYTHONPATH'] = _PYTHONPATH
|
||||
r = util.exec_command(["scons", "--version"])
|
||||
assert r['returncode'] == 0
|
||||
return True
|
||||
except (OSError, AssertionError):
|
||||
|
||||
@@ -248,7 +248,7 @@ def measure_caller(calller_id):
|
||||
"action": "Misc",
|
||||
"label": calller_id
|
||||
}
|
||||
if calller_id in ProjectGenerator.get_supported_ides():
|
||||
if calller_id in (["atom", "vim"] + ProjectGenerator.get_supported_ides()):
|
||||
event['action'] = "IDE"
|
||||
on_event(**event)
|
||||
|
||||
|
||||
@@ -113,10 +113,9 @@ def singleton(cls):
|
||||
|
||||
def get_systype():
|
||||
data = uname()
|
||||
systype = data[0]
|
||||
if data[4]:
|
||||
systype += "_" + data[4]
|
||||
return systype.lower()
|
||||
type_ = data[0].lower()
|
||||
arch = data[4].lower() if data[4] else ""
|
||||
return "%s_%s" % (type_, arch) if arch else type_
|
||||
|
||||
|
||||
def pioversion_to_intstr():
|
||||
@@ -250,7 +249,8 @@ def get_serialports():
|
||||
from serial.tools.list_ports_posix import comports
|
||||
else:
|
||||
raise exception.GetSerialPortsError(os.name)
|
||||
return [{"port": p, "description": d, "hwid": h} for p, d, h in comports()]
|
||||
return [{"port": p, "description": d, "hwid": h}
|
||||
for p, d, h in comports() if p]
|
||||
|
||||
|
||||
def get_logicaldisks():
|
||||
|
||||
Reference in New Issue
Block a user