2016-11-08 09:13 PM
Hi,
In the project properties setting, I am using arm-none-eabi-gcc toolchain.
This time toolchain is Ac6 STM32 MCU GCC and builder CDT internal.
Problem is if I add h files in HAL library that error log suggest me to do, it solved and if I build project again it shows the problem in CMSIS include H files.
Such as,
1. C:\STM32_toolchain\common\Drivers\CMSIS\Device\ST\STM32F0xx\Include/stm32f0xx.h:187:3: error: declaration for parameter 'FunctionalState' but no such parameter
} FunctionalState;
^
..\inc\Src\stm32f0xx_hal_flash_ex.c:990:1: error: expected '{' at end of input
}
^
..\inc\Src\stm32f0xx_hal_flash_ex.c:990:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
APIs, Headers,state machine files are exists in Project branch, but why the compiler showing errors in H files of driver ?
Looking at C code structure related reason, yes I found some style of C coding in CMSIS h files is different.
what should I do now?1. CDT does not showing errors of my main files, there was a return type problem, I solved it.
3. I think compiler is compiling all files listed in project branch , do you want me to remove some of the files from project folder, is it repeating again as I include paths from C driver?
4. Is there any setting for which only compile my c file?
5. Do you believe, updated version of Java/gcc/Eclipse is needed ?
I am using this HAL driver STM32Cube_FW_F0_V1.6.0 downloaded from STM website.
Hope you will give me some good suggestions.
Regards
HASAN
#arm-cmsis-driver-pack #error #error #demonstration-builder #adding-files-to-the-project #arm-gcc #know-your-tools #arm-gcc #gcc Note: this post was migrated and contained many threaded conversations, some content may be missing.Solved! Go to Solution.
2016-11-17 10:31 PM
>In file included from ..\src\main.c:8:0:
>C:\STM32_toolchain\common\Drivers\CMSIS\Device\ST\STM32F0xx\Include/stm32f0xx.h:167:3: error: #error ''Please select first the target STM32F0xx device used in your application (in stm32f0xx.h file)''
#error ''Please select first the target STM32F0xx device used in your application (in stm32f0xx.h file)'' You just need to do as it says. I have a STM32F7 Cube here (which I don't use), where the relevant part of the stm32f7xx.h header looks like this:
/** @addtogroup Device_Included
* @{ */ #if defined(STM32F756xx) #include ''stm32f756xx.h'' #elif defined(STM32F746xx) #include ''stm32f746xx.h'' #elif defined(STM32F745xx) #include ''stm32f745xx.h'' #elif defined(STM32F765xx) #include ''stm32f765xx.h'' #elif defined(STM32F767xx) #include ''stm32f767xx.h'' #elif defined(STM32F769xx) #include ''stm32f769xx.h'' #elif defined(STM32F777xx) #include ''stm32f777xx.h'' #elif defined(STM32F779xx) #include ''stm32f779xx.h'' #else #error ''Please select first the target STM32F7xx device used in your application (in stm32f7xx.h file)'' #endif You something similar in the stm32f0xx.h file, for the STM32F0. Define the macro that matches the MCU derivate you use. The best place is in the project settings, with ''Preprocessor Macros''. I expect the Keil uVision ''wizard'' to do this for you when creating a new project.2016-11-17 11:19 PM
2016-11-18 12:11 AM
> It means, you want me to try only Keil uVision.
Not exactly. That's up to you. But I would go with an IDE that does the job, doesn't need much fiddling, and that I understand.> In Ecilipse the over all report is here,
> Indexed 'notun_pj' (120 sources, 31 headers) in 0.87 sec: 4,624 declarations; 40,515 references; 11 unresolved inclusions; 360 syntax errors; 15,284 unresolved names (25%) Eclipse has a parser for the editor and a target compiler for building the project. Both are separate entities, as I learned the hard way, and both might disagree. As said earlier, I never tried to mess with the Eclipse parser settings.> 1. Dont you think, if project folder(containing HAL driver and so on) living in desktop and Toolchain lives in C... The ''Desktop'' is only an OS metaphor, that does not actually exist. Rather, it is some files somewhere in a user-specific folder. Avoid putting sources or projects on the desktop.> 2. Eclipse also said, ''Error: Cannot run program ''gcc'': Launching failed '', is it means gcc path has not been included ?
Probably the toolchain path not correctly set. There should be tutorials around about setting Eclipse with a separate toolchain. Not my specific field of competence.> 3. Are you sure, we dont have any during making new project, I have just open it and playing wrongly may be. People did mistake, http://www.openstm32.org/file16?fileId=235&view=page.
Tried OpenSTM once, and didn't like it. Can't comment about it.>4. My CoIDE based project which I am working in Keil, shows CMSIS adapting problem, dont you think CMSIS should be add from their install pak system?
If I understand this correct: perhaps, but that is the task of the Coocox people. You can ask them, if they do it, and when.
2016-11-20 05:47 PM
''Avoid putting sources or projects on the desktop.''
I have changed the project location and copy that project folder in workplace of Eclipse under Tool-chain folder in C, now the console says,\STM32F0xx_HAL_Driver\\Inc'' ''-IC:\\STM32_toolchain\\common\\Drivers\\STM32F0xx_HAL_Driver\\Src'' -O0 -g3 -Wall -fmessage-length=0 -ffunction-sections -c -o ''startup\\Src\\stm32f0xx_hal_rcc_ex.o'' ''..\\startup\\Src\\stm32f0xx_hal_rcc_ex.c'' arm-none-eabi-gcc -mthumb -mfloat-abi=soft -E ''-IC:\\STM32_toolchain\\common\\Drivers\\CMSIS\\Include'' ''-IC:\\STM32_toolchain\\lib\\gcc'' ''-IC:\\STM32_toolchain\\common\\Drivers\\STM32F0xx_HAL_Driver\\Inc'' ''-IC:\\STM32_toolchain\\common\\Drivers\\STM32F0xx_HAL_Driver\\Src'' -O0 -g3 -Wall -fmessage-length=0 -ffunction-sections -c -o ''startup\\Src\\stm32f0xx_ll_utils.o'' ''..\\startup\\Src\\stm32f0xx_ll_utils.c'' ..\startup\Src\stm32f0xx_ll_utils.c:38:30: fatal error: stm32f0xx_ll_rcc.h: No such file or directorycompilation terminated.''Probably the toolchain path not correctly set. There should be tutorials around about setting Eclipse with a separate toolchain. Not my specific field of competence.
''http://www.openstm32.org/ OR www.eclipse.org/forums are not much helpful, perhaps expert may skip such silly questions. Less talkative.'but that is the task of the Coocox people''
Coocox forum is completely closed.Best RegardsHasan
2016-11-20 11:01 PM
> I also agree with you, project setting is straight forward. But, Forum posting response has small possibility in case of asking problem.
There are often problems with ''latest release'' software and packages. I don't think you would look silly asking. And thanks to CubeMX, ''simple'' questions about build issues multiplied ...> Could you kindly explain why parser setting is required? Kind of syntax checking during editing. You better ask the Eclipse or ''CDT'' people. I'm quite comfortable without it.> I have changed the project location and copy that project folder in workplace of Eclipse under Tool-chain folder in C, now the console says, ... Hmmm, not sure about the LowLevel stuff. I have those mentioned F7 Cube package here, where this ''_ll_'' stuff sits in
STM32Cube_FW_Fx_Vx.x.x\Drivers\STM32F7xx_HAL_Driver\Inc
. However, only a few files are present - it is far from complete. You would probably need to ask the ST staff, or frequent Cube users.> Coocox forum is completely closed. Good to know - it had been operative more than a year ago. However, they did several things the non-standard way (not CMSIS conforming) for no good reason. So when using Windows, I rather go with . This toolchain supports the SPL, but (AFAIK) no Cube yet.2016-11-21 12:44 AM
Dear,
For a newcomer people like me, this kind of work looks so tough.Still I am disappointing to build previous project in any IDE, question is when I will develop my code ?Thousands of work is still remain to look up registor, SRCs, communications, data, graph etc. ''I don't think you would look silly asking. And thanks to CubeMX'' One thing is for sure, cubemx also making trouble! ''Kind of syntax checking during editing.''Lets forget this option.
''STM32Cube_FW_Fx_Vx.x.x\Drivers\STM32F7xx_HAL_Driver\Inc
. However, only a few files are present''You mean the version could make such errors? Eclipse arguing this ''_ll_'' stuff .In keil, tool-chain and CMSIS may be conflicting, if I would deleted my user code c files from project branch, errors minimized.But, those codes are necessary in my system!RegardsHasan
2016-11-21 02:33 AM
> You mean the version could make such errors? Eclipse arguing this ''_ll_'' stuff .
After realizing that CubeMX did not meet everybody's expectations, the came up with the ''Low Level'' library. This ''Low Level'' lib is part of CubeMX, or a sub-set thereof, and are labelled with this ''_ll_'' part in their name. However, in some cases (especially for the STM32F7 I checked), this Low Level lib is nothing but a sorry stub (i.e. unusable fragments). According to some comments on other threads, it is supposed to be complete for the STM32L4, ''with support for other MCUs in progress'' - whatever this means. Here, my Cube - related knowledge ends ...2016-11-21 04:27 PM
in MDK 5.
Looking at the errors in mdk-keil, some h files are absent, it might be for overlaps of same timer and spi action described in cubemx generated file.These h files are belongs to my coocox project.RegardsHasan2016-12-13 12:50 AM
Dear Sir Avatar,
You will be keep silent ?
I have managed to solve'_ll_' stuff , that was for strange back-slash in Korean OS.
mdk-keil does not support comdef.h for compliler.
Kindly take a look here,
https://community.st.com/0D50X00009XkdvoSAB
#Avatar
2016-12-13 02:51 AM
Hello,
It seems to me that you have a lot of problems mostly because the base of the system is not well configured, i.e. GCC is not set in the system path, the IDEs are barking at you because they can't find the required files and so on...
I recommend you to read this blog post :
http://thehackerworkshop.com/?p=443
The good thing is that he is using an F0 like you. He's using the Standard Peripheral Library, I hope that it is okay for you... But if you follow carefully his instructions, you should be able to compile a test project at first, then proceed with your actual project.
Best regards,
Carl