===== 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 (disable dropbear in ptxdist menu and build a new image) * Network connection to development host ==== Installing Qt creator ==== === Manual installation === - Download [[http://download.qt-project.org/official_releases/qtcreator/3.2/3.2.0/qt-creator-opensource-linux-x86_64-3.2.0.run|Qt Creator]] - make the downloaded file executable chmod a+x qt-creator-opensource-linux-x86_64-3.2.0.run - start with sudo sudo ./qt-creator-opensource-linux-x86_64-3.2.0.run and install Qt creator === Ubuntu packetmanager installation === - Update Packetmanager sudo apt-get update - Install Qt Creator sudo apt-get install qtcreator ---- ===== Configuring QT Creator ===== ==== Add compiler from BSP source ==== In the main window of Qt Creator select the tab **Tools** and in the dropdown menu **Options** \\ {{: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 \\ {{:en:general_information:qt_3.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.0104/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 ==== In the main window of Qt Creator select the tab **Tools** and in the dropdown menu **Options** \\ {{: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 ==== In the main window of Qt Creator select the tab **Tools** and in the dropdown menu **Options** \\ {{: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 \\ {{:en:general_information:qt_7.jpg?nolink&800| }} navigate to **/your/BSP source/platform-/sysroot-cross/bin/qmake-cross**\\ for this tutorial **/home/tq/workspace/BSPs/TQMa6x-BSP_REV.0104/platform-MBa6x/sysroot-cross/bin/qmake-cross** ---- ==== Add a device ==== In the main window of Qt Creator select the tab **Tools** and in the dropdown menu **Options** \\ {{:en:general_information:qt_1.jpg?nolink&800| }} \\ \\ 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 ==== In the main window of Qt Creator select the tab **Tools** and in the dropdown menu **Options** \\ {{: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 \\ {{:en:general_information:qt_14.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/sysroot-target**\\ for this tutorial**/home/tq/workspace/BSPs/TQMa6x-BSP-REV.0104/platform-MBa6x/sysroot-target**\\ \\ __**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 4.8.6(sysroot-cross)** \\ \\ __**Qt mkspec**__\\ ===== Creating a Hello World Application ===== To create a new project select File > New file or project > Other Projects > Empty Qt Project