diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
new file mode 100644
index 00000000..e46d388c
--- /dev/null
+++ b/CONTRIBUTING.md
@@ -0,0 +1,21 @@
+Contributing
+------------
+
+To get started, sign the Contributor License Agreement.
+
+1. Fork the repository on GitHub.
+2. Make a branch off of ``develop``
+3. Run ``pip install tox``
+4. Go to the root of project where is located ``tox.ini`` and run ``tox -e develop``
+5. Activate current development environment:
+
+ * Windows: ``.tox\develop\Scripts\activate``
+ * Bash/ZSH: ``source .tox/develop/bin/activate``
+ * Fish: ``source .tox/bin/activate.fish``
+
+6. Make changes to code, documentation, etc.
+7. Lint source code ``tox -e lint``
+8. Run the tests ``tox -e py27``
+9. Build documentation ``tox -e docs`` (creates a directory _build under docs where you can find the html)
+10. Commit changes to your forked repository
+11. Submit a Pull Request on GitHub.
diff --git a/HISTORY.rst b/HISTORY.rst
index e89b8e1d..fd52b09a 100644
--- a/HISTORY.rst
+++ b/HISTORY.rst
@@ -38,17 +38,35 @@ PlatformIO 3.0
PlatformIO 2.0
--------------
-2.11.1 (2016-??-??)
+2.11.2 (2016-??-??)
~~~~~~~~~~~~~~~~~~~
+* Added support for Pinoccio Scout board
+ (`issue #52 `_)
+* Added support for `Teensy USB Features `__
+ (HID, SERIAL_HID, DISK, DISK_SDFLASH, MIDI, etc.)
+ (`issue #722 `_)
+* Fixed broken LD Script for Element14 chipKIT Pi board
+ (`issue #725 `_)
+
+2.11.1 (2016-07-12)
+~~~~~~~~~~~~~~~~~~~
+
+* Added support for Arduino M0, M0 Pro and Tian boards
+ (`issue #472 `_)
* Added support for Microchip chipKIT Lenny board
* Updated Microchip PIC32 Arduino framework to v1.2.1
* Documented `uploading of EEPROM data `__
(from EEMEM directive)
* Added ``Rebuild C/C++ Project Index`` target to CLion and Eclipse IDEs
* Improved project generator for `CLion IDE `__
+* Added ``udev`` rules for OpenOCD CMSIS-DAP adapters
+ (`issue #718 `_)
* Auto-remove project cache when PlatformIO is upgraded
* Keep user changes for ``.gitignore`` file when re-generate/update project data
+* Ignore ``[platformio]`` section from custom project configuration file when
+ `platformio ci --project-conf `__
+ command is used
* Fixed missed ``--boot`` flag for the firmware uploader for ATSAM3X8E
Cortex-M3 MCU based boards (Arduino Due, etc)
(`issue #710 `_)
diff --git a/README.rst b/README.rst
index 391214f2..a3854318 100644
--- a/README.rst
+++ b/README.rst
@@ -185,27 +185,12 @@ For further details, please refer to `What is PlatformIO? `_.
- * Windows: ``.tox\develop\Scripts\activate``
- * Bash/ZSH: ``source .tox/develop/bin/activate``
- * Fish: ``source .tox/bin/activate.fish``
-
-6. Make changes to code, documentation, etc.
-7. Lint source code ``tox -e lint``
-8. Run the tests ``tox -e py27``
-9. Build documentation ``tox -e docs`` (creates a directory _build under docs where you can find the html)
-10. Commit changes to your forked repository
-11. Submit a Pull Request on GitHub.
-
-Licence
+License
-------
Copyright 2014-2016 Ivan Kravets
-The PlatformIO is licensed under the permissive Apache 2.0 licence,
+The PlatformIO is licensed under the permissive Apache 2.0 license,
so you can use it in both commercial and personal projects with confidence.
diff --git a/docs/frameworks/arduino.rst b/docs/frameworks/arduino.rst
index e0d9c67f..b16c12d6 100644
--- a/docs/frameworks/arduino.rst
+++ b/docs/frameworks/arduino.rst
@@ -1341,6 +1341,26 @@ PanStamp
- 32 Kb
- 4 Kb
+Pinoccio
+~~~~~~~~
+
+.. list-table::
+ :header-rows: 1
+
+ * - Type ``board``
+ - Name
+ - Microcontroller
+ - Frequency
+ - Flash
+ - RAM
+
+ * - ``pinoccio``
+ - `Pinoccio Scout `_
+ - ATMEGA256RFR2
+ - 16 MHz
+ - 256 Kb
+ - 32 Kb
+
Punch Through
~~~~~~~~~~~~~
diff --git a/docs/ide/clion.rst b/docs/ide/clion.rst
index bbd6584a..7a548ee8 100644
--- a/docs/ide/clion.rst
+++ b/docs/ide/clion.rst
@@ -43,12 +43,17 @@ command and generate project via :option:`platformio init --ide` command:
Then:
-1. Place source files (``*.c, *.cpp, *.h, *.ino, etc.``) to ``src`` directory
+1. Place source files (``*.c, *.cpp, *.h, *.hpp``) to ``src`` directory
2. Import this project via ``Menu: File > Import Project``
and specify root directory where is located :ref:`projectconf`
3. Open source file from ``src`` directory
4. Build project (*DO NOT RUN*): ``Menu: Run > Build``.
+.. warning::
+
+ See know issue: :ref:`ide_clion_knownissues_inopde_not_supported` and how
+ to resolve it.
+
There are 6 predefined targets for building (*NOT FOR RUNNING*, see marks on
the screenshot below):
@@ -68,6 +73,65 @@ the screenshot below):
after generating process wont be reflected in IDE. To fix it please run
``PLATFORMIO_REBUILD_PROJECT_INDEX`` target.
+Known issues
+------------
+
+.. _ide_clion_knownissues_inopde_not_supported:
+
+Arduino ``.ino`` files are not supported
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+CLion uses "CMake" tool for code completion and code linting. As result, it
+doesn't support Arduino files (``*.ino`` and ``.pde``) because they are
+not valid C/C++ based source files:
+
+1. Missing includes such as ``#include ``
+2. Function declarations are omitted.
+
+Convert Arduino file to C++ manually
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+For example, we have the next ``Demo.ino`` file:
+
+.. code-block:: cpp
+
+ void function setup () {
+ someFunction(13);
+ }
+
+ void function loop() {
+ delay(1000);
+ }
+
+ void someFunction(int num) {
+ }
+
+Let's convert it to ``Demo.cpp``:
+
+1. Add ``#include `` at the top of the source file
+2. Declare each custom function (excluding built-in, such as ``setup`` and ``loop``)
+ before it will be called.
+
+The final ``Demo.cpp``:
+
+.. code-block:: cpp
+
+ #include
+
+ void someFunction(int num);
+
+ void function setup () {
+ someFunction(13);
+ }
+
+ void function loop() {
+ delay(1000);
+ }
+
+ void someFunction(int num) {
+ }
+
+
Articles / Manuals
------------------
@@ -81,6 +145,6 @@ Examples
--------
"Blink" Project
-^^^^^^^^^^^^^^^
+~~~~~~~~~~~~~~~
Source code of `CLion "Blink" Project `_.
diff --git a/docs/platforms/atmelavr.rst b/docs/platforms/atmelavr.rst
index f5ba50c1..52bcb584 100644
--- a/docs/platforms/atmelavr.rst
+++ b/docs/platforms/atmelavr.rst
@@ -842,6 +842,26 @@ PanStamp
- 32 Kb
- 2 Kb
+Pinoccio
+~~~~~~~~
+
+.. list-table::
+ :header-rows: 1
+
+ * - Type ``board``
+ - Name
+ - Microcontroller
+ - Frequency
+ - Flash
+ - RAM
+
+ * - ``pinoccio``
+ - `Pinoccio Scout `_
+ - ATMEGA256RFR2
+ - 16 MHz
+ - 256 Kb
+ - 32 Kb
+
Punch Through
~~~~~~~~~~~~~
diff --git a/docs/platforms/embedded_boards.rst b/docs/platforms/embedded_boards.rst
index f5a6a0d6..91df1475 100644
--- a/docs/platforms/embedded_boards.rst
+++ b/docs/platforms/embedded_boards.rst
@@ -1726,6 +1726,26 @@ PanStamp
- 32 Kb
- 4 Kb
+Pinoccio
+~~~~~~~~
+
+.. list-table::
+ :header-rows: 1
+
+ * - Type ``board``
+ - Name
+ - Microcontroller
+ - Frequency
+ - Flash
+ - RAM
+
+ * - ``pinoccio``
+ - `Pinoccio Scout `_
+ - ATMEGA256RFR2
+ - 16 MHz
+ - 256 Kb
+ - 32 Kb
+
Punch Through
~~~~~~~~~~~~~
diff --git a/docs/platforms/teensy_extra.rst b/docs/platforms/teensy_extra.rst
index cca6c119..360ea86c 100644
--- a/docs/platforms/teensy_extra.rst
+++ b/docs/platforms/teensy_extra.rst
@@ -9,6 +9,33 @@
See the License for the specific language governing permissions and
limitations under the License.
+USB Features
+------------
+
+If you want to use Teensy USB Features, you need to add special
+acros/define using :ref:`projectconf_build_flags`:
+
+* ``-D USB_HID``
+* ``-D USB_SERIAL_HID``
+* ``-D USB_DISK``
+* ``-D USB_DISK_SDFLASH``
+* ``-D USB_MIDI``
+* ``-D USB_RAWHID``
+* ``-D USB_FLIGHTSIM``
+* ``-D USB_DISABLED``
+
+Example:
+
+.. code-block:: ini
+
+ [env:teensy_hid_device]
+ platform = teensy
+ framework = arduino
+ board = teensy20
+ build_flags = -D USB_RAWHID
+
+See `Teensy USB Examples `_.
+
Examples
--------
diff --git a/docs/projectconf.rst b/docs/projectconf.rst
index f0e6b941..17e0bf23 100644
--- a/docs/projectconf.rst
+++ b/docs/projectconf.rst
@@ -97,7 +97,11 @@ This option can be overridden by global environment variable
``envs_dir``
^^^^^^^^^^^^
-This is a cache directory. *PlatformIO Build System* uses this folder for project
+.. warning::
+ **PLEASE DO NOT EDIT FILES IN THIS FOLDER**. PlatformIO will overwrite
+ your changes on the next build. **THIS IS A CACHE DIRECTORY**.
+
+*PlatformIO Build System* uses this folder for project
environments to store compiled object files, static libraries, firmwares and
other cached information. It allows PlatformIO to build source code extremely
fast!
diff --git a/examples b/examples
index 6c0a7e44..a657ca42 160000
--- a/examples
+++ b/examples
@@ -1 +1 @@
-Subproject commit 6c0a7e4458056fa04657a14422aeae277560341d
+Subproject commit a657ca4225f55af7239b89486350c9f02bb3ee93
diff --git a/platformio/builder/tools/pioupload.py b/platformio/builder/tools/pioupload.py
index 198885cd..aac85f57 100644
--- a/platformio/builder/tools/pioupload.py
+++ b/platformio/builder/tools/pioupload.py
@@ -39,15 +39,12 @@ def FlushSerialBuffer(env, port):
def TouchSerialPort(env, port, baudrate):
port = env.subst(port)
print "Forcing reset using %dbps open/close on port %s" % (baudrate, port)
- if system() != "Windows":
- try:
- s = Serial(port)
- s.close()
- except: # pylint: disable=W0702
- pass
- s = Serial(port=port, baudrate=baudrate)
- s.setDTR(False)
- s.close()
+ try:
+ s = Serial(port=port, baudrate=baudrate)
+ s.setDTR(False)
+ s.close()
+ except: # pylint: disable=W0702
+ pass
sleep(0.4)
diff --git a/platformio/commands/ci.py b/platformio/commands/ci.py
index 4c81b8d3..1df83ba8 100644
--- a/platformio/commands/ci.py
+++ b/platformio/commands/ci.py
@@ -27,6 +27,12 @@ from platformio.commands.init import validate_boards
from platformio.commands.run import cli as cmd_run
from platformio.exception import CIBuildEnvsEmpty
+# pylint: disable=wrong-import-order
+try:
+ from configparser import ConfigParser
+except ImportError:
+ from ConfigParser import ConfigParser
+
def validate_path(ctx, param, value): # pylint: disable=W0613
invalid_path = None
@@ -81,7 +87,7 @@ def cli(ctx, src, lib, exclude, board, # pylint: disable=R0913
_copy_contents(join(build_dir, dir_name), contents)
if project_conf and isfile(project_conf):
- copyfile(project_conf, join(build_dir, "platformio.ini"))
+ _copy_project_conf(build_dir, project_conf)
elif not board:
raise CIBuildEnvsEmpty()
@@ -147,3 +153,12 @@ def _exclude_contents(dst_dir, patterns):
rmtree(path)
elif isfile(path):
remove(path)
+
+
+def _copy_project_conf(build_dir, project_conf):
+ cp = ConfigParser()
+ cp.read(project_conf)
+ if cp.has_section("platformio"):
+ cp.remove_section("platformio")
+ with open(join(build_dir, "platformio.ini"), "w") as fp:
+ cp.write(fp)
diff --git a/platformio/util.py b/platformio/util.py
index ff1fc5b3..8cc9645b 100644
--- a/platformio/util.py
+++ b/platformio/util.py
@@ -220,10 +220,20 @@ def get_projectlib_dir():
def get_pioenvs_dir():
- return _get_projconf_option_dir(
+ path = _get_projconf_option_dir(
"envs_dir",
join(get_project_dir(), ".pioenvs")
)
+ if not isdir(path):
+ os.makedirs(path)
+ dontmod_path = join(path, "do-not-modify-files-here.url")
+ if not isfile(dontmod_path):
+ with open(dontmod_path, "w") as fp:
+ fp.write("""
+[InternetShortcut]
+URL=http://docs.platformio.org/en/latest/projectconf.html#envs-dir
+""")
+ return path
def get_projectdata_dir():
diff --git a/scripts/99-platformio-udev.rules b/scripts/99-platformio-udev.rules
index a3c846b7..340e723b 100644
--- a/scripts/99-platformio-udev.rules
+++ b/scripts/99-platformio-udev.rules
@@ -76,3 +76,6 @@ SUBSYSTEMS=="usb", ATTRS{idVendor}=="1cbe", ATTRS{idProduct}=="00fd", MODE="0666
#TI MSP430 Launchpad
SUBSYSTEMS=="usb", ATTRS{idVendor}=="0451", ATTRS{idProduct}=="f432", MODE="0666"
+
+# CMSIS-DAP compatible adapters
+ATTRS{product}=="*CMSIS-DAP*", MODE="664", GROUP="plugdev"