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. How to start Qt embedded programming

How to start Qt embedded programming

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
10 Posts 3 Posters 1.5k 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.
  • Q Offline
    Q Offline
    qcoderpro
    wrote on last edited by
    #1

    Hello to you,

    I would like to enter Qt embedded programming for the first time. I don't have any real project on hands for the time being; what I actually want is to be able to program devices that are mostly/commonly installed into an automobile or some industry device like a machine controller, etc, because they're highly demanded these days and I know C++/Qt so like to use it for these areas.

    I guess I should start with basics, something common that I can take advantages of it afterwards in the areas I mentioned.

    The tools I nearly certainly will make use are C++/Qt (depending on the target device) and Raspberry Pi 3 which is vastly utilized by Qt.

    So I guess I must know:
    1- How to use C++/Qt for embedded programming? To see how different it's from C++ code I write on Visual Studio or Qt Creator.
    2- What IDE should I use to create programs on and on what operating system?
    3- How to create programs for different embedded devices?
    4- How does Raspberry Pi 3 help me in the tasks?

    Thanks so much.
    I really don't know what embedded target device I will work on first whether it's GUI based or not. Probably both.
    Do you still, by reading the statements above, believe it's better to use a simulator? If so, what simulator do you suggest to me, please?

    K 1 Reply Last reply
    0
    • Q qcoderpro

      Hello to you,

      I would like to enter Qt embedded programming for the first time. I don't have any real project on hands for the time being; what I actually want is to be able to program devices that are mostly/commonly installed into an automobile or some industry device like a machine controller, etc, because they're highly demanded these days and I know C++/Qt so like to use it for these areas.

      I guess I should start with basics, something common that I can take advantages of it afterwards in the areas I mentioned.

      The tools I nearly certainly will make use are C++/Qt (depending on the target device) and Raspberry Pi 3 which is vastly utilized by Qt.

      So I guess I must know:
      1- How to use C++/Qt for embedded programming? To see how different it's from C++ code I write on Visual Studio or Qt Creator.
      2- What IDE should I use to create programs on and on what operating system?
      3- How to create programs for different embedded devices?
      4- How does Raspberry Pi 3 help me in the tasks?

      Thanks so much.
      I really don't know what embedded target device I will work on first whether it's GUI based or not. Probably both.
      Do you still, by reading the statements above, believe it's better to use a simulator? If so, what simulator do you suggest to me, please?

      K Offline
      K Offline
      koahnig
      wrote on last edited by
      #2

      @qcoderpro

      Basically it depends what your current platform is. Since you are writing about use of VisualStudio, I guess it is windows.
      I do my development on Windows 10 using Qt creator with MinGW toolchains. I have switched years back to Qt creator, because you have the same environment on Linux devices.

      I have done cross-compiling for different embedded platforms like BeagleBone and others and also Raspberry Pi3. When the embedded device is using a linux based OS, there is IMHO the best choice to go to a linux desktop for cross-compilation. With Qt creator you have already the same dev environment also on a linux desktop and you can easily switch between desktop and cross-compilation toolchains. I am using VirtualBox for running a Linux installation to perform these tasks.

      There are ways to do cross-compilation for linux embedded devices on windows directly, but personally prefer the strict separation. Especially with the file system it is easier. Typically you need to cross-compile Qt libs for embedded devices on your own.

      Vote the answer(s) that helped you to solve your issue(s)

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

        Hi,

        1. C++ is C++ whether you are compiling for an RPi or a desktop machine. The cross-compiler for the target will define what C++ feature/standard is available to you.
          What can change is the backend you'll be using.
        2. Qt Creator will likely be a good choice to work.
        3. You need the toolchains matching these devices as well as a sysroot that provides all the libraries needed to build your application and or Qt
        4. It's a pretty cheap embedded system that is know to work pretty well with Qt

        If you are interested in the automotive world, you should take a look at the Qt for Automive suite.

        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
        2
        • K koahnig

          @qcoderpro

          Basically it depends what your current platform is. Since you are writing about use of VisualStudio, I guess it is windows.
          I do my development on Windows 10 using Qt creator with MinGW toolchains. I have switched years back to Qt creator, because you have the same environment on Linux devices.

          I have done cross-compiling for different embedded platforms like BeagleBone and others and also Raspberry Pi3. When the embedded device is using a linux based OS, there is IMHO the best choice to go to a linux desktop for cross-compilation. With Qt creator you have already the same dev environment also on a linux desktop and you can easily switch between desktop and cross-compilation toolchains. I am using VirtualBox for running a Linux installation to perform these tasks.

          There are ways to do cross-compilation for linux embedded devices on windows directly, but personally prefer the strict separation. Especially with the file system it is easier. Typically you need to cross-compile Qt libs for embedded devices on your own.

          Q Offline
          Q Offline
          qcoderpro
          wrote on last edited by
          #4

          Thank you both very much.
          What do you mean by cross-compilation, please? Is it what Qt Creator does using different kits for different platforms?

          Is it right that every embedded device should have a kind of operating system and compiler installed firstly and then we're able to write programs (GUI or non-GUI) for it? (It naturally must be true!)

          And also, what is the variety of those operating systems the majority of embedded devices are running whether they have a screen or not, please? And how to recognize the OS when we have the device at hands?

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

            Cross-compilation is the action of building on one architecture for another one. Qt Creator is just an IDE. It gives you a nice and easy way to handle several differs versions of Qt.

            No, but usually, you use the sysroot of the device so you can easily install the development package of libraries you want to use for your application.

            That depends on your target segment, you have various flavour of Linux, VxWorks, Android, etc. Even bare metal to some extent.

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

            Q 1 Reply Last reply
            2
            • SGaistS SGaist

              Cross-compilation is the action of building on one architecture for another one. Qt Creator is just an IDE. It gives you a nice and easy way to handle several differs versions of Qt.

              No, but usually, you use the sysroot of the device so you can easily install the development package of libraries you want to use for your application.

              That depends on your target segment, you have various flavour of Linux, VxWorks, Android, etc. Even bare metal to some extent.

              Q Offline
              Q Offline
              qcoderpro
              wrote on last edited by
              #6

              I devoted good time on Docs to read some related pages but still have some ambiguities, unfortunately.

              To get it straight: If we want to enter the automotive world, using Qt/C++ we had better install Qt Automotive Suite (which has a free/open source license for Linux) on a Linux distro, say Ubunto or Debian, using a virtual machine, for example. correct?

              Do we still need RPi 3/4? For what purpose, please? I guess we need that to cover other areas of embedded systems than Automotive. Correct?

              K 1 Reply Last reply
              0
              • Q qcoderpro

                I devoted good time on Docs to read some related pages but still have some ambiguities, unfortunately.

                To get it straight: If we want to enter the automotive world, using Qt/C++ we had better install Qt Automotive Suite (which has a free/open source license for Linux) on a Linux distro, say Ubunto or Debian, using a virtual machine, for example. correct?

                Do we still need RPi 3/4? For what purpose, please? I guess we need that to cover other areas of embedded systems than Automotive. Correct?

                K Offline
                K Offline
                koahnig
                wrote on last edited by
                #7

                @qcoderpro said in How to start Qt embedded programming:

                I devoted good time on Docs to read some related pages but still have some ambiguities, unfortunately.

                To get it straight: If we want to enter the automotive world, using Qt/C++ we had better install Qt Automotive Suite (which has a free/open source license for Linux) on a Linux distro, say Ubunto or Debian, using a virtual machine, for example. correct?

                Apparently no according to https://doc.qt.io/qt-5/qtmodules.html#value-add-modules . However you need to check with commercial guys for what is available.

                Do we still need RPi 3/4? For what purpose, please? I guess we need that to cover other areas of embedded systems than Automotive. Correct?

                You brought up RPi. You need to decide on your device and embedded OS. If that is not RPi or another linux based you might have to check further, if it is suitable for your development.

                Vote the answer(s) that helped you to solve your issue(s)

                Q 1 Reply Last reply
                3
                • K koahnig

                  @qcoderpro said in How to start Qt embedded programming:

                  I devoted good time on Docs to read some related pages but still have some ambiguities, unfortunately.

                  To get it straight: If we want to enter the automotive world, using Qt/C++ we had better install Qt Automotive Suite (which has a free/open source license for Linux) on a Linux distro, say Ubunto or Debian, using a virtual machine, for example. correct?

                  Apparently no according to https://doc.qt.io/qt-5/qtmodules.html#value-add-modules . However you need to check with commercial guys for what is available.

                  Do we still need RPi 3/4? For what purpose, please? I guess we need that to cover other areas of embedded systems than Automotive. Correct?

                  You brought up RPi. You need to decide on your device and embedded OS. If that is not RPi or another linux based you might have to check further, if it is suitable for your development.

                  Q Offline
                  Q Offline
                  qcoderpro
                  wrote on last edited by
                  #8

                  @koahnig

                  If it's not free, I can't use it.

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

                    Based on the Qt For Automotive installation page, it's dual licensed. As @koahnig suggested, double check with The Qt Company.

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

                    Q 1 Reply Last reply
                    2
                    • SGaistS SGaist

                      Based on the Qt For Automotive installation page, it's dual licensed. As @koahnig suggested, double check with The Qt Company.

                      Q Offline
                      Q Offline
                      qcoderpro
                      wrote on last edited by
                      #10

                      @sgaist
                      It says: To find a license that suits your need, refer to the guide on Download Qt.

                      So it has two licenses like the qt itself. Free/open source and the commercial one. I'm using open source Qt so I will install its open source (and limited!) version.

                      So my plan is this:
                      1_ I will install Qt + Qt Automotive Suite on a Linux machine, say Ubuntu or Debian.
                      2_ Then try to find a cheap RPi 3/4 and cross compile it with Qt on the Linux machine.
                      And then try embedded programming using C++/Qt.

                      Do you find my plan good, please?

                      1 Reply Last reply
                      0

                      • Login

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