Difference between revisions of "Configuring Qt Creator"

From wiki.emacinc.com
Jump to: navigation, search
Line 1: Line 1:
{{todo| InProgress |Brian Serrano|project=oe 5,bs}}
+
{{todo| Review |Brian Serrano|project=oe 5,bs,ky,mg}}
  
 
{{#seo:
 
{{#seo:
Line 7: Line 7:
 
|description=
 
|description=
 
}}
 
}}
 
+
{{note| For paths that contain '''''{-gnueabi}''''', if the target architecture is ARM, just remove the curly braces. If the target architecture is x86, remove the curly braces and the text they contain entirely.}}
 
==Configure Kits in Qt Creator==
 
==Configure Kits in Qt Creator==
 
<cl>
 
<cl>
1. Source the environment setup script
+
1. Open Qt Creator
<syntaxhighlight lang="console">
 
developer@ldc:~$ source /opt/emac/5.0.0/environment-setup-i586-emac-linux
 
</syntaxhighlight>
 
* Open Qt Creator
 
 
  <syntaxhighlight lang="console">
 
  <syntaxhighlight lang="console">
 
developer@ldc:~$ /home/developer/qtcreator-3.1.0/bin/qtcreator
 
developer@ldc:~$ /home/developer/qtcreator-3.1.0/bin/qtcreator
 
</syntaxhighlight>
 
</syntaxhighlight>
 
  
 
* Click Tools->Options...
 
* Click Tools->Options...
Line 32: Line 27:
 
* Select the '''Qt Versions''' tab
 
* Select the '''Qt Versions''' tab
 
  i. Press the '''Add...''' button
 
  i. Press the '''Add...''' button
  * Navigate to /opt/emac/5.0.0/sysroots/i686-emacsdk-linux/usr/bin/
+
  * Navigate to /opt/emac/5.0/sysroots/x86_64-emacsdk-linux/usr/bin/
  * Select qmake2
+
  * Select qmake
 
  * Press apply
 
  * Press apply
  
Line 42: Line 37:
 
* Select the '''Compilers''' tab
 
* Select the '''Compilers''' tab
 
  i. Press '''Add->GCC'''
 
  i. Press '''Add->GCC'''
  * Type in a name such as i586 Gcc
+
  * Type in a name such as OE5 ARM GCC
 
  * Click Browse...
 
  * Click Browse...
  * Navigate to /opt/emac/5.0.0/sysroots/i686-emacsdk-linux/usr/bin/''target_arch''/
+
  * Navigate to /opt/emac/5.0/sysroots/x86_64-emacsdk-linux/usr/bin/''target_arch''/
  * Select ''target_arch''-emac-linux-gcc
+
  * Select ''target_arch''-emac-linux{-gnueabi}-gcc
  
 
[[File:Qt_Kit_GCC.png|500px|thumb|left|Figure 2: Qt Creator Kit Compiler]]
 
[[File:Qt_Kit_GCC.png|500px|thumb|left|Figure 2: Qt Creator Kit Compiler]]
Line 53: Line 48:
 
* Select the '''Debuggers''' tab
 
* Select the '''Debuggers''' tab
 
  i. Press '''Add'''
 
  i. Press '''Add'''
  * Type in a name such as i586 Debugger
+
  * Type in a name such as GDB OE5 ARM
 
  * Click '''Browse...'''
 
  * Click '''Browse...'''
  * Navigate to /opt/emac/5.0.0/sysroots/i686/usr/bin/''target_arch''/
+
  * Navigate to /opt/emac/5.0/sysroots/x86_64-emacsdk-linux/usr/bin/''target_arch''/
  * Select ''target_arch''-emac-linux-gdb
+
  * Select ''target_arch''-emac-linux{-gnueabi}-gdb
  
 
[[File:Qt_Kit_GDB.png|500px|thumb|left|Figure 3: Qt Creator Kit Debugger]]
 
[[File:Qt_Kit_GDB.png|500px|thumb|left|Figure 3: Qt Creator Kit Debugger]]
Line 64: Line 59:
 
* Select the '''Kits''' tab
 
* Select the '''Kits''' tab
 
  i. Press the '''Add''' button
 
  i. Press the '''Add''' button
  * Type in a name such as i586
+
  * 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 3
  * Type /opt/emac/5.0.0/sysroots/''target_arch'' into the '''Sysroot''' line
+
  * Type /opt/emac/5.0/sysroots/''target_arch'' into the '''Sysroot''' line
 
  * Change the '''Compiler:''' to the one created in step 6
 
  * Change the '''Compiler:''' to the one created in step 6
 
  * Change the '''Debugger:''' to the one created in step 7
 
  * Change the '''Debugger:''' to the one created in step 7
 
  * Change the '''Qt version:''' to the one created in step 5
 
  * Change the '''Qt version:''' to the one created in step 5
 +
* Type ''target_arch''-emac-linux{-gnueabi}-g++ into the '''Qt mkspec''' line
 
  * Press '''Apply''' then '''Ok'''
 
  * Press '''Apply''' then '''Ok'''
  

Revision as of 14:54, 9 November 2015

TODO: {{#todo: Review |Brian Serrano|oe 5,bs,ky,mg}}



NOTE
For paths that contain {-gnueabi}, if the target architecture is ARM, just remove the curly braces. If the target architecture is x86, remove the curly braces and the text they contain entirely.

Configure Kits in Qt Creator

  1. Open Qt Creator

    developer@ldc:~$ /home/developer/qtcreator-3.1.0/bin/qtcreator
    
  2. Click Tools->Options...

  3. 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

  4. Select Build & Run from the left pane

  5. Select the Qt Versions tab

    1. Press the Add... button

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

    3. Select qmake

    4. Press apply

    Figure 1: Qt Creator Kit Qmake


  6. Select the Compilers tab

    1. Press Add->GCC

    2. Type in a name such as OE5 ARM GCC

    3. Click Browse...

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

    5. Select target_arch-emac-linux{-gnueabi}-gcc

    Figure 2: Qt Creator Kit Compiler


  7. 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.0/sysroots/x86_64-emacsdk-linux/usr/bin/target_arch/

    5. Select target_arch-emac-linux{-gnueabi}-gdb

    Figure 3: Qt Creator Kit Debugger


  8. 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 3

    5. Type /opt/emac/5.0/sysroots/target_arch into the Sysroot line

    6. Change the Compiler: to the one created in step 6

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

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

    9. Type target_arch-emac-linux{-gnueabi}-g++ into the Qt mkspec line

    10. Press Apply then Ok


    Figure 4: Qt Creator Kit