Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt for MCUs
  4. Can I have separate compilers per qt mcu module?
Forum Updated to NodeBB v4.3 + New Features

Can I have separate compilers per qt mcu module?

Scheduled Pinned Locked Moved Unsolved Qt for MCUs
10 Posts 3 Posters 1.1k Views 1 Watching
  • 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.
  • I Offline
    I Offline
    inusion
    wrote on last edited by
    #1

    I currently have two modules in my project.

    I want automotive to use mcu compiler and automotive_module to use plain qt compiler.

    How should I apply it in the build step?

    Thank you for answer.

    4e163feb-8a93-4ec4-99c2-34392de404de-image.png

    22f6284a-77ed-44fb-ab94-9a24eb71ece2-image.png

    jsulmJ 1 Reply Last reply
    0
    • I inusion

      I currently have two modules in my project.

      I want automotive to use mcu compiler and automotive_module to use plain qt compiler.

      How should I apply it in the build step?

      Thank you for answer.

      4e163feb-8a93-4ec4-99c2-34392de404de-image.png

      22f6284a-77ed-44fb-ab94-9a24eb71ece2-image.png

      jsulmJ Offline
      jsulmJ Offline
      jsulm
      Lifetime Qt Champion
      wrote on last edited by
      #2

      @inusion said in Can I have separate compilers per qt mcu module?:

      How should I apply it in the build step?

      Simply define the compiler you want to use in the Kit.
      It looks like you already have two Kits: automotive and automotive_module, so go there and define the compilers.

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • I Offline
        I Offline
        inusion
        wrote on last edited by inusion
        #3

        thank you.

        I'm new to qt, so could you elaborate on how to go to that kit and define the compiler?

        For reference, the two modules you see there are one project.

        304ac08f-1118-455d-9239-40767c3f0098-image.png

        jsulmJ 1 Reply Last reply
        0
        • I inusion

          thank you.

          I'm new to qt, so could you elaborate on how to go to that kit and define the compiler?

          For reference, the two modules you see there are one project.

          304ac08f-1118-455d-9239-40767c3f0098-image.png

          jsulmJ Offline
          jsulmJ Offline
          jsulm
          Lifetime Qt Champion
          wrote on last edited by
          #4

          @inusion In menu "Tools/Options.../Kits". Select a Kit and check what compiler is set, change to another compiler if needed. Compilers are defined in same dialog in "Compilers" tab.

          https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0
          • I Offline
            I Offline
            inusion
            wrote on last edited by
            #5

            thank you. But I didn't understand. The compiler can be set for each project, but I don't know how to set the compiler for each target.

            jsulmJ 1 Reply Last reply
            0
            • I inusion

              thank you. But I didn't understand. The compiler can be set for each project, but I don't know how to set the compiler for each target.

              jsulmJ Offline
              jsulmJ Offline
              jsulm
              Lifetime Qt Champion
              wrote on last edited by
              #6

              @inusion The compiler is set for a Kit, not project.
              For each target you have one Kit. To build for a target simply select the Kit for that target...

              https://forum.qt.io/topic/113070/qt-code-of-conduct

              I 1 Reply Last reply
              0
              • jsulmJ jsulm

                @inusion The compiler is set for a Kit, not project.
                For each target you have one Kit. To build for a target simply select the Kit for that target...

                I Offline
                I Offline
                inusion
                wrote on last edited by
                #7

                @jsulm
                As you can see below, the first kit can be run individually, but the second kit cannot be run.

                The first kit is in charge of the front end and the second kit is in charge of the back end, but they cannot be compiled separately.

                The corresponding source is mcu automotive demo

                e6fad10a-0957-4724-a889-104d4b929231-image.png

                d27a4e22-2eea-43f6-8f0b-b5873f961d14-image.png

                jsulmJ 1 Reply Last reply
                0
                • I inusion

                  @jsulm
                  As you can see below, the first kit can be run individually, but the second kit cannot be run.

                  The first kit is in charge of the front end and the second kit is in charge of the back end, but they cannot be compiled separately.

                  The corresponding source is mcu automotive demo

                  e6fad10a-0957-4724-a889-104d4b929231-image.png

                  d27a4e22-2eea-43f6-8f0b-b5873f961d14-image.png

                  jsulmJ Offline
                  jsulmJ Offline
                  jsulm
                  Lifetime Qt Champion
                  wrote on last edited by
                  #8

                  @inusion If the second Kit does not work then please check it: are there any errors/warnings?

                  https://forum.qt.io/topic/113070/qt-code-of-conduct

                  I 1 Reply Last reply
                  0
                  • jsulmJ jsulm

                    @inusion If the second Kit does not work then please check it: are there any errors/warnings?

                    I Offline
                    I Offline
                    inusion
                    wrote on last edited by
                    #9

                    @jsulm
                    There are no errors or warnings, and if I build the entire project, both compile and build work fine.

                    But what I want is to make the first kit work as an mcu compiler and the second kit as a desktop compiler.

                    1 Reply Last reply
                    0
                    • S Offline
                      S Offline
                      SimonSchroeder
                      wrote on last edited by
                      #10

                      You can compile them separately, i.e. you select the desktop kit and compile the desktop project, then select the mcu kit and compile the mcu project. However, I am not aware of a way to compile both in one go at the same time. This is not necessarily a restriction from Qt (or rather Qt Creator in this case), but from CMake. You need to teach your CMake project to use two different compilers for different (sub-)projects. I can't help you with this, though.

                      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