Merge branch 'develop' into feature/platformio-30

* develop:
  Update docs for Teensy USB Features // Issue #722
  Implement Teensy 2.0 USB functionality (HID, SERIAL_HID, DISK, MIDI, etc.) // Resolve #722
  Add support for Pinoccio Scout board // Resolve #52
  Fix broken LD Script for Element14 chipKIT Pi board // Resolve #725  Resolve #726
  Fix USB flags processing for teensy platform // Issue #722
  Add Pinoccio board // Issue #52
  Minor improvements for CLion docs
  Improved docs for integration with CLion IDE
  Version bump to 2.11.1 (issues #472, #629, #710, #711, #712, #713, #718)
  Typo fix
  Add "udev" rules for OpenOCD CMSIS-DAP adapters // Resolve #718
  Update history
  Ignore "[platformio]" section from custom project configuration CI
  Bump to 2.11.1b1
  Add Arduino M0 Pro and Tian to the examples // Issue #472
  Fix issue when `pioenvs` folder doesn't exist
  Add more info about `.pioenvs` directory
  Improve CMSIS selection for SAMD21 boards
  Improve support for SAMD21 based boards
  Add contributing guidelines
This commit is contained in:
Ivan Kravets
2016-07-18 22:43:24 +03:00
14 changed files with 238 additions and 34 deletions

View File

@@ -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 <https://www.crowdsupply.com/pinoccio/mesh-sensor-network>`_
- ATMEGA256RFR2
- 16 MHz
- 256 Kb
- 32 Kb
Punch Through
~~~~~~~~~~~~~

View File

@@ -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 <Arduino.h>``
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 <Arduino.h>`` 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 <Arduino.h>
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 <https://github.com/platformio/platformio-examples/tree/develop/ide/clion>`_.

View File

@@ -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 <https://www.crowdsupply.com/pinoccio/mesh-sensor-network>`_
- ATMEGA256RFR2
- 16 MHz
- 256 Kb
- 32 Kb
Punch Through
~~~~~~~~~~~~~

View File

@@ -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 <https://www.crowdsupply.com/pinoccio/mesh-sensor-network>`_
- ATMEGA256RFR2
- 16 MHz
- 256 Kb
- 32 Kb
Punch Through
~~~~~~~~~~~~~

View File

@@ -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 <https://www.pjrc.com/teensy/usb_debug_only.html>`_.
Examples
--------

View File

@@ -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!