undefined reference to `assert_param'
Goodmorning,
i'm a beginner for CrossStudio for Arm, i have some problem to compile my test program:
#include <__cross_studio_io.h>
#include "stm32f10x.h"
#include "stm32f10x_conf.h"
#include "stm32f10x_gpio.h"
#include "stm32f10x_rcc.h"
void main(void)
{
GPIO_InitTypeDef GPIO_InitStructure;
// RCC_APB2PeriphClockCmd ( RCC_APB2Periph_GPIOB | RCC_APB2Periph_AFIO , ENABLE ) ;
GPIO_InitStructure. GPIO_Pin = GPIO_Pin_6 | GPIO_Pin_7 ;
GPIO_InitStructure. GPIO_Mode = GPIO_Mode_AF_OD ;
GPIO_InitStructure. GPIO_Speed = GPIO_Speed_50MHz ;
GPIO_Init ( GPIOB , & GPIO_InitStructure ) ;
}
compiling result is:
Checking project status
Building ‘Test’ from solution ‘Test’ in configuration ‘THUMB Debug’
Linking Test.elf
Test THUMB Debug/stm32f10x_gpio.o: In function `GPIO_Init':
undefined reference to `assert_param'
undefined reference to `assert_param'
undefined reference to `assert_param'
undefined reference to `assert_param'
Build failed
but in stm32f10x_conf.h ther are :
/* Exported macro ------------------------------------------------------------*/
#ifdef USE_FULL_ASSERT
/**
* @brief The assert_param macro is used for function's parameters check.
* @param expr: If expr is false, it calls assert_failed function
* which reports the name of the source file and the source
* line number of the call that failed.
* If expr is true, it returns no value.
* @retval None
*/
#define assert_param(expr) ((expr) ? (void)0 : assert_failed((uint8_t *)__FILE__, __LINE__))
/* Exported functions ------------------------------------------------------- */
void assert_failed(uint8_t* file, uint32_t line);
#else
#define assert_param(expr) ((void)0)
#endif /* USE_FULL_ASSERT */
where is the problem? someone may help me?
Simone
Please sign in to leave a comment.
Comments
0 comments