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-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-09 12:34 AM
> 1. CDT does not showing errors of my main files, there was a return type problem, I solved it.
You might have come across an issue with most Eclipse IDEs - the parser it uses in the editor view is NOT the toolchain/compiler it uses for the build. Obviously, the target compiler is the decisive criteria here.> ..\inc\Src\stm32f0xx_hal_flash_ex.c:990:1: error: expected '{' at end of input
I would try adding the ''-E'', and view the preprocessed output the compiler would see.
> Problem is if I add h files in HAL library that error log suggest me to do, ...
For certain reasons, I do not speak CubeMX lingo.
2016-11-09 01:11 AM
2016-11-09 02:06 AM
> Still working in 3 different, IDE, Eclipse, Coocox and Keil.
Coocox is also Eclipse-based, at least it was the last time I had a look (and discarded it).> 1.Do you talking about setting in Preferences> c/c++>makefile error persor?
I never tried to mess with the parser settings, and simply ignored those parser remarks. Just to clarify, I experienced the same issue with Eclipse-based toolchains for the x86 family ...> 2. Where you wanted to adding -E?
> 3.Preprocessed output setting is where?
On a plain Eclipse it looks like this (right-click on the project, select ''Options...''): The generated (preprocessed) source ends up somewhere in the Debug sub-path (for the Debug build). > 4. For code generation, dont you suggest cubemx? For several F0 variants, you should (still) have the option to download and use the ''old'' SPL. It is a much thinner and ''much less awkward'' library, and proven to be less buggy than Cube. The free EmBlocks/EmBitz toolchain supports this SPL ''out-of-the-box''. For newer MCUs, you can just resort to ''register-hacking'', or free libs (if you find one ...). IMHO CubeMX is an twisted mess - but this is just my personal opinion.
2016-11-09 05:58 PM
2016-11-09 11:19 PM
> People says , Coocox is dead really.
Perhaps not dead, but nothing for me.> Those errors I got before, still stm32f0xx.h is exists on the path. This file should be in one of the defined include paths - these are the one's given with ''
-I
'' in the console:''-IC:\\STM32_toolchain\\arm-none-eabi\\bin'' ''-IC:\\STM32_toolchain\\bin'' ''-IC:\\STM32_toolchain\\common\\Drivers\\STM32F0xx_HAL_Driver\\Inc'' ''-IC:\\STM32_toolchain\\common\\Drivers\\STM32F0xx_HAL_Driver\\Src'' ''-IC:\\STM32_toolchain\\lib\\gcc'' ''-IC:\\STM32_toolchain\\arm-none-eabi\\lib'' The stm32fxxx.h file(s) are usually to find in the folder:...\STM32Cube_xxx\Drivers\CMSIS\Device\ST\STM32Fxxx\Include
The ''xxx'' part of this name depends on the actual device. I miss this path in your list. I can't really give much support for Coocox, since I don't have/use it - for several (obvious) reasons. In your place, I would try to migrate to a toolchain/IDE you feel comfortable with. You are not the only one struggling with Eclipse...2016-11-10 12:37 AM
Dear Sir,
Thank you once again, at least I could realize where the mistake is formed.>This file should be in one of the defined include paths....do you mean one path is fine in case of project properties .. .environment,,,setting,,,etc?>The ''xxx'' part of this name depends on the actual device. I miss this path in your list.......this is STM32F070RBTx type mcu.1. If coocox is not dead you think, can you tell me why startup_stm32f070xb.s is not support, its true error massage is showing that java.Null.lang has problem there.2. I am trying things in Keil now, looks system is well arranged, no setting for include path or other stuffs, no other way to import project, what I am doing is making same folder adds files there and at last find RTE\Device\STM32F070RB\system_stm32f0xx.c: 0 warnings, 1 error''.\Rice_heat_circuit.axf'' - 34 Error(s), 0 Warning(s).Target not created.Build Time Elapsed: 00:00:023. Dont you think there is a problem that I am adding files from different location and compiler cant recognize it well?4. Keil suggested just open some ready-mate project for particular board, dont you thing I can use those example, just need to change files there as required ?Some of the errors here....compiling stm32f0xx_hal_msp.c...stm32f0xx_hal_msp.c(35): error: #5: cannot open source input file ''stm32f0xx_hal.h'': No such file or directory #include ''stm32f0xx_hal.h''stm32f0xx_hal_msp.c: 0 warnings, 1 errorcompiling system_stm32f0xx.c...C:\Keil_v5\ARM\PACK\Keil\STM32F0xx_DFP\1.5.0\Device\Include\stm32f070xb.h(130): error: #5: cannot open source input file ''core_cm0.h'': No such file or directory #include ''core_cm0.h'' /* Cortex-M0 processor and core peripherals */system_stm32f0xx.c: 0 warnings, 1 errorcompiling stm32f0xx_it.c...stm32f0xx_it.c(34): error: #5: cannot open source input file ''stm32f0xx_hal.h'': No such file or directory #include ''stm32f0xx_hal.h''stm32f0xx_it.c: 0 warnings, 1 errorcompiling flash_conf.c...C:\Keil_v5\ARM\PACK\Keil\STM32F0xx_DFP\1.5.0\Device\Include\stm32f070xb.h(130): error: #5: cannot open source input file ''core_cm0.h'': No such file or directory #include ''core_cm0.h'' /* Cortex-M0 processor and core peripherals */C:\Users\swend95_하산\Desktop\Old_rice_cooker\Final_Source\flash\app\flash_conf.c: 0 warnings, 1 errorcompiling stm32f0xx_hal.c...C:\Users\swend95_?�궛\Desktop\Old_rice_cooker\Final_Source\common\Drivers\STM32F0xx_HAL_Driver\Src\stm32f0xx_hal.c(54): error: #5: cannot open source input file ''stm32f0xx_hal.h'': No such file or directory #include ''stm32f0xx_hal.h''C:\Users\swend95_하산\Desktop\Old_rice_cooker\Final_Source\common\Drivers\STM32F0xx_HAL_Driver\Src\stm32f0xx_hal.c: 0 warnings, 1 errorcompiling stm32f0xx_hal_dma.c...C:\Users\swend95_?�궛\Desktop\Old_rice_cooker\Final_Source\common\Drivers\STM32F0xx_HAL_Driver\Src\stm32f0xx_hal_dma.c(104): error: #5: cannot open source input file ''stm32f0xx_hal.h'': No such file or directory2016-11-10 03:26 AM
>do you mean one path is fine in case of project properties .. .environment,,,setting,,,etc?
Basically, yes. You should set this in the project settings (similar to the posted image). Optimally, one would define base paths using environment variables, and refer to that environment variables in the project settings. Eclipse supports this, not sure what Coocox does.> 1. If coocox is not dead you think, can you tell me why startup_stm32f070xb.s is not support, its true error massage is showing that java.Null.lang has problem there.
With ''not dead'', I mean it is (or was) still supported by developers, and has a user community. There is (at least was) even a forum. Not sure what ''java.Null.lang'' means in this context. I would bet on a bug, instead of missing support.> 2. I am trying things in Keil now, looks system is well arranged, no setting for include path or other stuffs, no other way to import project, what I am doing is making same folder adds files there and at last find If you setup a project from scratch, you need to do this as well... With the example projects, some one has done it for you.> 3. Dont you think there is a problem that I am adding files from different location and compiler cant recognize it well?
Usually not a problem. Problems may arise if you use the same (library) files in different projects.> 4. Keil suggested just open some ready-mate project for particular board, dont you thing I can use those example, just need to change files there as required ?
This is the preferred way to start with a new environment. Just remove/add functionality as you like, and try to build often. Bake care to select a project with the correct MCU variant. Changing this later on tends to be somewhere between difficult and impossible. BTW, Keil is not Eclipse-based (a plus point for many, including me), and has a good and responsive forum as well. Downside is, it is either code-size limited or quite expensive.
2016-11-10 08:28 PM
2016-11-10 11:09 PM
> At the same time I am using KEIL( using CoIDE project), but ...
Not sure how this is meant, but usually, this doesn't work. The format of the project file(s) is highly IDE specific, and rarely do toolchains support the import of ''foreign'' formats. And I'm pretty sure Keil uVision does not support Coocox projects. The build settings (including the list of include directories) is part of this project settings. And obviously it got ''lost'', because the build complains about basic headers not found. I would start over, using Keil. Pick an example project for the proper MCU. It should build out-of-the-box. Then you can remove unneeded functionality, and add your own, step by step. Or, create a new (empty or ''hello world'' style) project for your MCU, and add your functionality. With both ways, all the basic include folders, libraries and startup files are already defined. I'm using CrossWorks, which is not supported directly by ST. When using any of the ST examples, I used this second way (create a new project, and just add the specific sources). It takes me about 10 .. 15 minutes to add all files and paths. Trying to ''tweak'' a Keil, IAR, Atollic or SW4STM project never worked for me.> C:\Users\swend95_?�궛
\Desktop\Old_rice_cooker\...Not sure if the special characters in the path names make problems, too. In theory, it should not ...