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 Creator + IAR
Forum Updated to NodeBB v4.3 + New Features

Qt Creator + IAR

Scheduled Pinned Locked Moved Mobile and Embedded
baremetalqtcreatoriar
9 Posts 2 Posters 4.8k 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.
  • C Offline
    C Offline
    CybGen
    wrote on last edited by
    #1

    Hi. I have a project on IAR and basically I want to use Qt for editing and building the project. IAR have a custom compiler and linker. It's CR16 platform, so my case is really unusual. How to archive this goal?

    I tried already qbs and it's not working. As I understood it works with gcc compiler only and I don't know how to configure it. I also configured a compiler https://drive.google.com/file/d/0BxgcZhMUJY8_NHh1SlduZENkTFk/view and made a kit https://drive.google.com/file/d/0BxgcZhMUJY8_dFp3dFlRSnJnMm8/view

    On this point I don't need debugger support, only building, support of build configuration there I can include or exclude files from build, and see an errors from build.

    I tried to import generic project but it's not what I need, it just a code editor with some strange syntax errors (I have no such errors in IAR). So I thought I need qbs or cmake project and import everything in it.

    Thanks

    1 Reply Last reply
    0
    • K Offline
      K Offline
      kuzulis
      Qt Champions 2020
      wrote on last edited by kuzulis
      #2

      I tried already qbs and it's not working.

      You should use QBS for this case. But do not configure your compiler from QtCreator pages. You need to write your own Rules and so on in the QBS project file directly instead.

      As example, you can see on this : http://habrahabr.ru/post/258467/
      (but you need translate it from russian :) )

      C 1 Reply Last reply
      2
      • K kuzulis

        I tried already qbs and it's not working.

        You should use QBS for this case. But do not configure your compiler from QtCreator pages. You need to write your own Rules and so on in the QBS project file directly instead.

        As example, you can see on this : http://habrahabr.ru/post/258467/
        (but you need translate it from russian :) )

        C Offline
        C Offline
        CybGen
        wrote on last edited by
        #3

        @kuzulis No problem, Russian is my first language :)
        I've read the post on habra and it clarifies a bit, but as I've seen it people did it only with gcc compilers. I've read from here http://qbs.qt-project.narkive.com/OgnPBsYP/how-to-setup-an-custom-profile-without-qt that you have to create some profilers for qbs and I tried it but in vain.

        1 Reply Last reply
        0
        • K Offline
          K Offline
          kuzulis
          Qt Champions 2020
          wrote on last edited by kuzulis
          #4

          I've read from here

          It I asked this question there. :)

          you have to create some profilers for qbs

          No, this will not work with the custom compilers (like IAR, Keil and so on), because the QBS internally knows pre-defined toolchain types like, Clang, GCC, MinGW, MSVC only... If I am not mistaken.

          BTW: I used similar approach (with the custom rules) for the Keil compiler... So, it is possible to do. ;)

          C 1 Reply Last reply
          1
          • K kuzulis

            I've read from here

            It I asked this question there. :)

            you have to create some profilers for qbs

            No, this will not work with the custom compilers (like IAR, Keil and so on), because the QBS internally knows pre-defined toolchain types like, Clang, GCC, MinGW, MSVC only... If I am not mistaken.

            BTW: I used similar approach (with the custom rules) for the Keil compiler... So, it is possible to do. ;)

            C Offline
            C Offline
            CybGen
            wrote on last edited by CybGen
            #5

            @kuzulis Ok, that's why it shows me an error "...cpp\genericunix-gcc.qbs:34: error: TypeError: Result of expression 'qbs.toolchain' [undefined] is not an object." and piece of the code:
            UnixGCC {
            condition: !qbs.toolchain.contains('mingw') && !qbs.targetOS.contains('darwin') && !qbs.targetOS.contains('linux') && qbs.toolchain.contains('gcc')
            }

            I was afraid of that and it's frustrating. Is it possible to use cmake instead?

            BTW: I used similar approach (with the custom rules) for the Keil compiler... So, it is possible to do. ;)
            So how you did it then? Keil have a gcc compiler or you did some hack for qbs?

            1 Reply Last reply
            0
            • K Offline
              K Offline
              kuzulis
              Qt Champions 2020
              wrote on last edited by kuzulis
              #6

              Is it possible to use cmake instead?

              I don't know.

              So how you did it then? Keil have a gcc compiler or you did some hack for qbs?

              I created the new 'Keil' module, similar to modules from 'qbs\share\qbs\modules\cpp' as 'qbs\share\qbs\modules\keil'
              In this module I specified the paths to the Keil compiler, linker and so on, and modified appropriate Rules.

              And then instead of using:

              Depends { name: "cpp" }

              need just use:

              Depends { name: "keil" }

              for the Keil projects.

              C 1 Reply Last reply
              1
              • K kuzulis

                Is it possible to use cmake instead?

                I don't know.

                So how you did it then? Keil have a gcc compiler or you did some hack for qbs?

                I created the new 'Keil' module, similar to modules from 'qbs\share\qbs\modules\cpp' as 'qbs\share\qbs\modules\keil'
                In this module I specified the paths to the Keil compiler, linker and so on, and modified appropriate Rules.

                And then instead of using:

                Depends { name: "cpp" }

                need just use:

                Depends { name: "keil" }

                for the Keil projects.

                C Offline
                C Offline
                CybGen
                wrote on last edited by
                #7

                @kuzulis Right... If you still have it can you share with your module please? I'll modify it for IAR.

                1 Reply Last reply
                0
                • K Offline
                  K Offline
                  kuzulis
                  Qt Champions 2020
                  wrote on last edited by
                  #8

                  No, sorry. I have not it now.

                  1 Reply Last reply
                  0
                  • K Offline
                    K Offline
                    kuzulis
                    Qt Champions 2020
                    wrote on last edited by kuzulis
                    #9

                    Right now it is possible in QtCreator or VSCode using the Qbs build system. Sorry for this delay. ;)

                    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