From 2faa2e003ae66e6c931725a4a4a05c43683eb678 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Sat, 20 Feb 2016 01:06:25 +0200 Subject: [PATCH] Place links to PlatformIO IDE --- docs/ide/_platformio_ide_extra.rst | 32 ++++++++++++++++++++++++++++++ docs/ide/arduino.rst | 2 ++ docs/ide/atom.rst | 31 ++++++++++++++++++++++++++++- docs/ide/clion.rst | 2 ++ docs/ide/eclipse.rst | 2 ++ docs/ide/emacs.rst | 2 ++ docs/ide/energia.rst | 2 ++ docs/ide/qtcreator.rst | 2 ++ docs/ide/sublimetext.rst | 2 ++ docs/ide/vim.rst | 2 ++ docs/ide/visualstudio.rst | 2 ++ docs/installation.rst | 30 +++++++++++++--------------- docs/quickstart.rst | 14 ++++++++++--- 13 files changed, 105 insertions(+), 20 deletions(-) create mode 100644 docs/ide/_platformio_ide_extra.rst diff --git a/docs/ide/_platformio_ide_extra.rst b/docs/ide/_platformio_ide_extra.rst new file mode 100644 index 00000000..5f52c985 --- /dev/null +++ b/docs/ide/_platformio_ide_extra.rst @@ -0,0 +1,32 @@ +.. Copyright 2014-2016 Ivan Kravets + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + http://www.apache.org/licenses/LICENSE-2.0 + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +.. note:: + We are proud to present our official `PlatformIO IDE `_ - + The next generation integrated development environment for IoT. + + * Cross-platform code builder without external dependencies to the system + software: + + - 200+ embedded boards + - 15+ development platforms + - 10+ frameworks + + * C/C++ Intelligent code completion + * C/C++ Smart code linter for super-fast coding + * Library Manager for the hundreds popular libraries + * Multi-projects workflow with multiple panes + * Multiple panes + * Themes support with dark and light colors + * Serial Port Monitor + * Built-in Terminal with :ref:`PlatformIO CLI ` tool (``pio``, ``platformio``) + + `Install PlatformIO IDE `_. diff --git a/docs/ide/arduino.rst b/docs/ide/arduino.rst index 5c36da12..8d08d18a 100644 --- a/docs/ide/arduino.rst +++ b/docs/ide/arduino.rst @@ -14,6 +14,8 @@ Arduino ======= +.. include:: _platformio_ide_extra.rst + The open-source `Arduino Software (IDE) `_ makes it easy to write code and upload it to the board. It runs on *Windows, Mac OS X, and Linux*. The environment is written in *Java* and based on diff --git a/docs/ide/atom.rst b/docs/ide/atom.rst index 9fb75763..c25d78f8 100644 --- a/docs/ide/atom.rst +++ b/docs/ide/atom.rst @@ -32,6 +32,7 @@ PlatformIO IDE is the next generation integrated development environment for IoT * Serial Port Monitor * Built-in Terminal with :ref:`PlatformIO CLI ` tool (``pio``, ``platformio``) + PlatformIO IDE is based on GitHub's `Atom `_ source code editor that's modern, approachable, yet hackable to the core; a tool you can customize to do anything but also use productively without ever touching a @@ -216,6 +217,11 @@ source files: There are two solutions: +.. contents:: + :local: + +.. _ide_atom_knownissues_sclarduino_manually: + Convert Arduino file to C++ manually ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -236,7 +242,7 @@ For example, we have the next ``Demo.ino`` file: Let's convert it to ``Demo.cpp``: -1. Add ``#include `` at the top of file +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. @@ -258,3 +264,26 @@ The final ``Demo.cpp``: void someFunction(int num) { } + +Force Arduino file as C++ +^^^^^^^^^^^^^^^^^^^^^^^^^ + +To force Smart Code Linter to use Arduino files as C++ please + +1. Open ``.gcc-flags.json`` file from the Initialized/Imported project. Add + ``-x c`` option at the beginning to ``gccDefaultCFlags`` and ``gccDefaultCppFlags`` + fields: + +.. code-block:: json + + { + "execPath": "...", + "gccDefaultCFlags": "-x c -fsyntax-only ...", + "gccDefaultCppFlags": "-x c -fsyntax-only ...", + "gccErrorLimit": 15, + "gccIncludePaths": "...", + "gccSuppressWarnings": false + } + +2. Perform all steps from :ref:`ide_atom_knownissues_sclarduino_manually` + (without renaming to ``.cpp``). diff --git a/docs/ide/clion.rst b/docs/ide/clion.rst index 4ab28138..2dc5fa7c 100644 --- a/docs/ide/clion.rst +++ b/docs/ide/clion.rst @@ -14,6 +14,8 @@ CLion ===== +.. include:: _platformio_ide_extra.rst + The `CLion `_ is a cross-platform C/C++ IDE for Linux, OS X, and Windows integrated with the CMake build system. The initial version will support the GCC and Clang compilers and GDB debugger. diff --git a/docs/ide/eclipse.rst b/docs/ide/eclipse.rst index 006cf97a..5682ff59 100644 --- a/docs/ide/eclipse.rst +++ b/docs/ide/eclipse.rst @@ -14,6 +14,8 @@ Eclipse ======= +.. include:: _platformio_ide_extra.rst + The `Eclipse CDT (C/C++ Development Tooling) `_ Project provides a fully functional C and C++ Integrated Development Environment based on the Eclipse platform. Features include: support for diff --git a/docs/ide/emacs.rst b/docs/ide/emacs.rst index 5e1e19c4..5b489a5d 100644 --- a/docs/ide/emacs.rst +++ b/docs/ide/emacs.rst @@ -14,6 +14,8 @@ Emacs ===== +.. include:: _platformio_ide_extra.rst + GNU Emacs is an extensible, customizable text editor - and more. At its core is an interpreter for Emacs Lisp, a dialect of the `Lisp programming language `_ diff --git a/docs/ide/energia.rst b/docs/ide/energia.rst index 0fd91280..4fa35811 100644 --- a/docs/ide/energia.rst +++ b/docs/ide/energia.rst @@ -14,6 +14,8 @@ Energia ======= +.. include:: _platformio_ide_extra.rst + The open-source `Energia Software (IDE) `_ makes it easy to write code and upload it to the board. It runs on *Windows, Mac OS X, and Linux*. The environment is written in *Java* and based on diff --git a/docs/ide/qtcreator.rst b/docs/ide/qtcreator.rst index c9433ce4..4accc543 100644 --- a/docs/ide/qtcreator.rst +++ b/docs/ide/qtcreator.rst @@ -14,6 +14,8 @@ Qt Creator ========== +.. include:: _platformio_ide_extra.rst + The `Qt Creator `_ is an open source cross-platform integrated development environment. The editor includes such features as syntax highlighting for various languages, project manager, integrated version control systems, rapid code navigation tools and code autocompletion. This software can be used with: diff --git a/docs/ide/sublimetext.rst b/docs/ide/sublimetext.rst index 7e19c468..f6060c42 100644 --- a/docs/ide/sublimetext.rst +++ b/docs/ide/sublimetext.rst @@ -14,6 +14,8 @@ Sublime Text ============ +.. include:: _platformio_ide_extra.rst + The `Sublime Text `_ is a cross-platform text and source code editor, with a Python application programming interface (API). Sublime Text is proprietary software. Its functionality is extendable with plugins. Most of the extending packages have free-software licenses and are community-built and maintained. Sublime Text lacks graphical setting dialogues and is entirely configured by editing text files. This software can be used with: diff --git a/docs/ide/vim.rst b/docs/ide/vim.rst index e5e9c749..0eab85af 100644 --- a/docs/ide/vim.rst +++ b/docs/ide/vim.rst @@ -14,6 +14,8 @@ VIM === +.. include:: _platformio_ide_extra.rst + `VIM `_ is an open-source, powerful and configurable text editor. Vim is designed for use both from a command-line interface and as a standalone application in a graphical user interface. diff --git a/docs/ide/visualstudio.rst b/docs/ide/visualstudio.rst index dfef7a9e..1893b6c0 100644 --- a/docs/ide/visualstudio.rst +++ b/docs/ide/visualstudio.rst @@ -14,6 +14,8 @@ Visual Studio ============= +.. include:: _platformio_ide_extra.rst + The `Microsoft Visual Studio (Free) `_ is an integrated development environment (IDE) from Microsoft. Visual Studio includes a code editor supporting IntelliSense (the code completion component) as well as code refactoring. This software can be used with: diff --git a/docs/installation.rst b/docs/installation.rst index 2343516d..91a2657e 100644 --- a/docs/installation.rst +++ b/docs/installation.rst @@ -9,24 +9,19 @@ See the License for the specific language governing permissions and limitations under the License. -.. _installation: + .. _installation: Installation ============ +.. include:: /ide/_platformio_ide_extra.rst + **PlatformIO** is written in `Python `_ and works on Mac OS X, Linux, Windows OS and *ARM*-based credit-card sized computers (`Raspberry Pi `_, `BeagleBone `_, `CubieBoard `_). -.. note:: - We are glad to announce official :ref:`ide_atom` which provides - comprehensive facilities for IoT development: built-in PlatformIO CLI tool, - Terminal and other instruments. - - Try :ref:`ide_atom` for free now! - .. contents:: System requirements @@ -55,8 +50,11 @@ Installation Methods Please *choose ONE of* the following methods: -a) Python Package Manager -~~~~~~~~~~~~~~~~~~~~~~~~~ +.. contents:: + :local: + +Python Package Manager +~~~~~~~~~~~~~~~~~~~~~~ The latest stable version of PlatformIO may be installed or upgraded via Python Package Manager (`pip `_) as follows: @@ -80,8 +78,8 @@ a few options here: .. _installation_installer_script: -b) Installer Script -~~~~~~~~~~~~~~~~~~~ +Installer Script +~~~~~~~~~~~~~~~~ Super-Quick (Mac / Linux) ''''''''''''''''''''''''' @@ -120,8 +118,8 @@ On *Windows OS* it may look like: # run it C:\Python27\python.exe get-platformio.py -c) Full Guide -~~~~~~~~~~~~~ +Full Guide +~~~~~~~~~~ 1. Check a ``python`` version (only 2.6-2.7 is supported): @@ -149,8 +147,8 @@ For upgrading ``platformio`` to the latest version: pip install -U platformio -d) Development Version -~~~~~~~~~~~~~~~~~~~~~~ +Development Version +~~~~~~~~~~~~~~~~~~~ Install the latest PlatformIO from the ``develop`` branch: diff --git a/docs/quickstart.rst b/docs/quickstart.rst index af6dcc84..cc97db5f 100644 --- a/docs/quickstart.rst +++ b/docs/quickstart.rst @@ -14,11 +14,19 @@ Quickstart ========== -.. hint:: +.. note:: Please read `Get Started `_ - article from the official WebSite. + from the official WebSite. -1. :ref:`Install PlatformIO `. +PlatformIO IDE +-------------- + +Please follow to the Quickstart section of :ref:`ide_atom`. + +PlatformIO CLI +-------------- + +1. :ref:`Install PlatformIO CLI `. 2. Find board ``type`` using `Embedded Boards Explorer `_ or via :ref:`cmd_boards` command.