Changes

Jump to: navigation, search

DESK-MX-L-AN-0007: Getting Started With QT Creator

166 bytes added, 10:19, 22 February 2018
no edit summary
= Setting up Qt Creator to build for XELK =
== Qt Creator Installation ==
To install Qt Creator inside your toolchain lunch a terminal emulator and run
<pre>
[[File:QtCreator XELK 3 0 0 07.png|200px|border|center]]
And then click install and complete '''Finish''' to exit the installationsetup wizard.
[[File:QtCreator XELK 3 0 0 08.png|200px|border|center]]
</pre>
If the installation process went ok, you should see inside the <code><nowiki>Tools</nowiki></code>-><code><nowiki>Options</nowiki></code> -> <code><nowiki>Kits</nowiki></code> a kit named XELK.
[[File:QtCreator XELK 3 0 0 09.png|400px|border|center]]
=== Devices ===
Go to <code><nowiki>Tools</nowiki></code>-><code><nowiki>Options</nowiki></code> menu
[[File:QtCreator XELK 3 0 0 09.png|400px|border|center]]
select <code><nowiki>Devices</nowiki></code> and click '''Add'''
[[File:QtCreator XELK 3 0 0 22.png|400px|border|center]]
[[File:QtCreator XELK 3 0 0 25.png|400px|border|center]]
And finally this is how the device <code>Devices</code> window should look like
[[File:QtCreator XELK 3 0 0 26.png|400px|border|center]]
=== GCC & Cross Compilation ===
Next you need to configure the cross compilation tool inside <code>Build & Run </code> -> <code> Compiler</code>.
[[File:QtCreator XELK 3 0 0 27.png|400px|border|center]]
Click <code>Add </code> -> <code> GCC </code> and add the compiler path at.
<pre>
</pre>
And click '''Apply'''.
[[File:QtCreator XELK 3 0 0 29.png|400px|border|center]]
Do the same fort the GC++ cross compilation tool.
<pre>
=== Debugger GDB ===
Now it is necessary to add a debuger. In order to do this go to the <code>Debuggers </code> tab and click add'''Add'''
[[File:QtCreator XELK 3 0 0 30.png|400px|border|center]]
</pre>
and click '''Apply'''.
[[File:QtCreator XELK 3 0 0 31.png|400px|border|center]]
=== Qt Version ===
Next you need to add the Qt Version installed on your devices. Go to <code>Qt Version </code> click '''Add ''' and select the following qmake file.
<pre>
=== Kits ===
The last step is to add a new kit. Go to <code>Kits </code> and click '''Add ''' and complete the information as showed below.
[[File:QtCreator XELK 3 0 0 33.png|400px|border|center]]
Pay attention that in <code>Qt mkspec </code> you should write
<pre>
</pre>
Close the tab and create a new project.Click <code>New Project</code>
[[File:QtCreator XELK 3 0 0 11.png|400px|border|center]]
[[File:QtCreator XELK 3 0 0 15.png|400px|border|center]]
Click finish and '''Finish''' to conclude the setup.
[[File:QtCreator XELK 3 0 0 16.png|400px|border|center]]
Now you will add a button to your application. In order to do this, select from the <code>Edit </code> window and select <code>Test</code>-><code>Forms</code>-><code>mainwindow.ui</code>
[[File:QtCreator XELK 3 0 0 17.png|400px|border|center]]
To add a Push Button click on Push Button in the Buttons tab and drag it to the main widown view. In order to edit the text displayed by the label, dubble click it and write ''"Hello World!"''.
[[File:QtCreator XELK 3 0 0 18.png|400px|border|center]]
After that, you need to insert the following line inside the ''Test.pro '' file
<pre>
</pre>
Where <code>/temp/Test </code> is the path in which your application will be dowloaded inside the device.
[[File:QtCreator XELK 3 0 0 19.png|400px|border|center]]
[[File:QtCreator XELK 3 0 0 20.png|400px|border|center]]
After these changes you are ready to debug your application directly inside your board with the Run/Debug command[[File:QtCreator XELK 3 0 0 35.png|30px]]
[[File:QtCreator XELK 3 0 0 21.png|400px|border|center]]
170
edits

Navigation menu