erroneous editor issue altough i can compile with gcc arm
-
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,
-
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,
hi @chrisPyres66,
which Creator version do you use? on which platform?
also, which error do you exactly get?
regards
-
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.
-
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.
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
-
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.
-
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.
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?
-
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) -
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)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:
-
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,
-
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,
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.
-
Dear @aha_1980,
I dont know what os you use, there is the github here :
https://github.com/openmv/openmvor the download page here
https://openmv.io/pages/downloadbut the install is not easy, you have a guide here :
https://github.com/openmv/openmv/wikiI hope it helps,
-
Dear @aha_1980,
I dont know what os you use, there is the github here :
https://github.com/openmv/openmvor the download page here
https://openmv.io/pages/downloadbut the install is not easy, you have a guide here :
https://github.com/openmv/openmv/wikiI hope it helps,
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