Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. erroneous editor issue altough i can compile with gcc arm
QtWS25 Last Chance

erroneous editor issue altough i can compile with gcc arm

Scheduled Pinned Locked Moved Solved General and Desktop
12 Posts 2 Posters 1.3k 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.
  • C Offline
    C Offline
    chrisPyres66
    wrote on last edited by
    #1

    Dear all,

    I can compile all the code with gcc arm, and debug the stm microcontroller through a STLink device (Bare metal).
    Unforutnately, when i edit the main for example, i have got many errors and warning all along the file.

    I think it is due to different paths between gcc compiler and qtcreator editor.
    Unfortunately, i dont know how to inform qtcreator editor to use the same paths.

    I tried the three options in CMake tab of "compiler and execute" without success.
    If you could help, i will learn something...

    Thanks,

    aha_1980A 1 Reply Last reply
    0
    • C chrisPyres66

      Dear all,

      I can compile all the code with gcc arm, and debug the stm microcontroller through a STLink device (Bare metal).
      Unforutnately, when i edit the main for example, i have got many errors and warning all along the file.

      I think it is due to different paths between gcc compiler and qtcreator editor.
      Unfortunately, i dont know how to inform qtcreator editor to use the same paths.

      I tried the three options in CMake tab of "compiler and execute" without success.
      If you could help, i will learn something...

      Thanks,

      aha_1980A Offline
      aha_1980A Offline
      aha_1980
      Lifetime Qt Champion
      wrote on last edited by
      #2

      hi @chrisPyres66,

      which Creator version do you use? on which platform?

      also, which error do you exactly get?

      regards

      Qt has to stay free or it will die.

      1 Reply Last reply
      0
      • C Offline
        C Offline
        chrisPyres66
        wrote on last edited by
        #3

        Yes, you are right.

        I have a virtualbox of ubuntu 18.04.1 LTS with QT Creator 4.7.1 and I did not have this problem when i installed with QT Creator 4.6.2.

        aha_1980A 1 Reply Last reply
        0
        • C chrisPyres66

          Yes, you are right.

          I have a virtualbox of ubuntu 18.04.1 LTS with QT Creator 4.7.1 and I did not have this problem when i installed with QT Creator 4.6.2.

          aha_1980A Offline
          aha_1980A Offline
          aha_1980
          Lifetime Qt Champion
          wrote on last edited by
          #4

          Hi @chrisPyres66,

          please provide the exact error message you get.

          Creator 4.7 has the Clang Code Model activated, which was not the case for 4.6.

          Regards

          Qt has to stay free or it will die.

          1 Reply Last reply
          0
          • C Offline
            C Offline
            chrisPyres66
            wrote on last edited by
            #5

            Dear @aha_1980,

            Thanks for your interest.

            I have got errors all along every files due to include issue like this
            #include STM32_HAL_H
            ==> expected "FILENAME" or <FILENAME>

            I tried to configure or desactivate clang code model but without success.

            aha_1980A 1 Reply Last reply
            0
            • C chrisPyres66

              Dear @aha_1980,

              Thanks for your interest.

              I have got errors all along every files due to include issue like this
              #include STM32_HAL_H
              ==> expected "FILENAME" or <FILENAME>

              I tried to configure or desactivate clang code model but without success.

              aha_1980A Offline
              aha_1980A Offline
              aha_1980
              Lifetime Qt Champion
              wrote on last edited by
              #6

              Hi @chrisPyres66,

              Well, you could disable Clang Code Model in Help > About Plugins > ClangCodeModel, but the "classic" code model is no longer developed and everything new goes to Clang.

              That said, the code model is fully right, your include looks unfamiliar to me. Is that a macro? If yes, where is it defined?

              What type of project are you using?

              Qt has to stay free or it will die.

              1 Reply Last reply
              0
              • C Offline
                C Offline
                chrisPyres66
                wrote on last edited by
                #7

                Dear @aha_1980,

                It is C code for ARM microcontroleur.
                This include is to have the possibility to have same code for different microcontroler.

                In makefile, there is boardconfig.mk in include with
                HAL_INC='<stm32f7xx_hal.h>'
                and in CFLAGS:
                -DSTM32_HAL_H=$(HAL_INC)

                aha_1980A 1 Reply Last reply
                0
                • C chrisPyres66

                  Dear @aha_1980,

                  It is C code for ARM microcontroleur.
                  This include is to have the possibility to have same code for different microcontroler.

                  In makefile, there is boardconfig.mk in include with
                  HAL_INC='<stm32f7xx_hal.h>'
                  and in CFLAGS:
                  -DSTM32_HAL_H=$(HAL_INC)

                  aha_1980A Offline
                  aha_1980A Offline
                  aha_1980
                  Lifetime Qt Champion
                  wrote on last edited by
                  #8

                  Hi @chrisPyres66,

                  you still didn't answer which project type you are using.

                  It is for sure that Clang complains if it does not know that macro.

                  I just tried with a Generic Project and by adding #define INCLUDE_MAIN_H "main.h" I was able to resolve this header without problems, see screenshot:
                  0_1538382566105_5bc569ec-387d-47c8-aac3-f4e2f9eebdaa-grafik.png

                  Qt has to stay free or it will die.

                  1 Reply Last reply
                  2
                  • C Offline
                    C Offline
                    chrisPyres66
                    wrote on last edited by chrisPyres66
                    #9

                    Sorry, i try to be clearer

                    I test the open source code of OpenMV camera at : https://openmv.io/
                    I dont know what is the project type, but i can tell it is for STM microntroller, compiled with gcc, and debugged with baremetal through stlink device.

                    Effectively, if i disactivate clang code model (and not clang tools), the errors disappears.

                    Thanks,

                    aha_1980A 1 Reply Last reply
                    0
                    • C chrisPyres66

                      Sorry, i try to be clearer

                      I test the open source code of OpenMV camera at : https://openmv.io/
                      I dont know what is the project type, but i can tell it is for STM microntroller, compiled with gcc, and debugged with baremetal through stlink device.

                      Effectively, if i disactivate clang code model (and not clang tools), the errors disappears.

                      Thanks,

                      aha_1980A Offline
                      aha_1980A Offline
                      aha_1980
                      Lifetime Qt Champion
                      wrote on last edited by aha_1980
                      #10

                      Hi @chrisPyres66,

                      I'm sorry, but it's hard to help you if you provide so less information. If you don't give me the project download link, how should I find the project on that page?

                      Surely you can deactivate Clang, but sooner or later you'll need to fix that anyway - so why not now?

                      Regards

                      Edit: And if the problem is solved for you, then please close this topic as SOLVED too.

                      Qt has to stay free or it will die.

                      1 Reply Last reply
                      0
                      • C Offline
                        C Offline
                        chrisPyres66
                        wrote on last edited by
                        #11

                        Dear @aha_1980,

                        I dont know what os you use, there is the github here :
                        https://github.com/openmv/openmv

                        or the download page here
                        https://openmv.io/pages/download

                        but the install is not easy, you have a guide here :
                        https://github.com/openmv/openmv/wiki

                        I hope it helps,

                        aha_1980A 1 Reply Last reply
                        0
                        • C chrisPyres66

                          Dear @aha_1980,

                          I dont know what os you use, there is the github here :
                          https://github.com/openmv/openmv

                          or the download page here
                          https://openmv.io/pages/download

                          but the install is not easy, you have a guide here :
                          https://github.com/openmv/openmv/wiki

                          I hope it helps,

                          aha_1980A Offline
                          aha_1980A Offline
                          aha_1980
                          Lifetime Qt Champion
                          wrote on last edited by
                          #12

                          @chrisPyres66

                          I don't want to install or download that project. All I wanted to know, which project type you are using. According the wiki:

                          Go to File -> New File or Project... -> Import Project -> Import Existing Project - a dialog box will then popup.

                          you are using a Generic Project and therefore you can use the fix I have written above yesterday.

                          Regards

                          Qt has to stay free or it will die.

                          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