===== Qt Creator ===== The installation of Qt Creator and its configuration for software development on the TQ-modules is described on this page. An Ubuntu 14.04 VM was used as development host system and the TQMa6x as reference module for this tutorial. ==== Prerequisites ==== You have to install the Python devel packages on the build host and then compile the OSELAS toolchain ! === Install Python devel packages === - Update Packetmanager sudo apt-get update - Install python devel packages sudo apt-get install python-dev === Host === * Installed PTXdist [[http://www.pengutronix.de/software/ptxdist/appnotes/OSELAS.BSP-Pengutronix-Generic-arm-Quickstart.pdf|Pengutronix quickstart guide]] * OSELAS TOOLCHAIN including GDB with python support [[http://www.pengutronix.de/software/ptxdist/appnotes/AppNote_BuildingToolchain.pdf|Appnote building OSELAS Toolchain]] * PTXdist images === Target === * Target system with operating RootFS * User with password (needed for ssh remote access) * gdbserver * OpenSSH with sshd and sftpd * Network connection to development host ==== Installing Qt Creator ==== === Manual installation === - Download [[https://www.qt.io/offline-installers|QtCreator]] - Start with sudo sudo ./qt-opensource-linux-x86_64-*.run and install Qt creator === Ubuntu packetmanager installation === - Update packet manager sudo apt-get update - Install Qt Creator sudo apt-get install qtcreator ---- ===== Configuring QT Creator ===== ==== Add compiler from BSP source ==== Select **Tools** / **Options** in the main window of Qt Creator \\ {{:en:general_information:qt_1.jpg?nolink&800| }} \\ \\ In the Options menu select **Build & Run** from the menu tab on the left side then select the **Compilers** tab and click on **Add** button on the upper right side then select **Custom** from the dropdown menu\\ {{:en:general_information:qt_2.jpg?nolink&800| }} Now you have to set \\ {{:intern:general_information:qt_set_compiler_rev109.jpg?nolink&800|}} \\ __**Name**__ should be named like the toolchain compiler in this case ****\\ in this tutorial **arm-v7a-linux-gnueabihf**\\ \\ __**Compiler path**__ /path/to/your/BSP source//sysroot-host/lib/wrapper/g%%++%% \\ in this tutorial **/home/tq/workspace/BSPs/TQMa6x-BSP-REV.0109/platform-MBa6x/sysroot-host/lib/wrapper/arm-v7a-linux-gnueabihf-g%%++%%**\\ \\ __**Make path**__ /usr/bin/make\\ __**ABI**__ set the following from the dropdown menus\\ ^ processor architecture ^ operating system ^ OS flavor ^ binary format ^ system architecture ^ | arm | linux | generic | elf | 32bit | \\ ---- ==== Add debugger from BSP source ==== Select **Tools** / **Options** in the main window of Qt Creator \\ {{:en:general_information:qt_1.jpg?nolink&800| }} \\ \\ In the Options menu select **Build & Run** from the menu tab an the left side then select **Debuggers** tab and click on **Add** button on the upper right side {{:en:general_information:qt_4.jpg?nolink&800| }} now you have to set \\ {{:en:general_information:qt_5.jpg?nolink&800|}} __**Name**__ should be named like the toolchain compiler in this case ****\\ for this tutorial **arm-v7a-linux-gnueabihf**\\ \\ __**Path**__ debugger path **/path/to/your/toolchain//gcc-_glibc-_binutils-_kernel--sanitized/bin/-gdb**\\ for this tutorial **/opt/OSELAS.Toolchain-2013.12.2/arm-v7a-linux-gnueabihf/gcc-4.8.3-glibc-2.18-binutils-2.24-kernel-3.12-sanitized/bin/arm-v7a-linux-gnueabihf-gdb** ---- \\ ==== Add Qt version from BSP ==== Select **Tools** / **Options** in the main window of Qt Creator \\ {{:en:general_information:qt_1.jpg?nolink&800| }} \\ \\ In the Options menu select **Build & Run** from the menu tab on the left side then select **Qt Versions** tab and click on the **Add** button on the upper right side a filemanager window appers \\ {{:intern:general_information:qt-version_rev109.jpg?nolink&800|}} navigate to **/your/BSP source/platform-/sysroot-cross/bin/qmake**\\ for this tutorial **/home/tq/workspace/BSPs/TQMa6x-BSP_REV.0109/platform-MBa6x/sysroot-cross/bin/qmake** ---- ==== Add a device ==== Select **Tools** / **Options** in the main window of Qt Creator \\ {{:en:general_information:qt_1.jpg?nolink&1000| }} \\ \\ in the Options menu select **Device** and click on **Add** button {{:en:general_information:qt_8.jpg?nolink&800|}} \\ The device configuration wizard appears \\ {{:en:general_information:qt_10.jpg?nolink&300|}} \\ select **Generic Linux Device** and click on **Start Wizard** \\ in the following window you have to set the connection parameters \\ {{:en:general_information:qt_9.jpg?nolink&600|}} __**The name to identify this configuration**__ you can enter any Name here e.g. ****\\ for this tutorial **STKa6x**\\ \\ __**The device's host name or IP address**__ enter device name or IP address of the target\\ for this tutorial **192.168.9.155**\\ \\ __**The username to log into the device**__ enter username for user on the target device\\ for this tutorial **root**\\ \\ __**The authentication type**__ select password\\ for this tutorial **password**\\ \\ __**the user's password**__ enter password for user on the target device\\ for this tutorial **••••**\\ ---- ==== Define a Kit ==== Select **Tools** / **Options** in the main window of Qt Creator \\ {{:en:general_information:qt_1.jpg?nolink&800| }} \\ \\ In the Options menu select **Build & Run** from the menu tab an the left side then select **Kits** tab and click on **Add** button on the upper right side \\ {{:intern:general_information:qt_define_a_kit_rev109.jpg?nolink&800|}} \\ you have to set\\ __**Name**__ Name for the Kit\\ for this tutorial **TQ generic ARM v7**\\ \\ __**File system name**__ \\ for this tutorial **generic-armv7**\\ \\ __**Device type**__ select **Generic Linux Device** \\ \\ __**Device**__ will be automatically fill up if you configured a[[intern:general_information:qt_creator#Add a device| device]] before\\ \\ __**Sysroot**__ set your root debug folder **/path/to/your/BSP source/platform/root-debug**\\ for this tutorial**/home/tq/workspace/BSPs/TQMa6x-BSP-REV.0109/platform-MBa6x/root-debug**\\ \\ __**Compiler**__ select [[intern:general_information:qt_creator#Add compiler from BSP source| compiler]] you configured before\\ for this tutorial **arm-v7a-gnueabihf**\\ \\ __**Debugger**__ select [[intern:general_information:qt_creator#Add debugger from BSP source| debugger]] you configured before\\ for this tutorial **arm-v7a-gnueabihf**\\ \\ __**Qt version**__ select [[intern:general_information:qt_creator#Add Qt version from BSP| Qt version]] you configured before\\ for this tutorial **Qt 5.3.2 (sysroot-cross)** \\ \\ __**Qt mkspec**__\\ =====Creating Hello World with QT Creator===== * [[intern:general_information:qt_creator:qt_quick|Create Qt widget application]] * [[intern:general_information:qt_creator:qt_quick|Create Qt quick application]]