自己搞定了。。。提醒后面遇到相同问题的人。。。
在stm8s.h头文件中,有如下内容:
/* Uncomment the line below according to the target STM8S device used in your
application.
Tip: To avoid modifying this file each time you need to switch between these
devices, you can define the device in your toolchain compiler preprocessor. */
#if !defined (STM8S208) && !defined (STM8S207) && !defined (STM8S105) && !defined (STM8S103) && !defined (STM8S903)
#define STM8S208
/* #define STM8S207 */
/* #define STM8S105 */
/* #define STM8S103 */
/* #define STM8S903 */
#endif
之前因为我觉得我选的STM8S103所以不会编译if中的内容,所以没有理他。 现在改成使用的芯片型号就可以了。
之前移植到STVD中也把STM8S.H复制过去了,所以也有同样问题。。。
|