Difference between revisions of "Configuring Qt Creator"

From wiki.emacinc.com
Jump to: navigation, search
 
(2 intermediate revisions by one other user not shown)
Line 7: Line 7:
 
|description=
 
|description=
 
}}
 
}}
{{caution| This page is written for customers that have installed Qt Creator using the installer directly from the Qt website, as described on  [[Installing_QtCreator | this page]]. This method is not recommended.
+
{{note| This page is written for customers that have installed Qt Creator using the installer directly from the Qt website or from the host distribution's package manager, as described on  [[Installing_QtCreator | this page]]. }}
 
<br />
 
<br />
The recommended method is to use Ubuntu 12.04 LTS or (preferably) 14.04 LTS, and install using apt as described on [[Install_the_EMAC_SDK | this page]].}}
 
  
 
==Configure Kits in Qt Creator==
 
==Configure Kits in Qt Creator==
Line 16: Line 15:
 
1. [[Installing_QtCreator | Install Qt Creator]], which, by default, is installed in the user's home directory.
 
1. [[Installing_QtCreator | Install Qt Creator]], which, by default, is installed in the user's home directory.
 
* Open Qt Creator
 
* Open Qt Creator
{{cli | username=developer | hostname=ldc |/home/developer/qtcreator-3.1.0/bin/qtcreator}}
+
{{cli | username=developer | hostname=ldc |$HOME/qtcreator-4.3.0/bin/qtcreator}}
  
 
* Click Tools->Options...
 
* Click Tools->Options...
Line 37: Line 36:
  
 
<br clear=all>
 
<br clear=all>
{{note| The ''target_arch'' variable referenced below can either be ''armv5e-emac-linux-gnueabi'' for ARM targets or ''i586-emac-linux'' for x86 targets.}}
+
{{note| The ''target_arch'' variable referenced below can either be ''arm-emac-linux'' for ARM targets or ''i586-emac-linux'' for x86 targets.}}
  
 
* Select the '''Compilers''' tab
 
* Select the '''Compilers''' tab
  i. Press '''Add->GCC'''
+
  i. Press '''Add->GCC->C'''
 
  * Type in a name such as OE5 ARM GCC
 
  * Type in a name such as OE5 ARM GCC
 
  * Click Browse...
 
  * Click Browse...
 
  * Navigate to <code>/opt/emac/5.X/sysroots/x86_64-emacsdk-linux/usr/bin/'''''target_arch'''''/</code>
 
  * Navigate to <code>/opt/emac/5.X/sysroots/x86_64-emacsdk-linux/usr/bin/'''''target_arch'''''/</code>
 
  * Select '''''target_arch'''''-gcc
 
  * Select '''''target_arch'''''-gcc
 +
* Repeat for the C++ compiler selecting '''''target_arch'''''-g++
  
[[File:Qt_Kit_GCC.png|500px|thumb|left|Figure 2: Qt Creator Kit Compiler]]
+
[[File:QtCompilers.jpg|500px|thumb|left|Figure 2: Qt Creator Kit Compiler]]
  
 
<br clear=all>
 
<br clear=all>
Line 65: Line 65:
 
  * Type in a name such as OE 5.0 arm
 
  * Type in a name such as OE 5.0 arm
 
  * Change the '''Device type:''' to Generic Linux Device
 
  * Change the '''Device type:''' to Generic Linux Device
  * Change the '''Device:''' to the one configured in step 3
+
  * Change the '''Device:''' to the one configured in step 4
  * Type <code>/opt/emac/5.X/sysroots/'''''target_arch'''''</code> into the '''Sysroot''' line
+
  * Type the location of the SDK target sysroot into the '''Sysroot''' line.
  * Change the '''Compiler:''' to the one created in step 6
+
  * This will be a subdirectory of either:
  * Change the '''Debugger:''' to the one created in step 7
+
  * <code>$HOME/EMAC-SDK/sysroots</code>
  * Change the '''Qt version:''' to the one created in step 5
+
  * <code>/opt/emac/5.X/sysroots/</code>  
  * Type '''''target_arch'''''-g++ into the '''Qt mkspec''' line
+
  * Change the '''Compilers:''' to the ones created in step 7
 +
  * Change the '''Debugger:''' to the one created in step 8
 +
  * Change the '''Qt version:''' to the one created in step 6
 +
  * Fill in the '''Qt mkspec''' line:
 +
  * armv5e-emac-linux-gnueabi-g++ for ARM
 +
  * i586-emac-linux-g++ for X86
 
  * Press '''Apply''' then '''Ok'''
 
  * Press '''Apply''' then '''Ok'''
  

Latest revision as of 11:43, 12 July 2017

TODO: {{#todo: Complete (11.09.2015-13:55->KY+)(11.13.2015-13:00->MG+)(11.17.2015-11:25->KY+)(11.17.2015-12:25->MD+)(11.17.2015-14:30->MG+)|Brian Serrano|oe 5,bs,KY,MG,MD,Complete}}



NOTE
This page is written for customers that have installed Qt Creator using the installer directly from the Qt website or from the host distribution's package manager, as described on this page.


Configure Kits in Qt Creator

  1. Install Qt Creator, which, by default, is installed in the user's home directory.

  2. Open Qt Creator

    developer@ldc:~# $HOME/qtcreator-4.3.0/bin/qtcreator
  3. Click Tools->Options...

  4. Select Devices from the left pane

    1. Press the Add... button

    2. Select Generic Linux Device, then press Start Wizard

    3. Type in a name, the IP address, user name, and password for the device

    4. Click Next >

    5. Click Finish

    6. A connection will be established with the target device

    7. Click Apply

  5. Select Build & Run from the left pane

  6. Select the Qt Versions tab

    1. Press the Add... button

    2. Navigate to /opt/emac/5.X/sysroots/x86_64-emacsdk-linux/usr/bin/

    3. Select qmake

    4. Press apply

    Figure 1: Qt Creator Kit Qmake




    NOTE
    The target_arch variable referenced below can either be arm-emac-linux for ARM targets or i586-emac-linux for x86 targets.


  7. Select the Compilers tab

    1. Press Add->GCC->C

    2. Type in a name such as OE5 ARM GCC

    3. Click Browse...

    4. Navigate to /opt/emac/5.X/sysroots/x86_64-emacsdk-linux/usr/bin/target_arch/

    5. Select target_arch-gcc

    6. Repeat for the C++ compiler selecting target_arch-g++

    Figure 2: Qt Creator Kit Compiler


  8. Select the Debuggers tab

    1. Press Add

    2. Type in a name such as GDB OE5 ARM

    3. Click Browse...

    4. Navigate to /opt/emac/5.X/sysroots/x86_64-emacsdk-linux/usr/bin/target_arch/

    5. Select target_arch-gdb

    Figure 3: Qt Creator Kit Debugger


  9. Select the Kits tab

    1. Press the Add button

    2. Type in a name such as OE 5.0 arm

    3. Change the Device type: to Generic Linux Device

    4. Change the Device: to the one configured in step 4

    5. Type the location of the SDK target sysroot into the Sysroot line.

      • This will be a subdirectory of either:

      • $HOME/EMAC-SDK/sysroots

      • /opt/emac/5.X/sysroots/

    6. Change the Compilers: to the ones created in step 7

    7. Change the Debugger: to the one created in step 8

    8. Change the Qt version: to the one created in step 6

    9. Fill in the Qt mkspec line:

      • armv5e-emac-linux-gnueabi-g++ for ARM

      • i586-emac-linux-g++ for X86

    10. Press Apply then Ok


    Figure 4: Qt Creator Kit


Conclusion

At this time, Qt Creator is configured similarly to the pre-configured version of Qt Creator that is distributed by EMAC. All other pages referencing Qt Creator should apply to this configured version as well.

Where to go next