#include "stm32f10x_lib.h"
最新的库应该是:
#include "stm32F10x.h"
还有,看看是不是芯片类型没有定义对,比如下面针对 STM32 High density devices(STM32F103xC、STM32F103xD、STM32F103xE):
/* #define STM32F10X_LD */ /*!< STM32F10X_LD: STM32 Low density devices */
/* #define STM32F10X_MD */ /*!< STM32F10X_MD: STM32 Medium density devices */
/* #define STM32F10X_MD_VL */ /*!< STM32F10X_MD_VL: STM32 Medium density Value Line devices */
#define STM32F10X_HD /*!< STM32F10X_HD: STM32 High density devices */
/* #define STM32F10X_XL */ /*!< STM32F10X_XL: STM32 XL-density devices */
/* #define STM32F10X_CL */ /*!< STM32F10X_CL: STM32 Connectivity line devices */