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. Cross compile targeting Linux ARMv7
QtWS25 Last Chance

Cross compile targeting Linux ARMv7

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
6 Posts 2 Posters 985 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.
  • D Offline
    D Offline
    dland
    wrote on last edited by
    #1

    I have project that involves an embedded device running Ubuntu 16.04.2 LTS. It has a touch screen attached. We need to make a simple app with some basic animations and user interactions. The processor and RAM are both pretty limited and we want to explore Qt as an option for doing this.

    I have no Qt experience and I'm not an expert in Linux so I'm having some trouble understanding how to compile an app that will run on ARMv7. There are a lot of tutorials on how target Raspberry Pi but that's not quite the same.

    How can I get started on this? I normally develop on Mac but I'm fine using some version of Linux or even Windows if that's easier to do.

    Help a newbie out!

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi and welcome to devnet,

      Usually, these devices come with a SDK to get started. Do you have that provided ?

      Since it's a Linux device, I'd recommend using a virtual machine running a recent Linux distribution. It's going to be easier with the tooling and setting up with regard to the target. Since you are used to macOS, you won't be that lost as it is still a *nix style OS.

      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
      1
      • D Offline
        D Offline
        dland
        wrote on last edited by
        #3

        Okay, thanks for the advice. I'll get ubuntu installed in a VM or in ec2. I'm reasonably familiar with it. I don't think we are provided with any SDK on the device. It's a custom built device, nothing commercial. I'm sure we can add things to it if we need to, but I'm pretty sure we're getting mostly just a baseline version of Linux to start with.

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          Even if custom built, if they are providing you with minimal stuff to build an application for that device, we can start from there.

          Qt can be cross-compiled for lots of devices. What you need is the cross-compiler itself (or something generic like the linaro cross-compilers) and the libraries for your target which are usually taken from the target sysroot.

          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
          1
          • D Offline
            D Offline
            dland
            wrote on last edited by
            #5

            Okay, so I was able to get a super basic helloworld app cross compiled from Ubuntu desktop x86 to run on the ARMv7 device. I used arm-linux-gnueabihf-gcc for this. Nothing more than

            arm-linux-gnueabihf-gcc -o hello hello.c
            

            At this point I'm not sure where to get the sysroot files. Is there any kind of tutorial on this? I think I get the concept of cross compilng and sysroots but I just don't know how to put it all together using Qt.

            1 Reply Last reply
            0
            • SGaistS Offline
              SGaistS Offline
              SGaist
              Lifetime Qt Champion
              wrote on last edited by
              #6

              Is it the cross-toolchain from your distribution ?
              As for your device, what distribution is it running ?
              Or is the system custom built ?

              For the sysroot, the quick and extreme way is to rsync the content of your device root file system.

              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
              1

              • Login

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