This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Error when build project

Hi everybody !
When I buid my project in Keil Arm ver.4 , there are some warnings and errors :

stm32f4xx_gpio.c(130): warning: #223-D: function "assert_param" declared implicitly assert_param(IS_GPIO_ALL_PERIPH(GPIOx));
stm32f4xx_rcc.c(266): warning: #223-D: function "assert_param" declared implicitly assert_param(IS_RCC_HSE(RCC_HSE));

stm32f4xx_rcc.c(2106): error: #20: identifier "RCC_BDCR_LSEMOD" is undefined SET_BIT(RCC->BDCR, RCC_BDCR_LSEMOD);

I included files :
#include <stm32f4xx.h>
#include "stm32f4xx_gpio.h"
#include "stm32f4xx_rcc.h"

So what is the reason making those ? And how can i resolve the problem ?
Thank you !

Parents
  • You are probably using the wrong project settings, defines, and not providing the correct include path for the compiler? By default Keil may pull in old or mismatched include files.

    You should download the ST Standard Peripheral Library release, and look at the Keil (MDKARM) example and template projects.

    You should only need to #include "stm32f4xx.h", you should have a definition for the assert function in your main.c application, and other include files will be pulled in via stm32f4xx_conf.h in your project directory.

Reply
  • You are probably using the wrong project settings, defines, and not providing the correct include path for the compiler? By default Keil may pull in old or mismatched include files.

    You should download the ST Standard Peripheral Library release, and look at the Keil (MDKARM) example and template projects.

    You should only need to #include "stm32f4xx.h", you should have a definition for the assert function in your main.c application, and other include files will be pulled in via stm32f4xx_conf.h in your project directory.

Children
No data