forked from platformio/platformio-core
Update docs for PlatformIO IDE 1.0.0
This commit is contained in:
BIN
docs/_static/ide-atom-platformio-menu-item.png
vendored
BIN
docs/_static/ide-atom-platformio-menu-item.png
vendored
Binary file not shown.
Before Width: | Height: | Size: 175 KiB After Width: | Height: | Size: 213 KiB |
BIN
docs/_static/ide-atom-platformio-toolbar.png
vendored
BIN
docs/_static/ide-atom-platformio-toolbar.png
vendored
Binary file not shown.
Before Width: | Height: | Size: 43 KiB After Width: | Height: | Size: 18 KiB |
@ -43,12 +43,30 @@ config file.
|
|||||||
Installation
|
Installation
|
||||||
------------
|
------------
|
||||||
|
|
||||||
1. Download and install Atom text editor
|
PlatformIO IDE is the next generation integrated development environment for IoT.
|
||||||
|
It's built on top of `GitHub's Atom "hackable" text editor <https://atom.io>`_.
|
||||||
|
If you have already Atom installed, please install `PlatformIO IDE for Atom package <https://atom.io/packages/platformio-ide>`_.
|
||||||
|
|
||||||
- `Download for Mac <https://atom.io/download/mac>`_
|
Automatic Installation
|
||||||
- `Download for Windows <https://atom.io/download/windows>`_
|
~~~~~~~~~~~~~~~~~~~~~~
|
||||||
- `Download .deb <https://atom.io/download/deb>`_
|
|
||||||
- `Download .rpm <https://atom.io/download/rpm>`_
|
Please download PlatformIO IDE for Atom bundle with built-in auto installer
|
||||||
|
(be patient and let the installation complete)
|
||||||
|
|
||||||
|
- `Download PlatformIO IDE for Mac <https://sourceforge.net/projects/platformio-storage/files/ide-bundles/platformio-atom-windows.exe/download>`_
|
||||||
|
- `Download PlatformIO IDE for Windows <https://sourceforge.net/projects/platformio-storage/files/ide-bundles/platformio-atom-mac.zip/download>`_
|
||||||
|
- `Download PlatformIO IDE .deb <https://sourceforge.net/projects/platformio-storage/files/ide-bundles/platformio-atom-linux-amd64.deb/download>`_
|
||||||
|
- `Download PlatformIO IDE .rpm <https://sourceforge.net/projects/platformio-storage/files/ide-bundles/platformio-atom-linux-amd64.rpm/download>`_
|
||||||
|
|
||||||
|
Manual Installation
|
||||||
|
~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
1. Download and install the latest Atom text editor
|
||||||
|
|
||||||
|
- `Download Atom for Mac <https://atom.io/download/mac>`_
|
||||||
|
- `Download Atom for Windows <https://atom.io/download/windows>`_
|
||||||
|
- `Download Atom .deb <https://atom.io/download/deb>`_
|
||||||
|
- `Download Atom .rpm <https://atom.io/download/rpm>`_
|
||||||
- `Other platforms <https://github.com/atom/atom/releases/latest>`_
|
- `Other platforms <https://github.com/atom/atom/releases/latest>`_
|
||||||
|
|
||||||
|
|
||||||
@ -86,13 +104,13 @@ Each button contains hint (delay mouse on it).
|
|||||||
* PlatformIO: Build
|
* PlatformIO: Build
|
||||||
* PlatformIO: Upload
|
* PlatformIO: Upload
|
||||||
* PlatformIO: Clean
|
* PlatformIO: Clean
|
||||||
* Toggle build panel
|
|
||||||
* ||
|
* ||
|
||||||
* New File
|
* Initialize new PlatformIO Project or update existing...
|
||||||
* Add/Open Project Folder...
|
* Add/Open Project Folder...
|
||||||
* Find in Project...
|
* Find in Project...
|
||||||
* ||
|
* ||
|
||||||
* Terminal
|
* Terminal
|
||||||
|
* Library Manager
|
||||||
* Serial Ports
|
* Serial Ports
|
||||||
* Serial Monitor
|
* Serial Monitor
|
||||||
* ||
|
* ||
|
||||||
@ -106,14 +124,11 @@ Quickstart
|
|||||||
|
|
||||||
:Step 1:
|
:Step 1:
|
||||||
|
|
||||||
Create empty directory for the future project. Add it to PlatformIO IDE
|
Initialize new PlatformIO based project using button on the Toolbar or
|
||||||
using (folder) button on the Toolbar or ``Menu: File > Add Project
|
``Menu: PlatformIO > Initialize new PlatformIO Project or update existing...``.
|
||||||
Folder...``
|
|
||||||
|
|
||||||
:Step 2:
|
:Step 2:
|
||||||
|
|
||||||
Initialize new PlatformIO based project using ``Menu: PlatformIO >
|
|
||||||
Initialize new Project (or update existing)`` and select boards.
|
|
||||||
Put your source code ``*.h, *.c, *.cpp, *.S, *.ino, etc``. files to ``src``
|
Put your source code ``*.h, *.c, *.cpp, *.S, *.ino, etc``. files to ``src``
|
||||||
directory.
|
directory.
|
||||||
|
|
||||||
@ -138,10 +153,10 @@ Building / Uploading / Targets
|
|||||||
|
|
||||||
More details `Atom Build package <https://atom.io/packages/build>`_.
|
More details `Atom Build package <https://atom.io/packages/build>`_.
|
||||||
|
|
||||||
Code completion
|
Intelligent Code Autocompletion
|
||||||
~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
PlatformIO IDE uses `clang <http://clang.llvm.org>`_ for the code completion.
|
PlatformIO IDE uses `clang <http://clang.llvm.org>`_ for the Intelligent Code Autocompletion.
|
||||||
To check that ``clang`` is available in your system, please open
|
To check that ``clang`` is available in your system, please open
|
||||||
Terminal and run ``clang --version``. If ``clang`` is not installed, then install it:
|
Terminal and run ``clang --version``. If ``clang`` is not installed, then install it:
|
||||||
|
|
||||||
@ -158,13 +173,15 @@ Terminal and run ``clang --version``. If ``clang`` is not installed, then instal
|
|||||||
not be reflected in code linter. You need ``Menu: PlatformIO >
|
not be reflected in code linter. You need ``Menu: PlatformIO >
|
||||||
Rebuild C/C++ Project Index (Autocomplete, Linter)``.
|
Rebuild C/C++ Project Index (Autocomplete, Linter)``.
|
||||||
|
|
||||||
Code linter
|
.. _ide_atom_smart_code_linter:
|
||||||
~~~~~~~~~~~
|
|
||||||
|
|
||||||
PlatformIO IDE uses PlatformIO's pre-built GCC toolchains for code linting. The
|
Smart Code Linter
|
||||||
settings for Linter are located in ``.gcc-flags.json``. This file will be
|
~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
PlatformIO IDE uses PlatformIO's pre-built GCC toolchains for Smart Code Linter. The
|
||||||
|
configuration data are located in ``.gcc-flags.json``. This file will be
|
||||||
automatically created and preconfigured when you initialize project using
|
automatically created and preconfigured when you initialize project using
|
||||||
``Menu: PlatformIO > Initialize new Project (or update existing)``.
|
``Menu: PlatformIO > Initialize new PlatformIO Project or update existing...``.
|
||||||
|
|
||||||
.. warning::
|
.. warning::
|
||||||
The libraries which are added/installed after initializing process will
|
The libraries which are added/installed after initializing process will
|
||||||
@ -175,7 +192,7 @@ automatically created and preconfigured when you initialize project using
|
|||||||
.. error::
|
.. error::
|
||||||
If you have error like ``linter-gcc: Executable not found`` and
|
If you have error like ``linter-gcc: Executable not found`` and
|
||||||
``"***/.platformio/packages/toolchain-atmelavr/bin/avr-g++" not found``
|
``"***/.platformio/packages/toolchain-atmelavr/bin/avr-g++" not found``
|
||||||
please ``Menu: PlatformIO > Initialize new Project (or update existing)``.
|
please ``Menu: PlatformIO > Initialize new PlatformIO Project or update existing...``.
|
||||||
|
|
||||||
Install Shell Commands
|
Install Shell Commands
|
||||||
~~~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~~~
|
||||||
@ -185,6 +202,59 @@ PlatformIO > Install Shell Commands``. It will allow you to call PlatformIO from
|
|||||||
other process, terminal and etc.
|
other process, terminal and etc.
|
||||||
|
|
||||||
Known issues
|
Known issues
|
||||||
~~~~~~~~~~~~
|
------------
|
||||||
|
|
||||||
* Built-in Terminal doesn't support ``STDIN`` interaction
|
Smart Code Linter is disabled for Arduino files
|
||||||
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
:ref:`ide_atom_smart_code_linter` is disabled by default for 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.
|
||||||
|
|
||||||
|
There are two solutions:
|
||||||
|
|
||||||
|
Convert Arduino file to C++ manually
|
||||||
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
For example, we have the next ``Demo.ino`` file:
|
||||||
|
|
||||||
|
.. code-block:: c++
|
||||||
|
|
||||||
|
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 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:: c++
|
||||||
|
|
||||||
|
#include <Arduino.h>
|
||||||
|
|
||||||
|
void someFunction(int num);
|
||||||
|
|
||||||
|
void function setup () {
|
||||||
|
someFunction(13);
|
||||||
|
}
|
||||||
|
|
||||||
|
void function loop() {
|
||||||
|
delay(1000);
|
||||||
|
}
|
||||||
|
|
||||||
|
void someFunction(int num) {
|
||||||
|
}
|
||||||
|
Reference in New Issue
Block a user