一.编译后报错:
stm32f10x.h(24): error: #256: invalid redeclaration of type name "GPIO_TypeDef" (declared at line 24)
}GPIO_TypeDef;
stm32f10x.h(38): error: #256: invalid redeclaration of type name "RCC_TypeDef" (declared at line 38)
}GPIO_TypeDef;
原因:未在头文件stm32f10x.h库添加编译条件
#ifndef __STM32F10X_H
#define __STM32F10X_H
...
#endif
二.编译后报错:
*.axf: Error: L6218E: Undefined symbol SystemInit (referred from startup_stm32f10x_hd.o).
原因:未在main.c文件中添加
void SystemInit()
{
}
添加此段代码后运行即可。