{{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 lunch launch a terminal emulator and run <pre>dvdk@vagrant:~$ cd desk-mx-l/</pre>
<pre>
dvdk@vagrant-ubuntu-trusty-64:~$ cd axel/dvdk@vagrantdesk-ubuntumx-trusty-64:~/axell$ ./qt-creator-opensource-linux-x86_64-4.4.1.run
</pre>
An installation wizard will appear. Clik '''Next''' to proced with the installation.
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.<pre>dvdk@vagrant-ubuntu-trusty-64:~$ cd axel/dvdk@vagrant-ubuntu-trusty-64:~/axel$ ./qt-post-install.sh</pre>=== Devices ===
If the installation process went ok, you should see inside the Go to <code><nowiki>Tools</nowiki></code>-><code><nowiki>Options</nowiki></code> -> <code><nowiki>Kits</nowiki></code> a kit named XELK.menu:
Select the Kits tab <code>Devices</code> and make sure that your configurations mateches the one displayed.[[Fileclick '''Add''':QtCreator XELK 3 0 0 10.png|400px|border|center]]
=== Devices ===Go to <code><nowiki>Tools</nowiki></code>-><code><nowiki>Options</nowiki></code> menu [[FileChoose the ''Generic Linux device'':QtCreator XELK 3 0 0 09.png|400px|border|center]]
select <code><nowiki>Devices</nowiki></code> and click '''Add'''[[File:QtCreator-4.4.1_devices-linux-device.png|500px|border|center]]
Insert the IP address of your device, ''root'' 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 [[File:QtCreator XELK 3 0 0 22.pngVirtualBox Network Configuration|400px|border|centerthis]]article for more details).
Choose the generic linux deviceThen click '''Next''':
Insert the ip address of your The device will be created and the username and password of the root account. Make sure that the device is connected to the network and your virtual machine is configured to use a bridge connection and click '''Next'''.connectivity will be tested:
Now it is necessary to add a debugerdebugger. 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 '''Add''' and then select the GDB debugger at the location
Next you need to add the Qt Version installed on your devicesdevice. Go to <code>Qt Version </code> click '''Add ''' and select the following qmake file.
The last step is to add a new kit. Go to <code>Kits </code> and click '''Add ''' and complete the information as showed shown below [[File:QtCreator XELK 3 0 0 33.png|400px|border|center]] Pay attention that in <code>Qt mkspec </code> you should need to write
Close {{ImportantMessage|text=It is important to repeat the tab and create a new projectprevious two steps every time you start QTCreator}} Now click on <code>New Project</code> [[File:QtCreator-4.4.1_project.png|1200px|border|center]]
Now you will To add a clickable button to your application. In order to do this, select from the <code>Edit </code> window and select <code>Test->Forms->mainwindow.ui</code>
To add a Push Button click Click on Push Button in the Buttons tab and drag it to the main widown window view. In order to edit the text displayed by the label, dubble 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>
INSTALLS += target
</pre>
Where <code>/temphome/root/Test </code> is the path in which your application will be dowloaded 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 configure Qt backend into application command line arguments: open the <code>Project</code> window and select the <code>Run</code> configuration, then type <code>-platform eglfs</code> into <code>Arguments</code>
The last step before running the application inside the device is to select the Project window select the Run configuration and as Arguments[[File:QtCreator-4.4.1_project-Test-MainWindow-eglfs.png|1200px|border|center]]
After these changes you are ready to debug your application inside your board with the <precode>-platform eglfsRun/Debug</precode>command [[File:QtCreator XELK 3 0 0 35.png|30px]]
After these changes you are The debugger (via <code>gdb server</code>) will be activated and the debug window will be ready to debug your application directly inside your board with the Run/Debug command.: