Uploaded image for project: 'Qbs ("Cubes")'
  1. Qbs ("Cubes")
  2. QBS-1203

Unable to parse and build an application using AVR GCC compiler



    • Bug
    • Resolution: Done
    • Not Evaluated
    • 1.9.1
    • 1.9.0
    • Qt Creator Integration
    • None
    • * QtC 4.4.0 (official)
       * QBS 1.9.0 (delivered with QtC)
       * AVR GCC
       * Host OS Windows
       * Target Bare Metal Device
    • 4551429f1a30c2256a48e9fd0044a0e7567539ca


      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


      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


      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'


        1. avr-device.png
          34 kB
          Denis Shienkov
        2. avr-gcc-info.log
          14 kB
          Denis Shienkov
        3. avr-kit.png
          49 kB
          Denis Shienkov
        4. avr-qbs-profile-settings.png
          5 kB
          Denis Shienkov
        5. avr-qbs-profile-settings-view.png
          41 kB
          Denis Shienkov
        6. gcc-avr-c.png
          48 kB
          Denis Shienkov
        7. gcc-avr-c++.png
          48 kB
          Denis Shienkov
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.



            jakepetroules Jake Petroules (DO NOT ASSIGN ISSUES)
            kuzulis Denis Shienkov
            0 Vote for this issue
            2 Start watching this issue



              Gerrit Reviews

                There are no open Gerrit changes