Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Qt executables run without error, but nothing displays
QtWS25 Last Chance

Qt executables run without error, but nothing displays

Scheduled Pinned Locked Moved Mobile and Embedded
zynqzedboardubuntu 14.04qt 4.7.3vmwarehello worldcross compilearmxilinxlibraries
12 Posts 2 Posters 6.6k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    jkern
    wrote on 1 Sept 2015, 18:51 last edited by
    #1

    I'm trying to set up my environment for cross compilation with the following setup:

    Host Machine: Windows PC (x86 64 bit Windows 7), running VMware Player 7, running a guest operating system of Ubuntu 14.04. I want to develop my applications in Ubuntu.

    Target: Zedboard, using a Zynq-7000 ApSoC from Xilinx. It runs on the ARM architecture (32 bit) with a Cortex-A9. On this development board, I am running a Linaro distribution from Analog Devices which is setup with some precompiled applications relevant to my project, hence I need to use this specific distribution.

    I followed this tutorial to get the cross compiler set up correctly: Zynq QT Tutorial.

    In Qt Creator, I created a new QT Widget Application, just hoping to verify that I'll be able to see a window appear on the Zynq platform. I compiled the program using:

    qmake -project
    qmake
    make

    then I followed the steps in that tutorial to create an image qt_lib.img to mount the qt install directory on the target machine. I mount the install directory in /usr/local/lib/zynq_qt_lib

    I copy the the executable of the QT application to my SD card with the boot files/root file system for the Zedboard. I move the executable from the Boot partition of the SD card to the desktop and chmod +x to make it executable. I also use

    export LD_LIBRARY_PATH=/usr/local/lib/zynq_qt_lib

    otherwise I get various errors about the program not finding the linked libraries. Now when I finally run a program like this, it runs with no errors, but nothing comes up. I've actually tried this with multiple versions of Qt (4.7.3, 5.2.1, 5.3.2, 5.5 ...) with multiple different compile settings (can go into more detail if needed) and get the same result. I've also created multiple QT programs like the HelloWorld example from this video Qt HelloWorld

    At this point I'm scratching my head because I feel like I've tried changing up all the different variables and keep getting this same result. Does it have to do with my distribution of Linaro?

    1 Reply Last reply
    0
    • S Offline
      S Offline
      SGaist
      Lifetime Qt Champion
      wrote on 1 Sept 2015, 19:50 last edited by
      #2

      Hi and welcome to devnet,

      Did you try starting your application from the command line ? That might give you some additional clues about what is happening.

      Hope it helps

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      J 1 Reply Last reply 1 Sept 2015, 19:54
      0
      • S SGaist
        1 Sept 2015, 19:50

        Hi and welcome to devnet,

        Did you try starting your application from the command line ? That might give you some additional clues about what is happening.

        Hope it helps

        J Offline
        J Offline
        jkern
        wrote on 1 Sept 2015, 19:54 last edited by
        #3

        @SGaist Yes, I would run the executables from the command line. For example:

        $ ./HelloWorld -qws

        1 Reply Last reply
        0
        • S Offline
          S Offline
          SGaist
          Lifetime Qt Champion
          wrote on 1 Sept 2015, 19:58 last edited by
          #4

          And there's nothing showing up ? Or is the screen blacked ?

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          J 1 Reply Last reply 1 Sept 2015, 19:59
          0
          • S SGaist
            1 Sept 2015, 19:58

            And there's nothing showing up ? Or is the screen blacked ?

            J Offline
            J Offline
            jkern
            wrote on 1 Sept 2015, 19:59 last edited by
            #5

            Right, there's no additional windows that pop up and the command line just moves on to the next prompt line.

            1 Reply Last reply
            0
            • S Offline
              S Offline
              SGaist
              Lifetime Qt Champion
              wrote on 1 Sept 2015, 20:12 last edited by
              #6

              That's strange, it should not do that.

              Are you sure app.exec() is called properly ?

              Interested in AI ? www.idiap.ch
              Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

              1 Reply Last reply
              0
              • J Offline
                J Offline
                jkern
                wrote on 1 Sept 2015, 20:15 last edited by jkern 9 Jan 2015, 20:15
                #7

                I literally haven't read anything about developing Qt programs yet. But as a trivial example, I created a Qt Widgets Application and just kept the default code. As a test, I compiled it with Qt 5.2.1 on my host machine, and it comes up with an empty window. So you would expect this same code is working on the target if cross-compiled correctly.

                1 Reply Last reply
                0
                • S Offline
                  S Offline
                  SGaist
                  Lifetime Qt Champion
                  wrote on 1 Sept 2015, 20:19 last edited by
                  #8

                  Good thinking, did you check that you have all the necessary rights to access the devices e.g. the frame buffer ?

                  Interested in AI ? www.idiap.ch
                  Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                  1 Reply Last reply
                  0
                  • J Offline
                    J Offline
                    jkern
                    wrote on 1 Sept 2015, 20:20 last edited by
                    #9

                    No, how do you do that? (I'm new to Linux as well...)

                    1 Reply Last reply
                    0
                    • S Offline
                      S Offline
                      SGaist
                      Lifetime Qt Champion
                      wrote on 1 Sept 2015, 20:22 last edited by
                      #10

                      groups to know the groups your user is a member of.
                      ls -la /dev/fb0 or ls -la /dev/fb/0 to see what permissions are set

                      Interested in AI ? www.idiap.ch
                      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                      1 Reply Last reply
                      0
                      • J Offline
                        J Offline
                        jkern
                        wrote on 1 Sept 2015, 20:25 last edited by
                        #11

                        groups shows:
                        analog adm dialout cdrom audio dip video plugdev admin

                        ls -la /dev/fb0 shows:
                        crw-rw---- 1 root video 29, 0 Jan 1 00:00 /dev/fb0

                        1 Reply Last reply
                        0
                        • S Offline
                          S Offline
                          SGaist
                          Lifetime Qt Champion
                          wrote on 1 Sept 2015, 20:28 last edited by
                          #12

                          Looks good.

                          Then, you should use gdb to debug your application

                          Interested in AI ? www.idiap.ch
                          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                          1 Reply Last reply
                          0

                          1/12

                          1 Sept 2015, 18:51

                          • Login

                          • Login or register to search.
                          1 out of 12
                          • First post
                            1/12
                            Last post
                          0
                          • Categories
                          • Recent
                          • Tags
                          • Popular
                          • Users
                          • Groups
                          • Search
                          • Get Qt Extensions
                          • Unsolved