Qt embedded with LTIB



  • Hello,

    I'm trying to make a Hello World for 2 weeks ago and still I do not know how to proceed. I am alone and new in programming qt.
    I have visited google, IMXCommunity.org but i don't know how do it.

    I'm trying to create a qt embedded linux aplication on freescale imx23. But I don't know how configure the qt environment.

    I have used LTIB.
    LTIB has created the crosstool for imx23 in /opt/freescale/usr/local/gcc-4.1.2-glibc-2.5-nptl-3/arm-none-linux-gnueabi/bin

    The commands used: ./ltib -p qtopia-4.spec -m prep and ./ltib -p qtopia-4.spec -m scbuild. Then LTIB has created the next directory: /home/gerard/MODPOW/FREESCALE_MX23/ltib/rpm/BUILD/qtopia-opensource-4.3.0.

    This directory of qtopia-opensource-4.3.0 have the next tree: http://img340.imageshack.us/i/treeqt.jpg/

    The directory qtopiacore have the next tree: http://img809.imageshack.us/f/treeqtopiacore.jpg/

    The directory of target contains: http://img815.imageshack.us/f/targetw.jpg/
    The directory of host contains: http://img718.imageshack.us/i/hostr.jpg/
    The directory of qt contains: http://img340.imageshack.us/i/treeqt.jpg/

    Then, now I don't know if LTIB has made the configuration and compilation ready for use with the eclipse or I must make previous steps.

    Note:
    The operating system is Ubuntu 10.10.

    I have installed CDT plugins and Qt integration plugin on Eclipse.

    I installed successfully LTIB. And LTIB compiles Kernel and qtopia, alsa-utils, tslib, libpng packets successfully.

    I have installed the libraries that ubuntu requires ( Zlib, uuid-dev, libuuid, e2fslibs, e2fslibs-dev, libjpeg,libjpeg-dev,libpng, libpng-dev,libx11,libx11-dev, libxtst, libxtst-dev,x11-proto-core-dev).

    I have added the path of the crosstool "/opt/freescale/usr/local/gcc-4.1.2-glibc-2.5-nptl-3/arm-none-linux-gnueabi/bin" on variable PATH in .bashrc file.

    I have added the path "/home/gerard/MODPOW/FREESCALE_MX23/ltib/rpm/BUILD/qtopia-opensource-4.3.0" on variable PATH in .bashrc file.

    I would be grateful if someone tell me I can do



  • Hello, I am approaching the same thing. Can we discuss our relative stat-of -the art? It can be very useful for me. Take also a loog and subcribe to the group QT-embedded ...

    Thanks



  • Hello.

    Im using a freescale imx51 board, but have successfully compiled the kernel, made the rootfs, booted it and written and run a hello-world qt project.

    From your post i have trouble interpreting what and where your problem really is, i.e is the problem the qt compiling, qt programming, ltib setup or kernel? I understand the goal, you want the board to run a qt hello world app.

    Have you successfully booted the target (freescale board) seeing that the kernel runs as it should, and you can log onto the system (busybox or whatever system you run on the target board) ?
    Have you successfully compiled qt for the target board? Or are you using ltib to do that for you?

    Regards
    Andreas



  • Hello Andreas,

    Thank you very much for the post. Well, the cpu is Arm LPC 3250. At the actual dat I have the following:

    1 Ltib compiles and run with network support, ftp, telnet and tftp, ssh on the embedded board. If you need I can also give you remote access via ssh on the Internet.

    2 i have installed the linux created with ltib on the board using jffs2 filesystem and as usual the uboot. To do this, I have used a usb memory.

    The actual issues on the embedded board that are meaningless with the problem are that sd card don't wkrk fine. The system boots on the board from its internal flash and the filesystem is writable without difficult. Obvious the base of the shell conds are busybox also installed and running.

    What is in my thoughts is that by one side there is the linux system, that what I describe above, and by another side should be the qt framwrok that i should install on the system. Fortunately the board has almost a lot of internal resources: about 2Gb of flash and 64 mb of memory so there is not a al difficult in program size for testing, copy of the libraries etc.

    In the same ubuntu 10.4 host where I ran ltib toolchain I installed the Qt everywhere package to be sure that I use the same gcc compiler. I sEtup the Qt config to cross compile for Arm using its standard configuration. As a matter of fact leaving most of the configuration files to their default I see that the compilation (libraries and examples at all) is in /usr/local/Trolltech/QtEmbedded-4.7.2-Arm

    At this point I hav transefered some example application and the libraries from this directory to the embedded platform via tftp. I know that I should set the right environment variables and symlinks to see the Qt libraries - in the embedded platform I replicated the same directory structure /usr/local/... Running a sample application with or without the -qws option and despites tha can be something wrong finding the right libraries and components I expect errors like shared librqry not found. But I obtain this strange sayntax error like the application is not with the correct instruction or something else that I can't focus what it can be.

    It is my convinction that the reason maybe a wrong setting or a stupid parameter that I have missed because if all the libraries and examples compile after about one hour on the host ubuntu without problems and the saettings are for the arm processor, I hqve no idea of what can be different.

    I hope that everything is clear,. Thank you for your help Andre, because I have no good ideas to solv this issue.



  • Hello Enrico.

    This sound like a delicate problem, ill just throw a few ideas that came to mind.

    Are you certain Qt was built with the correct crosscompiler? I had similar problem when i compiled some c++ code, where the system used the regular x86 compiler instead of the arm-something-gnueabi one.

    Write a c++ hello-world that print hello world to std output.
    Compile on computer and check that it runs. Then do crosscompile of same sourcecode, and check that you CAN NOT run it on the laptop/desktop you use. Then test if the compiled code works on the target (as it hopefully does..).

    In any case, if it is not the compiler thats the issue, make sure you have defined the path to the libraries Qt use.

    export QTDIR=/usr/local/Trolltech/Qt-installation
    export LD_LIBRARY_PATH=$QTDIR/lib

    (libraries are present at /usr/local/Trolltech/Qt-installation/lib/ )

    Stupid question, you made sure that you copied the correct directory to the target, right?
    (i have multiple qt installations, where some are x86 compiled and some arm..)

    Can you provide whatever output the system gives to us?

    • Andreas


  • Hello Andreas.

    My dream is to have stupid problems that anyone can solve ... :(

    1. I am ALMOST - not certain - that I have used the correct crosscompiler. What I am sure is that the installed compiler is the same that is used by Ltib. I am also reasonably sure that I have cross-compiled because the directory created in /usr/lib/Trolltech is "QtEmbedded-4.7.2-Arm" Is there another way to know ? I imagine that the cross-compiler uses the Gcc compiler that is installed in the system, does not set one. This is the same thing I see with openwrt cross compiling and ltib. The sdk install the toolchain and the configuration files, preset, instruction configuration etc. excluded the compiler itself. or Not?

    2. The correct directory is not a stupid question! In Qt for desktop it is not obvious that you copy the right directory and with more than one developer environment the confusion is not to be excluded. Well, if you confirm that /usr/local/Trolltech/Qt-installation/lib/ is the directory where I find the compiled directories, I have done.

    What is the output I should provide? the error is very simple when I try to launch the program on the embedded system it returns is something like a syntax error in a function call for a "(" un balanced or something like this. Absolutely sensless message... Later I try to connect the platfrom again and save the output.
    What I can do now is to recheck the symlinks and environment variables in the embedded platform.
    It is very impotant your post, because I am sure that the host configuration settings seems correct.

    In the case that I am working on a host that has not ltib toolchain installed, installing the Qt-everywhere and configuring the sdk for the arm platform, it is also installed the compiler or it should be installed independently? This is another try that I can do: prepare a fresh VM with ubuntu and install the Qt only.



  • bq. What is the output I should provide? the error is very simple when I try to launch the program on the embedded system it returns is something like a syntax error in a function call for a “(” un balanced or something like this. Absolutely sensless message…

    Now this seems like its been compiled with the wrong compiler. I got that same type of message when i gcc'ed code for the arm board. It did no good. Please do try to write a simple hello-world c++ program and compile to check that you have the right tools/paths etc.
    If needed i can provide source code for something like that.

    At this point it is a good idea to test whatever that can be tested, to narrow down the field of components that might have an influence.

    From what you write It seems you have done everything else you should.

    Andreas



  • Hello Andreas, thank you. I agree with your logic. If you provide a code it maybe useful, else I can use one of the very basic examples that are included in the Qt everywhere. To work in a correct test environment, I think that the best solution is that I prepare a VM with Ubuntu 10.04 and install only the Qt. Ltib is working and the linux is running on the arm, so we can exclude this aspect, at least for now.

    My doubt is if in the fresh installation of Qt everywhere on a new clean host machine, I need to install also the compiler or if the toolchaing of Qt includes also this.
    Please let me know what I should install with Qt everywhere on the host linux machine.

    Thank you. Enrico


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.