How to use qt creator to make application on arm linux ?
-
Hi,
I know this is kind of a "Why don't you look for this tutorial here ?" answer asking question, but i am lost now. I tried to follow each tutorial i could find on how to configure qt creator to make executable for my arm board but there is always an issues. Does anyone here have experience in what i want to do ?
-
Hi wowy,
do you like to setup qt creator for native or cross build?
In generall, first of all you need is a working compiler. Second
you need qmake and the qt libraries build with this compile.
Could you provide some more information? -
It would be for crossbuil. I work on an ubuntu pc and would like to make application for my arm board. (it is for a sbc6000x, at91sam9261 micro, linux 2.6.24 on the embedded)
I have a working compiler (it tried to generate a simple "hello world" with a simple .c file with a text editor and it had no issue generating the executable to work on the arm board). I don't seems to have a qmake file for this compiler or qt liraries for it, where could i find them ? -
Ok. For this you have to build Qt from source.
You need a sysroot of your target linux mounted on your development system.
Next step is to download qt source either from git or the tar ball.
There you have to configure (http://doc.qt.io/qt-5/embedded-linux.html#configuring-for-a-specific-device) and the make and make install qtbase (and optional the modules).
This sould give you the needed qt version to have a kit in qt creator.
You also have to install the qt libraries to your real system to run your applications. -
A sysroot ?
I have a copy of the root of my embedded on my development system.In the configuration of Qt from source it is written "The most important parameters are -device and -sysroot.". But in device folder there is no "linux armv5" or somethign like that. Only linux-arm-amlogic-8726M-g++ and linux-arm-trident-pnx8473-g++ seems to talk about linux and arm but i don't know which one to choose and if this is one of them that i must choose. And then once again the -sysroot thing. Nothing is explained here http://doc.qt.io/qt-5/configure-options.html ...
Make, make install qtbase, i understand what to do. Ok.
"This sould give you the needed qt version to have a kit in qt creator."
I would assume i will have to go in tools/options/build and run and then kit and i will find the good thing. Ok."You also have to install the qt libraries to your real system to run your applications."
Where can i find them on my current system and where do i put them in the real system ? -
"A sysroot ?
I have a copy of the root of my embedded on my development system."
This is exactly what you need. You set -sysroot to the path to your embedded root dir."But in device folder there is no "linux armv5" or somethign like that"
The device folder contains specific code for a target board like OpenGL ES Support for eglfs plugin for the raspi. If your device is not listed you can create your own device qmake.conf by starting with a copy of for example linux-arm-gnueabi-g++."I would assume i will have to go in tools/options/build and run and then kit and i will find the good thing. Ok."
The compiler and qt will not be recognized automatic in qt creator, you have to provide the path to compiler an qt and create a kit."Where can i find them on my current system and where do i put them in the real system ?"
After successful make install the libraries will get copied to your embedded sysroot on your development system. So you can either copy the whole sysroot to your device or just the libraries. -
Hi, i tried to configure qt using the example :
./configure -release -opengl es2 -device linux-rasp-pi-g++ -device-option CROSS_COMPILE=$TOOLCHAIN/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin/arm-linux-gnueabihf- -sysroot $ROOTFS -prefix /usr/local/qt5
and chnaging it for my situation like this :
./configure -release -opengl es2 -device linux-arm-g++ -sysroot /home/spi/Bureau/rootfs_default -prefix /usr/local/qt5But i have this error : Could not determine the target architecture!
When trying ./configure --help i can't even find the "-device" part in the help, making me wonder if the Qt website is to date with their software.
Where i am now :
- i have a compiler
- i have qt creator installed
- i have a root copy of my embedded system
- i have the tar for qt4.6, 4.6.2, 4.8, 5.4.1 on my ubuntu pc
- I know how that i must go in tools/option/buildandrun to then create my kit after qt is compiled and isntalled
- I know that after compiled and installed i will have to copy the librairies in my root copy in the real root of my system.
Where i am stuck is configuring qt.
-