Skip to content
Advertisement

How to build Qt applications for imx6 processors?

The same question was asked in a similar way, but the answer is unsatisfying. That’s why I wanted to ask the following one more time:

  • Starting just with an Ubuntu 14.04 OS, what are the steps that I should follow to cross-compile & deploy my Qt GUI application on an embedded board with imx6 processor?
  • Are there any tools & libraries that I have to install, except Qt Creator & Qt 5?
  • Once compiled, are there any restrictions in the functionality of the application? In other words, what the code does on PC, is also done on the board?

Advertisement

Answer

That’s a huge question!

At a minimum you need a cross-compiler that runs on your Ubuntu system but makes binaries for your iMX6 (ARM). Typically, when you download Qt it also packages a compiler with it, this compiler is built to run on the platform you downloaded Qt for and to create binaries for this same platform. You need to cross compile, so your host is (probably) x86 but your target is ARM. So you either need to get a pre-built compiler and library chain that runs on x86 and generates ARM binaries or create one yourself. For popular embedded platforms (like a Raspberry Pi for example) there are pre-built toolchains, for development boards a pre-built toolchain of some form is usually available from the vendor. For complete control of a product you would usually build one yourself that exactly met your products needs.

If you were running Qt creator on an ARM platform, the cross compiler would not be necessary, however embedded environments are typically relatively slow with limited resources, hence the cross compile. You cross compile on a fast machine that has all your tools on and run the resulting binary on the slower more limited embedded system.

Then you must cross-compile an operating system that will run on the iMX6, probably including a custom boot loader and drivers appropriate for your embedded system.

Then you need to build Qt against this ARM target.

Then you can build your app in Qt on top of all that.

I would suggest you look at Yocto (https://www.yoctoproject.org/) to build a minimal system to run on the iMX6 along with the partnered cross compiler. Alternatively you could look at crosstool-ng (http://crosstool-ng.org/) to build the compiler and then hand roll the O/S on top of that yourself.

Usually, if you have a development board from some manufacturer, they’ve done all of this for you so you can at least try stuff out day 1!

User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement