你是用stm8s的iar库函数么,如果是,建议检查下stm8s.h这个文件
检查你选择的dev 如 stm8s105 与 stm8s中的#define 是否一致,如果不一致肯定是会出现你现在的原因
/* #define STM8S208 */ /*!< STM8S High density devices with CAN */
// #define STM8S207 /*!< STM8S High density devices without CAN */
/* #define STM8AF52Ax */ /*!< STM8A High density devices with CAN */
/* #define STM8AF62Ax */ /*!< STM8A High density devices without CAN */
#define STM8S105 /*!< STM8S Medium density devices */
/* #define STM8AF626x */ /*!< STM8A Medium density devices */
// #define STM8S103 /*!< STM8S Low density devices */
/* #define STM8S903 */ /*!< STM8S Low density devices */