2016-01-01 20:51:48 +02:00
|
|
|
.. Copyright 2014-2016 Ivan Kravets <me@ikravets.com>
|
2015-11-18 17:33:46 +02:00
|
|
|
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-03-25 13:22:39 +02:00
|
|
|
.. _ide_eclipse:
|
|
|
|
|
|
|
|
Eclipse
|
|
|
|
=======
|
|
|
|
|
|
|
|
The `Eclipse CDT (C/C++ Development Tooling) <https://eclipse.org/cdt/>`_
|
|
|
|
Project provides a fully functional C and C++ Integrated Development
|
|
|
|
Environment based on the Eclipse platform. Features include: support for
|
|
|
|
project creation and managed build for various toolchains, standard make
|
|
|
|
build, source navigation, various source knowledge tools, such as type
|
|
|
|
hierarchy, call graph, include browser, macro definition browser, code editor
|
|
|
|
with syntax highlighting, folding and hyperlink navigation, source code
|
|
|
|
refactoring and code generation, visual debugging tools, including memory,
|
|
|
|
registers, and disassembly viewers.
|
|
|
|
|
|
|
|
Refer to the `CDT Documentation <https://eclipse.org/cdt/documentation.php>`_
|
|
|
|
page for more detailed information.
|
|
|
|
|
2016-03-07 21:30:06 +02:00
|
|
|
.. image:: ../_static/ide-platformio-eclipse.png
|
|
|
|
:target: http://docs.platformio.org/en/latest/_static/ide-platformio-eclipse.png
|
|
|
|
|
2015-05-22 21:05:38 +03:00
|
|
|
.. contents::
|
|
|
|
|
2015-03-25 13:22:39 +02:00
|
|
|
Integration
|
|
|
|
-----------
|
|
|
|
|
2016-03-12 21:32:13 +02:00
|
|
|
Choose board ``type`` using :ref:`cmd_boards` or `Embedded Boards Explorer <http://platformio.org/boards>`_
|
2015-12-25 01:06:55 +02:00
|
|
|
command and generate project via :option:`platformio init --ide` command:
|
2015-05-22 21:05:38 +03:00
|
|
|
|
|
|
|
.. code-block:: shell
|
|
|
|
|
2015-05-26 22:55:59 +03:00
|
|
|
platformio init --ide eclipse --board %TYPE%
|
2015-05-22 21:05:38 +03:00
|
|
|
|
2015-12-25 01:06:55 +02:00
|
|
|
# For example, generate project for Arduino UNO
|
|
|
|
platformio init --ide eclipse --board uno
|
|
|
|
|
2015-09-05 20:50:30 +03:00
|
|
|
Then:
|
|
|
|
|
|
|
|
1. Import this project via
|
|
|
|
``Menu: File > Import... > General > Existing Projects into Workspace > Next``
|
|
|
|
and specify root directory where is located :ref:`projectconf`
|
|
|
|
2. Open source file from ``src`` directory (``*.c, *.cpp, *.ino, etc.``)
|
2016-01-03 03:02:21 +02:00
|
|
|
3. Build project using ``Menu: Project > Build Project`` or preconfigured
|
|
|
|
Make Targets (see screenshot below):
|
|
|
|
|
2016-01-05 02:15:43 +02:00
|
|
|
+ ``PlatformIO: Build`` - Build project without auto-uploading
|
|
|
|
+ ``PlatformIO: Clean`` - Clean compiled objects.
|
|
|
|
+ ``PlatformIO: Upload`` - Build and upload (if no errors)
|
2016-01-03 03:02:21 +02:00
|
|
|
+ ``PlatformIO: Upload using Programmer`` see :ref:`atmelavr_upload_via_programmer`
|
|
|
|
+ ``PlatformIO: Upload SPIFFS image`` see :ref:`platform_espressif_uploadfs`
|
2016-01-05 02:26:37 +02:00
|
|
|
+ ``PlatformIO: Update platforms and libraries`` - Update installed platforms and libraries via :ref:`cmd_update`.
|
2016-01-05 02:15:43 +02:00
|
|
|
|
|
|
|
If you have some problems with unresolved includes, defines, etc., then
|
|
|
|
|
|
|
|
* Restart Eclipse IDE
|
|
|
|
* Rebuild index using ``Menu: Project > C/C++ Index > Rebuild``.
|
2015-09-05 20:50:30 +03:00
|
|
|
|
2015-12-03 17:49:26 +02:00
|
|
|
.. warning::
|
|
|
|
The libraries which are added, installed or used in the project
|
|
|
|
after generating process wont be reflected in IDE. To fix it you
|
|
|
|
need to reinitialize project using :ref:`cmd_init` (repeat it).
|
2015-05-22 21:05:38 +03:00
|
|
|
|
2016-05-07 00:16:39 +03:00
|
|
|
Live Integration
|
|
|
|
----------------
|
|
|
|
|
|
|
|
Eclipse Virtual IoT Meetup: `PlatformIO: a cross-platform IoT solution to build them all! <http://www.meetup.com/Virtual-IoT/events/229964142/>`_
|
|
|
|
|
|
|
|
.. image:: ../_static/ide-eclipse-virtualiot.jpg
|
|
|
|
:target: https://www.youtube.com/watch?v=6t7UbX812Yw
|
|
|
|
|
2015-12-02 23:51:07 +02:00
|
|
|
Articles / Manuals
|
|
|
|
------------------
|
2015-05-22 21:05:38 +03:00
|
|
|
|
2016-05-07 00:16:39 +03:00
|
|
|
* May 05, 2016 - **Ivan Kravets, Ph.D. / Eclipse Virtual IoT Meetup** - `PlatformIO: a cross-platform IoT solution to build them all! <http://www.meetup.com/Virtual-IoT/events/229964142/>`_
|
2015-12-25 01:06:55 +02:00
|
|
|
* Sep 01, 2015 - **Thomas P. Weldon, Ph.D.** - `Improvised MBED FRDM-K64F Eclipse/PlatformIO Setup and Software Installation <http://thomasweldon.com/tpw/courses/embeddsp/p00pcFrdmK64_eclipsePlatformioSetup.html>`_
|
|
|
|
* Jul 11, 2015 - **TrojanC** - `Learning Arduino GitHub Repository <http://www.trojanc.co.za/2015/07/11/learning-arduino-github-repository/>`_
|
|
|
|
* June 20, 2014 - **Ivan Kravets, Ph.D.** - `Building and debugging Atmel AVR (Arduino-based) project using Eclipse IDE+PlatformIO <http://www.ikravets.com/computer-life/programming/2014/06/20/building-and-debugging-atmel-avr-arduino-based-project-using-eclipse-ideplatformio>`_
|
2015-12-02 23:51:07 +02:00
|
|
|
|
|
|
|
See a full list with :ref:`articles`.
|
2015-03-25 13:22:39 +02:00
|
|
|
|
2015-09-04 23:48:57 +03:00
|
|
|
Examples
|
|
|
|
--------
|
|
|
|
|
|
|
|
"Blink" Project
|
|
|
|
^^^^^^^^^^^^^^^
|
|
|
|
|
2016-04-23 20:21:04 +03:00
|
|
|
Source code of `Eclipse "Blink" Project <https://github.com/platformio/platformio-examples/tree/develop/ide/eclipse>`_.
|