Changes

Jump to: navigation, search

DIVELK-AN-002: Using Qt Creator

876 bytes added, 12:03, 8 March 2019
History
{{Applies To Diva}}
{{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=
!Version
!Date
!XELK DIVELK version
!Notes
|-
|1{{oldid|8080|4.0.0}}|March April 2018|[[Axel_Embedded_Linux_Kit_Diva_Embedded_Linux_Kit_(XELKDIVELK)#XELK_software_componentsDIVELK_software_components|DIVELK 4.0.0]]||-|4.0.1|3March 2019|[[Diva_Embedded_Linux_Kit_(DIVELK)#DIVELK_software_components#DIVELK_4.0.1|DIVELK 4.0.1]]|First release
|}
= Introduction =
This application note details QT Creator setup and configuration in [[Axel_Embedded_Linux_Kit_Diva_Embedded_Linux_Kit_(XELKDIVELK)|XELKDIVELK]] [[Managed Virtual Machine (MVM)|MVM]]
= Setting up Qt Creator to build for XELK DIVELK =
== Qt Creator Installation ==
<pre>
dvdk@vagrant-ubuntu-trusty-64:~$ cd axeldiva/
</pre>
<pre>
dvdk@vagrant-ubuntu-trusty-64:~/axeldiva$ ./qt-creator-opensource.run
</pre>
An installation wizard will appear. Clik Click '''Next''' to proced proceed with the installation. [[File:QtCreator XELK 3 0 DIVELK 4.0 .1 - Qt Creator 01.pngjpg|400pxcenter|borderframeless|center438x438px]] 
Select '''Skip'''.
 [[File:QtCreator XELK 3 0 DIVELK 4.0 .1 - Qt Creator 02.png|400pxjpg|border|center|437x437px]] 
Select '''Next'''.
 [[File:QtCreator XELK 3 0 DIVELK 4.0 .1 - Qt Creator 03.png|400pxjpg|border|center|437x437px]] 
Select the install directory or click '''Next'''.
 [[File:QtCreator XELK 3 0 DIVELK 4.0 .1 - Qt Creator 04.png|400pxjpg|border|center|437x437px]] 
Select '''Next'''.
 [[File:QtCreator XELK 3 0 DIVELK 4.0 .1 - Qt Creator 05.png|400pxjpg|border|center|437x437px]] 
Click '''Next''' again.
 [[File:QtCreator XELK 3 0 DIVELK 4.0 .1 - Qt Creator 06.png|400pxjpg|border|center|437x437px]] 
And then click '''Install''' and complete the installation.
 [[File:QtCreator XELK 3 0 DIVELK 4.0 .1 - Qt Creator 07.png|400pxjpg|border|center|436x436px]] 
Then '''Finish''' to exit the setup wizard.
 [[File:QtCreator XELK 3 0 DIVELK 4.0 .1 - Qt Creator 08.png|400pxjpg|border|center|437x437px]]
== Automatic configuration ==
In order to add the device information automatically, DAVE provides a simple setup script.
 
TBD
<!--
== Manual configuration ==
If you don't want to use the automatic setup or want to customize the configuration, in this section we details detail all the step required.
=== Linaro Toolchain ===
You should be able to find the linaro toolchain already inside the virtual machine at ~/diva, if not the following will download and extract the toolchain.
 
Download the following [https://releases.linaro.org/components/toolchain/binaries/6.2-2016.11/arm-linux-gnueabihf/gcc-linaro-6.2.1-2016.11-x86_64_arm-linux-gnueabihf.tar.xz archive]
and extract it
<pre>
mkdir -p /home/dvdk/toolchaindivatar -xvf gcc-linaro-6.2.1-2016.11-x86_64_arm-linux-gnueabihf.tar.xz -C /home/dvdk/tolchaindiva
</pre>
[[File:QtCreator XELK 3 0 0 25.png|400px|border|center]]
And finally , this is how the <code>Devices</code> window should look like.
[[File:QtCreator XELK 3 0 0 26.png|400px|border|center]]
<pre>
/home/dvdk/toolchaindiva/gcc-linaro-6.2.1-2016.11-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabignueabihf-gcc
</pre>
<pre>
/home/dvdk/toolchaindiva/gcc-linaro-6.2.1-2016.11-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabignueabihf-g++
</pre>
<pre>
home/dvdk/toolchaindiva/gcc-linaro-6.2.1-2016.11-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabignueabihf-gdb
</pre>
== Qt application example ==
Now that the setup is finished, you can create your first application.
Open In order to debug your application with QtCreator, it is mandatory to utilize the linaro toolchain [[DIVELK-AN-002:_Using_Qt_Creator#Linaro_Toolchain|Toolchain]]. Furthermore, if the Weston compositor is active, the debug process is slow. For this reason it is higly recomanded to disable it with root@diva:~# /etc/init.d/weston stopNow open a new terminal and source the environment variables with the command.
<pre>
<pre>
dvdk@vagrant-ubuntu-trusty-64:~$ ./qtcreator-4.35.02/bin/qtcreator
</pre>
[[File:QtCreator XELK 3 0 0 13.png|400px|border|center]]
Select the ''XELK DIVELK Kit'' and click '''Next'''.
[[File:QtCreator XELK 3 0 0 14.png|400px|border|center]]
[[File:QtCreator XELK 3 0 0 18.png|400px|border|center]]
After that, you need to insert the following two line lines inside the ''Test.pro'' file
<pre>
8,154
edits

Navigation menu