{{InfoBoxTop}}{{AppliesToAXEL Lite AN}}{{InfoBoxBottom}}{{WarningMessage|text=This application note was validated against specific versions of the kit only. It may not work with other versions. Supported versions are listed in the ''History'' section.}}=History= {| class="wikitable" border="1"!Page version!Date!XELK version!Notes|-|1.0.0|March 2018|[[Axel_Embedded_Linux_Kit_(XELK)#XELK_software_components|XELK 3.0.0]]|First release|-|{{oldid|8847|2.0.0}}|August 2019|[[Axel_Embedded_Linux_Kit_(XELK)#XELK_software_components|XELK 4.0.0]]|Updated XELK version|-|3.0.0|August 2022|{{pageoldid|DESK-MX6-L|15794|DESK-MX6-L 1.0.0}}|DESK-MX6-L version|} = Introduction = This application note details QT Creator setup and configuration in [[DESK-MX6-L|DESK-MX6-L]] [[Managed Virtual Machine (MVM)|MVM]] = Setting up Qt Creator to build for XELK DESK-MX6-L ={{ImportantMessage|text=Note: The version of Qt Creator may differ from images below. The version used is the release is 4.4.1 which can be downloaded form [https://download.qt.io/archive/qtcreator/4.4/4.4.1/ Qt archive server]}}
== Qt Creator Installation ==
To install Qt Creator inside your toolchain launch a terminal emulator and run
<pre>
dvdk@vagrant-ubuntu-trusty-64:~$ cd axeldesk-mx-l/
Now it is necessary If you don't want to add use the definition of your board before developing and compiling your applicationsautomatic setup or want to customize the configuration, in this section we details all the step required.
In order to add the device information automatically, run the following commands inside your terminal emulator.=== Devices ===
Go to <precode>dvdk@vagrantTools -ubuntu-trusty-64:~$ cd axel/> Options</precode><pre>dvdk@vagrant-ubuntu-trusty-64menu:~/axel$ ./qt-post-install.sh</pre>
If the installation process went ok, you should see inside the <code>Tools</code>[[File:QtCreator-><code>Options</code> 4.4.1_tools-> <code>Kits</code> a kit named XELKoptions.png|1000px|border|center]]
[[FileSelect <code>Devices</code> and click '''Add''':QtCreator XELK 3 0 0 09.png|400px|border|center]]
Select the Kits tab and make sure that your configurations mateches the one displayed.[[File:QtCreator XELK 3 0 0 10-4.4.1_devices-add.png|400px700px|border|center]]
== Manual configuration ==Choose the ''Generic Linux device'':
=== Devices ===Go to <code>Tools</code>-><code>Options</code> menu [[File:QtCreator XELK 3 0 0 09-4.4.png|400px|border|center]]select <code>Devices</code> and click '''Add'''[[File:QtCreator XELK 3 0 0 221_devices-linux-device.png|400px500px|border|center]]
Choose Insert the IP address of your device, ''Generic linux deviceroot''as username and leave password empty (this is the default configuration of DESK-MX6-L root file systems). Make sure that the device is connected to the network and your virtual machine networking is correctly configured (see [[VirtualBox Network Configuration|this]] article for more details).
Insert the IP address of your device, the username and password of the root account[[File:QtCreator-4.4. Make sure that the 1_devices-linux-device is connected to the network and your virtual machine is configured to use a bridge connection-EVK. png|600px|border|center]]
Click '''Next'''.The device will be created and the connectivity will be tested:
Now it is necessary to add a debugger. In order to do this go to the <code>Debuggers</code> tab and click '''Add''' [[File:QtCreator XELK 3 0 0 30.png|400px|border|center]]And and then select the GDB debugger at the location
The last step is to add a new kit. Go to <code>Kits</code> and click '''Add''' and complete the information as shown below. [[File:QtCreator XELK 3 0 0 33.png|400px|border|center]] Pay attention that in <code>Qt mkspec</code> you need to write
<span style{{ImportantMessage|text="color:#ff0000"> It is important to repeat the previous two step each steps every time you close the Qt Creator application. </span>start QTCreator}}
To add a clickable button to your application, select the <code>Edit</code> window and select <code>Test</code>-><code>Forms</code>-><code>mainwindow.ui</code>
Click on Push Button in the Buttons tab and drag it to the main window view. In order to edit the text displayed by the label, double click it and write ''"Hello World!"''.
After that, you need to insert the following two line inside the ''Test.pro'' file
<pre>
target.path = /tmphome/root/Test # path on device
</pre>
<pre>
</pre>
Where <code>/temphome/root/Test</code> is the path in which your application will be downloaded inside the device.
[[File:QtCreator XELK 3 0 0 19-4.4.1_project-Test-MainWindow-TestPro.png|1200px|border|center]] Build the project in order to complete the configuration and set the overall vars: [[File:QtCreator-4.4.1_project-Test-MainWindow-Build.png|400px1200px|border|center]]
The last step before running the application inside the device is to select configure Qt backend into application command line arguments: open the <code>Project </code> window and select the <code>Run </code> configuration and as , then type <code>-platform eglfs</code> into <code>Arguments.</code>
<pre>[[File:QtCreator-4.4.1_project-Test-MainWindow-platform eglfs.png|1200px|border|center]] After these changes you are ready to debug your application inside your board with the <code>Run/Debug</precode>command [[File:QtCreator XELK 3 0 0 35.png|30px]] [[File:QtCreator-4.4.1_project-Test-MainWindow-debug.png|1200px|border|center]]
[[FileThe debugger (via <code>gdb server</code>) will be activated and the debug window will be ready:QtCreator XELK 3 0 0 20.png|400px|border|center]]
After these changes you are ready to debug your application inside your board with the Run/Debug command [[File:QtCreator XELK 3 0 0 35-4.png|30px]][[File:QtCreator XELK 3 0 0 214.1_project-Test-MainWindow-debug-running.png|400px1200px|border|center]]