[QBS] How to connect COSMIC compiler
-
Tried to connect COSMIC compiler via QBS. But it only swears. Is there any tutorial on how to do this?

-
@jsulm I have a stm8 project which correct builded in Cosmic IDE. And now I want to work with this project in Qt Creator, I add a cosmic compiler in setting, but when I am trying to build it (with Qbs) its didnt work. And the warnings on img above didnt talk anything.
p.s. In release 1.20 qbs have cosmic compiler support -
Hi.
Unfortunately, I didn't add the
Cosmiccompiler 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
Cosmictoolchain inQtCreatorasCustomtoolchain as follows:-
Make sure that the
BareMetalplugin is enabled. -
Goto
Tools->Options->Kits->Compilers->Add Custom->C:- Set desired compiler name (e.g.
Cosmic (C)). - Choose path to the
cxstm8.exeexecutable (in my case this wasc:\COSMIC\FSE_Compilers\CXSTM8\cxstm8.exe). - Choose API
unknown-baremetal-generic-unknown-unknown. - Click on
Applybutton.
- Set desired compiler name (e.g.
-
Goto
Tools->Option->Devices->Devices->Add->Bare Metal Device:- Set desired sevice name (e.g.
stm8). - Click on
Applybutton.
- Set desired sevice name (e.g.
-
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.
- Set desired kit name (e.g.
Right now, you need to tell to
Qbsthat this custom compiler iscosmicforstm8architecture (these names are special reserved inQbs, this and this):-
Click on
Changebutton in theAdditional Qbs Profile Setitngsentry (in yourKit), and then:- Add entry for
Key->qbs.architecture;Value->stm8. - Add entry for
Key->qbs.toolchain;Value->cosmic. - Click on
OKbutton.
- Add entry for
-
Click on
Applyin yourKit.
Right now you need to check that the
Qbsrecognized that profile, gotoTools->Options->Qbs->Profiles, and then:- Choose your
COSMICkit from the combo box. - Make sure that its profile values are
qbs.architectureisstm8, andqbs.toolchainiscosmicand also the compiler path is valid and the compiler names arecxstm8.exe. - Other
targetPlatformcan be empty.
It should work. ;)
PS: Alternativelly, you can use the
VSCodeIDE with theQbsextension, there are not need to make such configuration. ;)
PS2: If you is aRussianspeacker, then you can ask direct questions in thisDiscordchannel. -
-
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 linecheck-box inBuild Stepsof yourProjectsside pane options. Then we can see the real compiler invokes and they errors.You can start at first from the simple
main.capplication.Reffering to discord server doesn`t work, maybe you can to send a invitation.
Try this.
-
Seems your Qbs configuration is wrong. Please show the Qbs profile settings (screenshoot with expanded items) for your
Cosmickit (fromTools->Options->Qbs->Profiles).If you prefer russian lang I would waiting in discord
No, I will there a later.
-
Hmm.. what's QtCreator version is? Need to use at least v6.0.2 (because there are Qbs 1.21).
-
Try to re-start the QtCreator, then clear all
*.userfiles from the sources of your project and then re-open yourtestproject againfrom scratch. -
Well, right now the Qbs invokes the cosmic compiler.
Seems, you need in the cosmic linker files
*.lkfthat 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
*.lkfstub 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).







