Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. [QBS] How to connect COSMIC compiler
Forum Updated to NodeBB v4.3 + New Features

[QBS] How to connect COSMIC compiler

Scheduled Pinned Locked Moved Solved Qt Creator and other tools
qbs
16 Posts 3 Posters 1.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.
  • K Offline
    K Offline
    kuzulis
    Qt Champions 2020
    wrote on last edited by kuzulis
    #4

    Hi.

    Unfortunately, I didn't add the Cosmic compiler support to QtCreator itself (I didn't have the time or desire ). The reason is that this compiler is rarely used (but you can add the task on QtCreator bug-tracker and then I will try, maybe). ;)

    A good news is that you can add the Cosmic toolchain in QtCreator as Custom toolchain as follows:

    • Make sure that the BareMetal plugin is enabled.

    • Goto Tools->Options->Kits->Compilers->Add Custom->C:

      • Set desired compiler name (e.g. Cosmic (C)).
      • Choose path to the cxstm8.exe executable (in my case this was c:\COSMIC\FSE_Compilers\CXSTM8\cxstm8.exe).
      • Choose API unknown-baremetal-generic-unknown-unknown.
      • Click on Apply button.
    • Goto Tools->Option->Devices->Devices->Add->Bare Metal Device:

      • Set desired sevice name (e.g. stm8).
      • Click on Apply button.
    • Goto Tools->Options->Kits->Kits->Add:

      • Set desired kit name (e.g. COSMIC).
      • Set Device Type -> Bare Metal.
      • Set Device -> stm8.
      • Set Compiler C -> Cosmic (C).
      • Set Compiler C++ -> None.
      • Set Debugger -> None.
      • Set Qt version -> None.

    Right now, you need to tell to Qbs that this custom compiler is cosmic for stm8 architecture (these names are special reserved in Qbs, this and this):

    • Click on Change button in the Additional Qbs Profile Setitngs entry (in your Kit), and then:

      • Add entry for Key -> qbs.architecture; Value -> stm8.
      • Add entry for Key -> qbs.toolchain; Value -> cosmic.
      • Click on OK button.
    • Click on Apply in your Kit.

    Right now you need to check that the Qbs recognized that profile, goto Tools->Options->Qbs->Profiles, and then:

    • Choose your COSMIC kit from the combo box.
    • Make sure that its profile values are qbs.architecture is stm8, and qbs.toolchain is cosmic and also the compiler path is valid and the compiler names are cxstm8.exe.
    • Other targetPlatform can be empty.

    It should work. ;)

    PS: Alternativelly, you can use the VSCode IDE with the Qbs extension, there are not need to make such configuration. ;)
    PS2: If you is a Russian speacker, then you can ask direct questions in this Discord channel.

    1 Reply Last reply
    2
    • A Offline
      A Offline
      Albion
      wrote on last edited by Albion
      #5

      @kuzulis

      Really thank you for helping me, but of couse I did all as you say and it didn`t work.

      4c60bf46-2ba4-4c42-8db4-a65662946d67-image.png

      P.S. Reffering to discord server doesn`t work, maybe you can to send a invitation.

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

        Really thank you for helping me, but of couse I did all as you say and it didn`t work.

        You need to set the Show command line check-box in Build Steps of your Projects side pane options. Then we can see the real compiler invokes and they errors.

        You can start at first from the simple main.c application.

        Reffering to discord server doesn`t work, maybe you can to send a invitation.

        Try this.

        1 Reply Last reply
        0
        • A Offline
          A Offline
          Albion
          wrote on last edited by
          #7

          @kuzulis that what happens with just creating proj (only auto-generated main.c) :

          ed17a939-0e99-437c-b292-7d08132a7677-image.png

          build steps are empty:
          31f2b809-618b-4638-95ff-2aa14972a076-image.png

          P.S. If you prefer russian lang I would waiting in discord

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

            Seems your Qbs configuration is wrong. Please show the Qbs profile settings (screenshoot with expanded items) for your Cosmic kit (from Tools->Options->Qbs->Profiles).

            If you prefer russian lang I would waiting in discord

            No, I will there a later.

            1 Reply Last reply
            0
            • A Offline
              A Offline
              Albion
              wrote on last edited by Albion
              #9

              @kuzulis
              6cf3bc5e-24fb-4d2e-90d1-165ec6f847d4-image.png

              e7706bfc-4916-4cc1-aa04-f3688e35ca58-image.png

              bb907a77-50ef-4730-a35a-2642f2343241-image.png

              jsulmJ 1 Reply Last reply
              0
              • A Albion

                @kuzulis
                6cf3bc5e-24fb-4d2e-90d1-165ec6f847d4-image.png

                e7706bfc-4916-4cc1-aa04-f3688e35ca58-image.png

                bb907a77-50ef-4730-a35a-2642f2343241-image.png

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

                @Albion C++ compiler is missing

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

                A 1 Reply Last reply
                0
                • jsulmJ jsulm

                  @Albion C++ compiler is missing

                  A Offline
                  A Offline
                  Albion
                  wrote on last edited by
                  #11

                  @jsulm As Kuzulis say: "Set Compiler C++ -> None"

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

                    Hmm.. what's QtCreator version is? Need to use at least v6.0.2 (because there are Qbs 1.21).

                    1 Reply Last reply
                    0
                    • A Offline
                      A Offline
                      Albion
                      wrote on last edited by Albion
                      #13

                      @kuzulis 5ede28fc-3cf6-4fea-a9b1-afe0c29cb493-image.png
                      P.S. When I trying stm32 and arm-none-eabi-g++ compiler , I have the same problem

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

                        Try to re-start the QtCreator, then clear all *.user files from the sources of your project and then re-open your test project again from scratch.

                        1 Reply Last reply
                        0
                        • A Offline
                          A Offline
                          Albion
                          wrote on last edited by
                          #15

                          @kuzulis not successfull but builing logs create new messages cb63fd41-e436-4a6c-8a23-158d9cadd289-image.png

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

                            Well, right now the Qbs invokes the cosmic compiler.

                            Seems, you need in the cosmic linker files *.lkf that is the cosmic-dependend stuff. Please read the cosmic compiler manual how to compile the simple application (what's you need for this).

                            Maybe you need in *.lkf stub as here.

                            Also, due to the COSMIC is an very outdated toolchain, then maybe you need to place your project with the short paths as possible (because the cosmic has a limitations for that).

                            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