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-10 11:42 PM
Dear Sir,
Thank you once again.Even project file(s) is highly IDE specific, I have no other way to use right at the moment. Best way is to apply things in new IDE.If you look the uVision creating new project, you will see KEIL facilitates, downloading, project creating is nice.But, I am using STM32F070RBTx that has no example code in KEIL directly. It suggest STM32F072-Discovery, that is not the STM32F070 group.Yes, from the Pack installer part of keil you can download STMicroelectronics STM32F0 Series Device Support and Examples , but group specific example is absent.I understand things are nearly similar.Looking at your Toolchain issue, Keli support latest gcc or ARMCC version. I am using this.As my previous projects are HAL library specific, I am attaching those header files in project.Startup, Flash, CMSIS etc is KEIL based here.Some of errors I have indentified, but why comdef.h and stm32f0xx_hal.h is not supporting here?I agree with you.2016-11-11 01:59 AM
>But, I am using STM32F070RBTx that has no example code in KEIL directly. It suggest STM32F072-Discovery, that is not the STM32F070 group.
I don't use Keil, so I can only suggest to ask about it at the Keil forum. Or someone on this forum can help. I would be careful with ''similar'' MCUs. Non-matching Flash/RAM sizes (-> startup file !) and peripherals can screw your project up.> Yes, from the Pack installer part of keil you can download STMicroelectronics STM32F0 Series Device Support and Examples , but group specific example is absent.
> I understand things are nearly similar.
Keil offers dozens of evaluation boards (hardware). Perhaps you can look for such an evaluation board with your MCU, or a similar one (a F070). Then download the firmware/example package Keil provides for this, and use one of the example projects.> I am using STM32F070RBTx ... The ''RBTx'' specifies the package, which in turn defines pin number and pin multiplexing. Applying some care, you can use a project for any F070 as starting point.> As my previous projects are HAL library specific, I am attaching those header files in project. Like some others at this forum, I'm no friend of the Cube HAL, and don't know/use it. Perhaps the occasionally present ST staff people can help you with that ...
2016-11-11 05:38 PM
2016-11-12 09:44 AM
If it can't find include files then you need to make sure you have the right Include Paths specified so it can
ie ..\..\..\Drivers\STM32F0xx_HAL_Driver\Inc or whatever directory stm32f0xx_hal.h is situated in. This is critically important when files are spread over multiple directories and up/down different trees. There should be startup files for an assortment of F0xx parts, you'll need to review the files in the HAL tree, use a File Manager you like if that helps.2016-11-13 05:22 PM
2016-11-13 05:35 PM
2016-11-13 10:53 PM
> Do you have any other idea besides Cubemx?
is an alternative free IDE with it's own toolchain, based upon the ''old'' SPL.>For case of driver code generation what you usually use ? I don't rely on ''code generators''. They use to fail miserably when you deviate from the path of ''envisaged'' use cases. Not to mention the unmanageable complexity and susceptibility for bugs in certain circumstances ... There are plenty of examples in the SPL variants, other websites, and there are the reference manuals and datasheets.
2016-11-14 12:18 AM
2016-11-14 09:20 PM
2016-11-15 02:38 AM
I might get it wrong, but:
> ../Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_rcc.c(81): error: #5: cannot open source input file ''stm32f0xx_hal.h'': No such file or directory This has nothing to do with file contents - the file can't be found. Either a path is (again/still) wrong or missing. Eclipse IDEs use to have a build output window, which show the unfiltered build log in full length. I believe Keil has this as well. I would check this output for the proper path settings, perhaps compare the given paths with the actual one's (as shown in a file manager). Filtered build output windows most often hide too much for a proper analysis. The ''file not found'' issue is quite common in adapting/porting projects, and is usually the first one has to deal with.