mirror of
https://github.com/platformio/platformio-core.git
synced 2025-07-29 17:47:14 +02:00
Update IDE integration instructions for Qt Creator and VisualStudio
This commit is contained in:
BIN
docs/_static/ide-platformio-qtcreator-4.png
vendored
BIN
docs/_static/ide-platformio-qtcreator-4.png
vendored
Binary file not shown.
Before Width: | Height: | Size: 67 KiB After Width: | Height: | Size: 66 KiB |
@ -32,6 +32,11 @@ 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, we need to delete default build and clean steps and configure project with PlatformIO source code builder (click on Projects label on left menu or ``Ctrl+5`` shortcut):
|
||||
|
||||
.. image:: ../_static/ide-platformio-qtcreator-3.png
|
||||
:target: ../_static/ide-platformio-qtcreator-3.png
|
||||
|
||||
Manual Integration
|
||||
^^^^^^^^^^^^^^^^^^
|
||||
|
||||
@ -41,14 +46,16 @@ Setup New Project
|
||||
First of all, let's create new project from Qt Creator Start Page: ``New Project`` or using ``Menu: File > New File or Project``, then select project with ``Empty Qt Project`` type (``Other Project > Empty Qt Project``), fill ``Name``, ``Create in``.
|
||||
|
||||
.. image:: ../_static/ide-platformio-qtcreator-1.png
|
||||
:target: ../_static/ide-platformio-qtcreator-1.png
|
||||
|
||||
On the next steps select any available kit and click Finish button.
|
||||
|
||||
.. image:: ../_static/ide-platformio-qtcreator-2.png
|
||||
|
||||
Secondly, we need to configure project with PlatformIO source code builder (click on Projects label on left menu or ``Ctrl+5`` shortcut):
|
||||
Secondly, we need to delete default build and clean steps and configure project with PlatformIO source code builder (click on Projects label on left menu or ``Ctrl+5`` shortcut):
|
||||
|
||||
.. image:: ../_static/ide-platformio-qtcreator-3.png
|
||||
:target: ../_static/ide-platformio-qtcreator-3.png
|
||||
|
||||
Thirdly, change project file by adding path to directories with header files. Please edit project file to match the following contents:
|
||||
|
||||
@ -58,15 +65,14 @@ Thirdly, change project file by adding path to directories with header files. Pl
|
||||
HOMEDIR += $$(USERPROFILE)
|
||||
}
|
||||
else {
|
||||
HOMEDIR += $$(PWD)
|
||||
HOMEDIR += $$(HOME)
|
||||
}
|
||||
|
||||
INCLUDEPATH += "$$HOMEDIR/.platformio/packages/framework-arduinoavr/cores/arduino"
|
||||
INCLUDEPATH += "$$HOMEDIR/.platformio/packages/toolchain-atmelavr/avr/include"
|
||||
|
||||
win32:INCLUDEPATH ~= s,/,\\,g
|
||||
INCLUDEPATH += "$${HOMEDIR}/.platformio/packages/framework-arduinoavr/cores/arduino"
|
||||
INCLUDEPATH += "$${HOMEDIR}/.platformio/packages/toolchain-atmelavr/avr/include"
|
||||
|
||||
.. image:: ../_static/ide-platformio-qtcreator-4.png
|
||||
:target: ../_static/ide-platformio-qtcreator-4.png
|
||||
|
||||
First program in Qt Creator
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
@ -77,6 +83,7 @@ Simple "Blink" project will consist from two files:
|
||||
Let's create new text file named ``main.c`` using ``Menu: New File or Project > General > Text File``:
|
||||
|
||||
.. image:: ../_static/ide-platformio-qtcreator-5.png
|
||||
:target: ../_static/ide-platformio-qtcreator-5.png
|
||||
|
||||
Copy the source code which is described below to file ``main.c``.
|
||||
|
||||
@ -101,6 +108,7 @@ Copy the source code which is described below to file ``main.c``.
|
||||
3. Locate the project configuration file named ``platformio.ini`` at the root of the project directory and open it.
|
||||
|
||||
.. image:: ../_static/ide-platformio-qtcreator-6.png
|
||||
:target: ../_static/ide-platformio-qtcreator-6.png
|
||||
|
||||
Edit the content to match the code described below.
|
||||
|
||||
@ -128,3 +136,5 @@ Conclusion
|
||||
Taking everything into account, we can build project with shortcut ``Ctrl+Shift+B`` or using ``Menu: Build > Build All``:
|
||||
|
||||
.. image:: ../_static/ide-platformio-qtcreator-7.png
|
||||
:target: ../_static/ide-platformio-qtcreator-7.png
|
||||
|
||||
|
@ -123,3 +123,4 @@ Conclusion
|
||||
Taking everything into account, we can build project with shortcut ``Ctrl+Shift+B`` or using ``Menu: Build > Build Solution``:
|
||||
|
||||
.. image:: ../_static/ide-vs-platformio-newproject-8.png
|
||||
:target: ../_static/ide-vs-platformio-newproject-8.png
|
||||
|
Reference in New Issue
Block a user