diff --git a/docs/_static/ide-platformio-qtcreator-3.png b/docs/_static/ide-platformio-qtcreator-3.png index 8c908e38..b341e505 100644 Binary files a/docs/_static/ide-platformio-qtcreator-3.png and b/docs/_static/ide-platformio-qtcreator-3.png differ diff --git a/docs/ide/clion.rst b/docs/ide/clion.rst index f02001f2..5353fd06 100644 --- a/docs/ide/clion.rst +++ b/docs/ide/clion.rst @@ -33,8 +33,12 @@ Since PlatformIO 2.0 you can generate CLion compatible project using platformio init --ide clion --board %TYPE% -Then import this project from start menu or via ``File > Import Project>`` and -specify root directory where is located :ref:`projectconf`. +Then: + +1. Import this project via ``Menu: File > Import Project`` + and specify root directory where is located :ref:`projectconf` +2. Open source file from ``src`` directory (``*.c, *.cpp, *.ino, etc.``) +3. Build project: ``Menu: Run > Build``. There are 3 predefined targets for building: diff --git a/docs/ide/eclipse.rst b/docs/ide/eclipse.rst index 63f18c1e..753ff838 100644 --- a/docs/ide/eclipse.rst +++ b/docs/ide/eclipse.rst @@ -37,9 +37,14 @@ Since PlatformIO 2.0 you can generate Eclipse compatible project using platformio init --ide eclipse --board %TYPE% -Then import this project via ``File > Import... > General > Existing Projects -into Workspace > Next`` and specify root directory where is located -:ref:`projectconf`. +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.``) +3. Build project: ``Menu: Project > Build Project``. + Manual Integration ^^^^^^^^^^^^^^^^^^ diff --git a/docs/ide/qtcreator.rst b/docs/ide/qtcreator.rst index 772c6ac9..cb9b67a4 100644 --- a/docs/ide/qtcreator.rst +++ b/docs/ide/qtcreator.rst @@ -37,9 +37,43 @@ Since PlatformIO 2.0 you can generate Qt Creator compatible project using Then import this project via ``File > New File or Project > Import Project`` and specify root directory where is located :ref:`projectconf`. -After import need to delete default "build" & "clean" steps and configure -project with PlatformIO source code builder (click on Projects label on left -menu or ``Ctrl+5`` shortcut): + +Then: + +1. Import project via ``File > Open File or Project`` and select + ``platformio.pro`` from the folder where is located :ref:`projectconf` +2. Select default desktop kit and click on ``Configure Project`` (``Projects`` + mode, left panel) +3. Set ``General > Build directory`` to the project directory where + is located :ref:`projectconf` +4. Remove all items from ``Build Steps``, click on + ``Build Steps > Add Build Step > Custom Process Step`` and set: + + * **Command**: ``platformio`` + * **Arguments**: ``-f -c qtcreator run`` + * **Working directory**: ``%{buildDir}`` + +5. Remove all items from ``Clean Steps``, click on + ``Clean Steps > Add Clean Step > Custom Process Step`` and set: + + * **Command**: ``platformio`` + * **Arguments**: ``-f -c qtcreator run --target clean`` + * **Working directory**: ``%{buildDir}`` + +6. Update ``PATH`` in ``Build Environment > PATH > EDIT`` with the result of + this command (paste in Terminal): + +.. code-block:: shell + + # Linux, Mac + echo $PATH + + # Windows + echo %PATH% + +7. Switch to ``Edit`` mode (left panel) and open source file from ``src`` + directory (``*.c, *.cpp, *.ino, etc.``) +8. Build project: ``Menu: Build > Build All``. .. image:: ../_static/ide-platformio-qtcreator-3.png :target: http://docs.platformio.org/en/latest/_static/ide-platformio-qtcreator-3.png diff --git a/docs/ide/sublimetext.rst b/docs/ide/sublimetext.rst index c3cd928c..7241c25c 100644 --- a/docs/ide/sublimetext.rst +++ b/docs/ide/sublimetext.rst @@ -29,8 +29,14 @@ Since PlatformIO 2.0 you can generate Sublime Text compatible project using platformio init --ide sublimetext --board %TYPE% -Then import this project via ``Project > Open Project...`` and specify root -directory where is located :ref:`projectconf`. +Then: + +1. Import project via ``Menu: Project > Open Project...`` and select + ``platformio.sublime-project`` from the folder where is located :ref:`projectconf` +2. Select PlatformIO as build system: ``Menu: Tools > Build System > PlatformIO`` +3. Open source file from ``src`` directory (``*.c, *.cpp, *.ino, etc.``) +4. Build project: ``Menu: Tools > Build``. + Manual Integration ^^^^^^^^^^^^^^^^^^ diff --git a/docs/ide/visualstudio.rst b/docs/ide/visualstudio.rst index 4659e548..26885b39 100644 --- a/docs/ide/visualstudio.rst +++ b/docs/ide/visualstudio.rst @@ -34,8 +34,12 @@ Since PlatformIO 2.0 you can generate Visual Studio compatible project using platformio init --ide visualstudio --board %TYPE% -Then import this project via ``File->Open->Project/Solution`` and specify root -directory where is located :ref:`projectconf`. +Then: + +1. Import this project via ``Menu: File > Open > Project/Solution`` + and specify root directory where is located :ref:`projectconf` +2. Open source file from ``src`` directory (``*.c, *.cpp, *.ino, etc.``) +3. Build project: ``Menu: Build > Build Solution``. Manual Integration ^^^^^^^^^^^^^^^^^^ diff --git a/examples/ide/clion/.idea/clion.iml b/examples/ide/clion/.idea/clion.iml index bc2cd874..352882ec 100644 --- a/examples/ide/clion/.idea/clion.iml +++ b/examples/ide/clion/.idea/clion.iml @@ -1,7 +1,9 @@ - + + + diff --git a/examples/ide/clion/.idea/misc.xml b/examples/ide/clion/.idea/misc.xml new file mode 100644 index 00000000..6b328020 --- /dev/null +++ b/examples/ide/clion/.idea/misc.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/examples/ide/clion/.idea/vcs.xml b/examples/ide/clion/.idea/vcs.xml new file mode 100644 index 00000000..6564d52d --- /dev/null +++ b/examples/ide/clion/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/examples/ide/clion/.idea/workspace.xml b/examples/ide/clion/.idea/workspace.xml index da64747e..214a2cba 100644 --- a/examples/ide/clion/.idea/workspace.xml +++ b/examples/ide/clion/.idea/workspace.xml @@ -2,13 +2,13 @@ - - - - - - - + + + + + + + @@ -33,25 +33,25 @@ - + - - + + - - + + - + @@ -67,8 +67,8 @@ - @@ -116,13 +116,13 @@ - - + + @@ -173,15 +173,15 @@ - + - + - + @@ -206,27 +206,27 @@ - + - + + + + + + + - - - - - - - - - - + + + + @@ -240,12 +240,35 @@ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/examples/ide/clion/CMakeLists.txt b/examples/ide/clion/CMakeLists.txt index 81e7ec23..06cc9517 100644 --- a/examples/ide/clion/CMakeLists.txt +++ b/examples/ide/clion/CMakeLists.txt @@ -1,5 +1,5 @@ cmake_minimum_required(VERSION 3.2) -project(clion) +project(PlatformIO) set(PLATFORMIO_CMD platformio) diff --git a/examples/ide/qtcreator/src/main.c b/examples/ide/clion/src/blink.cpp similarity index 100% rename from examples/ide/qtcreator/src/main.c rename to examples/ide/clion/src/blink.cpp diff --git a/examples/ide/eclipse/.cproject b/examples/ide/eclipse/.cproject index f470a6b4..a8e197bf 100644 --- a/examples/ide/eclipse/.cproject +++ b/examples/ide/eclipse/.cproject @@ -15,7 +15,7 @@ - + @@ -86,7 +86,7 @@ - + diff --git a/examples/ide/eclipse/.project b/examples/ide/eclipse/.project index acbd3183..7d8cd85e 100644 --- a/examples/ide/eclipse/.project +++ b/examples/ide/eclipse/.project @@ -1,6 +1,6 @@ - eclipse + PlatformIO diff --git a/examples/ide/clion/src/blink.ino b/examples/ide/eclipse/src/blink.cpp similarity index 94% rename from examples/ide/clion/src/blink.ino rename to examples/ide/eclipse/src/blink.cpp index 807607e2..262a6310 100644 --- a/examples/ide/clion/src/blink.ino +++ b/examples/ide/eclipse/src/blink.cpp @@ -1,3 +1,5 @@ +#include "Arduino.h" + // Most Arduino boards already have a LED attached to pin 13 on the board itself #define LED_PIN 13 diff --git a/examples/ide/qtcreator/platformio.pro b/examples/ide/qtcreator/platformio.pro index 5caa33a2..19dedbdf 100644 --- a/examples/ide/qtcreator/platformio.pro +++ b/examples/ide/qtcreator/platformio.pro @@ -23,4 +23,4 @@ OTHER_FILES += \ platformio.ini SOURCES += \ - src/main.c + src/blink.cpp diff --git a/examples/ide/eclipse/src/blink.ino b/examples/ide/qtcreator/src/blink.cpp similarity index 94% rename from examples/ide/eclipse/src/blink.ino rename to examples/ide/qtcreator/src/blink.cpp index 807607e2..262a6310 100644 --- a/examples/ide/eclipse/src/blink.ino +++ b/examples/ide/qtcreator/src/blink.cpp @@ -1,3 +1,5 @@ +#include "Arduino.h" + // Most Arduino boards already have a LED attached to pin 13 on the board itself #define LED_PIN 13 diff --git a/examples/ide/sublimetext/platformio.ini b/examples/ide/sublimetext/platformio.ini index 758fd356..7e183bf7 100644 --- a/examples/ide/sublimetext/platformio.ini +++ b/examples/ide/sublimetext/platformio.ini @@ -17,8 +17,8 @@ # Automatic targets - enable auto-uploading # targets = upload -[env:leonardo] +[env:uno] platform = atmelavr framework = arduino -board = leonardo +board = uno # targets = upload diff --git a/examples/ide/sublimetext/platformio.sublime-project b/examples/ide/sublimetext/platformio.sublime-project index 8e810e03..88a0f925 100644 --- a/examples/ide/sublimetext/platformio.sublime-project +++ b/examples/ide/sublimetext/platformio.sublime-project @@ -34,7 +34,8 @@ "name": "Upload" } ], - "working_dir": "${project_path:${folder}}" + "working_dir": "${project_path:${folder}}", + "selector": "source.c, source.c++" } ], "folders": diff --git a/examples/ide/sublimetext/src/blink.ino b/examples/ide/sublimetext/src/blink.cpp similarity index 94% rename from examples/ide/sublimetext/src/blink.ino rename to examples/ide/sublimetext/src/blink.cpp index 807607e2..262a6310 100644 --- a/examples/ide/sublimetext/src/blink.ino +++ b/examples/ide/sublimetext/src/blink.cpp @@ -1,3 +1,5 @@ +#include "Arduino.h" + // Most Arduino boards already have a LED attached to pin 13 on the board itself #define LED_PIN 13 diff --git a/examples/ide/visualstudio/src/blink.ino b/examples/ide/visualstudio/src/blink.cpp similarity index 94% rename from examples/ide/visualstudio/src/blink.ino rename to examples/ide/visualstudio/src/blink.cpp index 807607e2..262a6310 100644 --- a/examples/ide/visualstudio/src/blink.ino +++ b/examples/ide/visualstudio/src/blink.cpp @@ -1,3 +1,5 @@ +#include "Arduino.h" + // Most Arduino boards already have a LED attached to pin 13 on the board itself #define LED_PIN 13 diff --git a/platformio/__init__.py b/platformio/__init__.py index 1da24c3b..54c159e3 100644 --- a/platformio/__init__.py +++ b/platformio/__init__.py @@ -1,7 +1,7 @@ # Copyright (C) Ivan Kravets # See LICENSE for details. -VERSION = (2, 3, "0b3") +VERSION = (2, 3, "0rc1") __version__ = ".".join([str(s) for s in VERSION]) __title__ = "platformio" diff --git a/platformio/ide/tpls/eclipse/.settings/org.eclipse.cdt.core.prefs.tpl b/platformio/ide/tpls/eclipse/.settings/org.eclipse.cdt.core.prefs.tpl index 92bd1fde..8cac7fbd 100644 --- a/platformio/ide/tpls/eclipse/.settings/org.eclipse.cdt.core.prefs.tpl +++ b/platformio/ide/tpls/eclipse/.settings/org.eclipse.cdt.core.prefs.tpl @@ -3,4 +3,4 @@ environment/project/0.910961921/PATH/delimiter={{env_pathsep.replace(":", "\\:") environment/project/0.910961921/PATH/operation=replace environment/project/0.910961921/PATH/value={{env_path.replace(":", "\\:")}} environment/project/0.910961921/append=true -environment/project/0.910961921/appendContributed=false +environment/project/0.910961921/appendContributed=true \ No newline at end of file diff --git a/platformio/ide/tpls/sublimetext/platformio.sublime-project.tpl b/platformio/ide/tpls/sublimetext/platformio.sublime-project.tpl index 4a3a1ada..88712354 100644 --- a/platformio/ide/tpls/sublimetext/platformio.sublime-project.tpl +++ b/platformio/ide/tpls/sublimetext/platformio.sublime-project.tpl @@ -8,7 +8,6 @@ "-f", "-c", "sublimetext", "run" ], - "path": "{{env_path}}", "name": "PlatformIO", "variants": [ @@ -35,7 +34,9 @@ "name": "Upload" } ], - "working_dir": "${project_path:${folder}}" + "working_dir": "${project_path:${folder}}", + "selector": "source.c, source.c++", + "path": "{{env_path}}" } ], "folders": diff --git a/platformio/telemetry.py b/platformio/telemetry.py index 29efc900..9f1c3c89 100644 --- a/platformio/telemetry.py +++ b/platformio/telemetry.py @@ -93,8 +93,8 @@ class MeasurementProtocol(TelemetryBase): self['cd1'] = util.get_systype() self['cd2'] = "Python/%s %s" % (platform.python_version(), platform.platform()) - self['cd4'] = (1 if app.get_setting("enable_prompts") and - not app.get_session_var("caller_id") else 0) + self['cd4'] = (1 if app.get_setting("enable_prompts") or + app.get_session_var("caller_id") else 0) def _prefill_screen_name(self): self['cd3'] = " ".join([str(s).lower() for s in sys.argv[1:]])