Files
platformio-core/docs/ide/atom.rst

162 lines
5.8 KiB
ReStructuredText
Raw Normal View History

2016-01-01 20:51:48 +02:00
.. Copyright 2014-2016 Ivan Kravets <me@ikravets.com>
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.
2015-07-23 19:25:10 +03:00
.. _ide_atom:
PlatformIO IDE for Atom
=======================
2015-07-23 19:25:10 +03:00
PlatformIO IDE for `Atom <https://atom.io>`_ is the missing integrated
development environment which provides comprehensive facilities
for IoT development:
2015-07-23 19:25:10 +03:00
* Cross-platform builder without external dependencies to the system
software:
2015-07-23 19:25:10 +03:00
- 200+ embedded boards
- 15+ development platforms
- 10+ frameworks
2016-01-25 23:43:11 +02:00
* C/C++ Intelligent code completion
2016-01-26 01:02:14 +02:00
* C/C++ Smart code linter
2016-01-25 23:43:11 +02:00
* Library Manager for the hundreds popular libraries
* Built-in Terminal with :ref:`PlatformIO CLI <userguide>` (``pio``, ``platformio``)
2015-07-23 19:25:10 +03:00
Atom is a source code editor that's modern, approachable,
2016-01-24 01:14:01 +02:00
yet hackable to the core—a tool you can customize to do anything but also use
productively without ever touching a config file.
2016-01-25 01:05:54 +02:00
2015-07-23 19:25:10 +03:00
.. contents::
Installation
------------
2016-01-29 23:52:14 +02:00
1. Download and install Atom source code editor
2016-01-25 01:05:54 +02:00
2016-01-29 23:52:14 +02:00
- `Download for Mac <https://atom.io/download/mac>`_
- `Download for Windows <https://atom.io/download/windows>`_
- `Download .deb <https://atom.io/download/deb>`_
- `Download .rpm <https://atom.io/download/rpm>`_
- `Other platforms <https://github.com/atom/atom/releases/latest>`_
2016-01-25 01:05:54 +02:00
2016-01-29 23:52:14 +02:00
2. Open Atom Package Manager and search for `platformio-ide <https://atom.io/packages/platformio-ide>`_
2016-01-29 23:52:14 +02:00
- **Mac OS X**: ``Menu: Atom > Preferences > Install``
- **Windows**: ``Menu: File > Settings > Install``
- **Linux**: ``Menu: Edit > Preferences > Install``
2016-01-25 01:05:54 +02:00
2016-01-29 23:52:14 +02:00
.. image:: ../_static/ide-atom-platformio-install.png
User Guide
----------
2016-01-25 01:05:54 +02:00
.. image:: ../_static/ide-atom-platformio.png
:target: http://docs.platformio.org/en/latest/_images/ide-atom-platformio.png
Menu item ``PlatformIO``
~~~~~~~~~~~~~~~~~~~~~~~~
`platformio-ide <https://atom.io/packages/platformio-ide>`_ package adds to Atom
new menu item named ``Menu: PlatformIO`` (after ``Menu: Help`` item).
2016-01-25 01:05:54 +02:00
.. image:: ../_static/ide-atom-platformio-menu-item.png
2016-01-29 23:52:14 +02:00
PlatformIO Toolbar
~~~~~~~~~~~~~~~~~~
PlatformIO IDE Toolbar contains the quick access button to the popular commands.
Each button contains hint (delay mouse on it).
.. image:: ../_static/ide-atom-platformio-toolbar.png
* PlatformIO: Build
* PlatformIO: Clean
* Toggle build panel
* |
* New File
* Add/Open Project Folder...
* Find in Project...
* |
* Terminal
* Serial Ports
* Serial Monitor
* |
* Settings
* PlatformIO Documentation
Building / Uploading / Targets
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2015-07-23 19:25:10 +03:00
* ``cmd-alt-b`` / ``ctrl-alt-b`` / ``f9`` builds project without auto-uploading.
* ``cmd-alt-u`` / ``ctrl-alt-u`` builds and uploads (if no errors).
* ``cmd-alt-c`` / ``ctrl-alt-c`` cleans compiled objects.
* ``cmd-alt-t`` / ``ctrl-alt-t`` / ``f7`` run other targets (Upload using Programmer, Upload SPIFFS image, Update platforms and libraries).
* ``cmd-alt-g`` / ``ctrl-alt-g`` / ``f4`` cycles through causes of build error.
* ``cmd-alt-h`` / ``ctrl-alt-h`` / ``shift-f4`` goes to the first build error.
* ``cmd-alt-v`` / ``ctrl-alt-v`` / ``f8`` toggles the build panel.
* ``escape`` terminates build / closes the build window.
2015-12-02 23:51:07 +02:00
More details `Atom Build package <https://atom.io/packages/build>`_.
2015-12-02 23:51:07 +02:00
2016-01-25 23:43:11 +02:00
Code completion
~~~~~~~~~~~~~~~
2015-12-02 23:51:07 +02:00
2016-01-25 23:43:11 +02:00
PlatformIO IDE uses `clang <http://clang.llvm.org>`_ for the code completion.
To check that ``clang`` is available in your system, please open
Terminal and run ``clang --version``. If ``clang`` is not installed, then install it:
2015-07-23 19:25:10 +03:00
- **Mac OS X**: Install the latest Xcode along with the latest Command Line Tools
(they are installed automatically when you run ``clang`` in Terminal for the
first time, or manually by running ``xcode-select --install``
- **Windows**: Download the latest `Clang for Windows <http://llvm.org/releases/download.html>`_.
Please select "Add LLVM to the system PATH" option on the installation step.
- **Linux**: Using package managers: ``apt-get install clang`` or ``yum install clang``.
- **Other Systems**: Download the latest `Clang for the other systems <http://llvm.org/releases/download.html>`_.
2015-07-23 19:25:10 +03:00
2016-01-25 23:43:11 +02:00
.. warning::
2016-01-29 23:52:14 +02:00
The libraries which are added/installed after initializing process will
not be reflected in code linter. You need ``Menu: PlatformIO >
Rebuild C/C++ Project Index (Autocomplete, Linter)``.
2016-01-25 23:43:11 +02:00
Code linter
~~~~~~~~~~~
2015-07-23 19:25:10 +03:00
2016-01-29 23:52:14 +02:00
PlatformIO IDE uses PlatformIO's pre-built GCC toolchains for code linting. The
settings for Linter are located in ``.gcc-flags.json``. This file will be
automatically created and preconfigured when you initialize project using
2016-01-25 23:43:11 +02:00
``Menu: PlatformIO > Initialize new Project (or update existing)``.
2015-07-23 19:25:10 +03:00
2016-01-25 23:43:11 +02:00
.. warning::
2016-01-29 23:52:14 +02:00
The libraries which are added/installed after initializing process will
not be reflected in code linter. You need ``Menu: PlatformIO >
Rebuild C/C++ Project Index (Autocomplete, Linter)``.
.. error::
If you have error like ``linter-gcc: Executable not found`` and
``"***/.platformio/packages/toolchain-atmelavr/bin/avr-g++" not found``
please ``Menu: PlatformIO > Initialize new Project (or update existing)``.
2016-01-25 01:05:54 +02:00
Install Shell Commands
~~~~~~~~~~~~~~~~~~~~~~
To install ``platformio`` and ``pio`` shell commands please use ``Menu:
PlatformIO > Install Shell Commands``. It will allow you to call PlatformIO from
2016-01-29 23:52:14 +02:00
other process, terminal and etc.
2016-01-25 23:43:11 +02:00
Known issues
~~~~~~~~~~~~
* Built-in Terminal doesn't support ``STDIN`` interaction