Configuring Qt Creator for the Banana Pi

Configuring Qt Creator for the Banana Pi

31st May 2019 0 By Tanna Techbiz LLP
  • While it is not the only option, Qt Creator  the integrated development environment (IDE) of choice for Qt. It provides good support for developing for embedded systems, including cross-compiling, deploying to a target system, debugging and profiling. It’s free, well documented, and actively developed.
  • Configuring Qt Creator for embedded development is sometimes a stumbling block for our Qt training students and consulting customers. In our recent Qt For Beginners webinar series it was suggested we present detailed instructions showing how to configure Qt Creator for a common embedded board. That was an excellent suggestion, so here they are.
  • For this example, I’ll use the Banana Pi platform. It is a popular and low-cost board that can be used for embedded applications. The steps would be similar for other boards, such as BeagleBone Black.
  • I’ll outline the procedure to get an embedded development environment up and running, including the commands used and configuration screen shots. For this exercise I’m using a Banana Pi running the Raspbian Linux distribution. Development will be on an Ubuntu Linux desktop using Qt 5.7.0 and Qt Creator 4.0.3.

Here are the key steps:

  1. Install Qt Creator
  2. Set up the toolchain/SDK
  3. Build a cross-compiled Qt
  4. Configure Qt Creator
  5. Test the configuration and begin embedded development

Step 1:  Install Qt Creator.

Open the terminal Ctrl+Alt+t

  • Sudo apt-get install qt5-dev-tools

Step 2: Set up the toolchain/SDK

  • Sudo apt-get install qtcreator
  • Sudo apt-get install gcc

Step 3: Build a cross-compiled Qt

Open  qt creator using qtcreator command in terminal

 

 Build a cross-compiled Qt

Qt creator

Step 4: Configure Qt Creator

Open Qtcreator and do the following

Options > build & run > tab tool chain > button add >Choose GCC

Then set compiler path : /usr/bin/arm-linux-gnueabihf-gcc-4.6
Debugger : /usr/bin/gdb
Mkspec : default

Configure Qt Creator

Step 5: Test the configuration and begin embedded development

Go to menu help > about plugins
Uncheck device support > remote linux
Restart Qt Creator
Go to tools > options TAB > build & run > Qt versions > add “/usr/bin/qmake-qt4”

This is all you need to install qt on banana pi. You can then start working on Qtcreator.
However there is a problem that the code u write in Qt does not get built and compiled from the normal build and run button of Qt.