Details
-
Bug
-
Resolution: Done
-
Not Evaluated
-
1.9.0
-
None
-
* QtC 4.4.0 (official)
* QBS 1.9.0 (delivered with QtC)
* AVR GCC
* Host OS Windows
* Target Bare Metal Device
-
4551429f1a30c2256a48e9fd0044a0e7567539ca
Description
1) I have added the GCC compilers from QtC for C and C++ targets, on options-> build&run->compilers tab (see gcc-avr-c.png, gcc-avr-c++.png):
GCC AVR (C) -> C:\Program Files (x86)\Atmel\Atmel Toolchain\AVR8 GCC\Native\3.4.1061\avr8-gnu-toolchain\bin\avr-gcc.exe GCC AVR (C+) -> C:\Program Files (x86)\Atmel\Atmel Toolchain\AVR8 GCC\Native\3.4.1061\avr8-gnu-toolchain\bin\avr-g++.exe
2) I have added a new Bare Metal Device
3) I have aded new non-qt AVR gcc Kit, based on AVR GCC compiler (see avr-kit.png)
4) I have created an simple C-like qbs project application, using the QtC wizard.
Attempt to opening for this application causes parsing errors like:
C:\Qt-meta\Tools\QtCreator\share\qtcreator\qbs\share\qbs\modules\cpp\GenericGCC.qbs:261: warning: The following properties are not set. Set them in your profile or product: cpp.architecture: you might want to re-run 'qbs-setup-toolchains'
5) Next, I have added the 'avr' architecture to qbs profile settings of selected AVR kit (see avr-qbs-profile-settings.png, avr-qbs-profile-settings-view.png):
cpp.architecture avr qbs.architecture avr
6) Now, the project was successfully parsed and the application has been successfully compiled
avr.app.qbs:
import qbs Project { minimumQbsVersion: "1.7.1" CppApplication { consoleApplication: true files: "main.c" Group { // Properties for the produced executable fileTagsFilter: product.type qbs.install: true } } }
main.c:
int main() { return 0; }
7) This command:
avr-gcc -Wp,-dM -E -x c NUL > c:\Users\denis\Documents\avr-app\out.txt
gives output in 'avr-gcc-info.log'
Attachments
For Gerrit Dashboard: QBS-1203 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
206793,3 | GCC: Add support for the AVR architecture | 1.9 | qbs/qbs | Status: MERGED | +2 | 0 |