how stm32f0xx_conf.h file is supposed to be used
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2016-09-27 4:21 PM
Does anyone know how stm32f0xx_conf.h file is supposed to be used.
I normally just put the header files I need in either the source file or other header files. I went thru some of the example projects where this file was included but I did not see if used by any other header or source file. Thx #- #header-files #stm32f0xx #std-peripheral-lib- Labels:
-
SPL
-
STM32F0 Series
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2016-09-27 7:09 PM
It is where project specific stuff lives, is pulled in via stm32f0xx.h when USE_STD_PERIPH is defined on the compile command line. This saves the need to individually pull the peripheral include files into other project files. You can also remove unused peripherals.
Up vote any posts that you find helpful, it shows what's working..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2016-09-28 9:22 AM
Thanks for the reply Clive1
So I tried it out and what I saw was: If I declare GPIO_InitTypeDef GPIO_InitStructure; in Main.c I have to ''#include stm32f0xx_gpio.h'' in Main.c or the program doesn't compile. I was thinking with stm32f0xx_conf.h included in the project the type GPIO_InitTypeDef type would be known to the compiler. I have stm32f0xx.rcc functions in main but it compiles fine without include that header file in Main. Is it supposed to work that way. Thx- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2016-09-28 10:44 AM
The mechanics as outlined in the project templates is to #include ''stm32f0xx.h''
STM32F0xx_StdPeriph_Lib_V1.5.0\Projects\STM32F0xx_StdPeriph_TemplatesWhere it has definesUSE_STDPERIPH_DRIVER,STM32F051,USE_STM320518_EVAL,USE_DEFAULT_TIMEOUT_CALLBACKYou shouldn't need to pull the individual GPIO and RCC files, as these would be collected via STM32F0xx_StdPeriph_Lib_V1.5.0\Projects\STM32F0xx_StdPeriph_Templates\stm32f0xx_conf.hUp vote any posts that you find helpful, it shows what's working..
