Reputation: 706
I have a project on old IAR version and basically I want to use QtCreator 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 for me. 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.
I read info by this link http://habrahabr.ru/post/258467/ and possibly all information about Qt baremetal + gcc compiler. But I didn't find anything about how to use non-gcc compiler and how you need to configure Qt for it.
Upvotes: 0
Views: 614
Reputation: 527
Right now (since Qbs 1.15, AFAIK), it is possible to use the IAR toolchain in QBS. Also it is supported in QtCreator and VSCode IDEs.
Upvotes: 1
Reputation: 1801
You can make a Rule {}
to compile IAR.
https://doc.qt.io/qbs/rule-item.html
Here's another example from my Cavewhere project. I have protobuffer files that need to be compiled into cpp and h files. The Depends { name: "cpp" }
picks artifacts from protobuffer rules and compiles them into object artifacts.
You can do the same thing with IAR. You just have to tag the files properly with Group { fileTags: "iarFiles" }
and then write a Rule { }
that takes iarFiles
as an input.
Upvotes: 1