2016-09-27 04: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-lib2016-09-27 07: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.
2016-09-28 09: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. Thx2016-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.h