Project

General

Profile

Setup QtCreator with OECORE QT 4.8.0

This guide is written in reference to Ubuntu 14.04. Some changes may be necessary if using a different version of Ubuntu.
Qt embedded 4.8.0.
Qt Creator 3.0.1 - Newest in ubuntu repo as of this time.

Assumes you've installed Aug-2012 SDK Tarball 32-Bit toolchain.
https://support.criticallink.com/redmine/projects/arm9-platforms/wiki/GCC_Toolchain

Setup cross compiler Kit

  • Open Qt Creator
  • Tools -> Options
  • Select Devices
    • Add a generic linux device and fill in ssh data to your L138 device
  • Select Build & Run. Add new entries for each tab. Inorder and hit Apply after each.
    • Debuggers:
      • Name: L138 GDB
      • Path: /usr/local/oecore-i686/sysroots/i686-angstromsdk-linux/usr/bin/armv5te-angstrom-linux-gnueabi/arm-angstrom-linux-gnueabi-gdb
    • Compilers:
      • Name: OECORE L138 GCC
      • Compiler path: /usr/local/oecore-i686/sysroots/i686-angstromsdk-linux/usr/bin/armv5te-angstrom-linux-gnueabi/arm-angstrom-linux-gnueabi-g++
    • Qt Versions:
      • Name Qt 4.8.0 (L138 OECORE)
      • qmake location: /usr/local/oecore-i686/sysroots/i686-angstromsdk-linux/usr/bin/qmake
    • Kits:
      • Name: L138
      • Device type: Generic Linux Device
      • Device: <select device created earlier>
      • Sysroot: /usr/local/oecore-i686/sysroots/armv5te-angstrom-linux-gnueabi
      • Compiler: OECORE L138 GCC
      • Debugger: L138 GDB
      • Qt Version: Qt 4.8.0 (L138 OECORE)
      • Qt mkspec: <left empty>

Create new project

See QT_Starter_Guide

Get auto deployment working

  • Edit your projects .pro file and add the following
    # Allows qtcreator to auto deploy to generic linux device aka l138.  Places executable in /home/root/.
    # Note path can't end in a slash as it breaks stopping the remote app.
    target.path = /home/root
    INSTALLS += target
    
  • This should allow you to use the Play button to auto run the app on the device.

Setup project Build Environment

The new qt creator doesn't properly detect the qt environment variables with the old 4.8.0 cross compiler. So we need to explicitly set them.

  • Open your project
  • Select the Projects tab on the left
  • Select the Build tab in the L138 Kit
  • Under Build Environment, select Details
  • Select Batch Edit and paste the following
    OE_QMAKE_AR=arm-angstrom-linux-gnueabi-ar
    OE_QMAKE_CC=arm-angstrom-linux-gnueabi-gcc
    OE_QMAKE_CXX=arm-angstrom-linux-gnueabi-g++
    OE_QMAKE_INCDIR_QT=${QTDIR}/../../armv5te-angstrom-linux-gnueabi/usr/include/qtopia
    OE_QMAKE_LIBDIR_QT=${QTDIR}/../../armv5te-angstrom-linux-gnueabi/usr/lib
    OE_QMAKE_LINK=arm-angstrom-linux-gnueabi-g++
    OE_QMAKE_MOC=${QTDIR}/bin/moc4
    OE_QMAKE_QDBUSCPP2XML=${QTDIR}/bin/qdbuscpp2xml4
    OE_QMAKE_QDBUSXML2CPP=${QTDIR}/bin/qdbusxml2cpp4
    OE_QMAKE_QT_CONFI=${QTDIR}/../../armv5te-angstrom-linux-gnueabi/usr/share/qtopia/mkspecs/qconfig.pri
    OE_QMAKE_RCC=${QTDIR}/bin/rcc4
    OE_QMAKE_UIC=${QTDIR}/bin/uic4
    OE_QMAKE_UIC3=${QTDIR}/bin/uic34
    
  • Select OK
  • You should now be able to build the project for the ARM

Go to top
Add picture from clipboard (Maximum size: 1 GB)