0
点赞
收藏
分享

微信扫一扫

keil中出现在自己定义的头文件中使用u8,u16等时发生错误

想溜了的蜗牛 2022-04-30 阅读 35

今天自己在keil中创建stm32项目时,自己定义了一个.c和.h文件,然后为了使unsigned int能够简化为u16来表示,于是在.c文件中#include "stm32f10x.h",在stm32f10x.h这个头文件中有定义

而uint32_t这些在stdint.h中有定义

 

所以.c文件中就可以使用u16这些简写了,但是.h文件中写入 #include "stm32f10x.h"却发生错误

错误内容为:Please select first the target STM32F10x device used in your application (in stm32f10x.h file)

解决方法:

框中输入: STM32F10X_HD

举报

相关推荐

0 条评论