新手入门
- 积分
- 36
- 金钱
- 36
- 注册时间
- 2014-3-10
- 在线时间
- 0 小时
|
近来到官网下载安装了keil MDK5.10.0.2,添加STM32F1xx_DFP1.0.4
用该版本打开开发板源码后,发现即使不在C/C++里预定义STM32F10X_HD也能编译工程。
#if !defined (STM32F10X_LD) && !defined (STM32F10X_LD_VL) && !defined (STM32F10X_MD) && !defined (STM32F10X_MD_VL) && !defined (STM32F10X_HD) && !defined (STM32F10X_HD_VL) && !defined (STM32F10X_XL) && !defined (STM32F10X_CL)
#error "Please select first the target STM32F10x device used in your application (in stm32f10x.h file)"
#endif
这几条语句感觉直接被忽略了。
如果我单独写成
#ifdef STM32F10X_HD
#error "Please select first the target STM32F10x device used in your application (in stm32f10x.h file)"
#endif
又正常!但查找项目所有文件,又没有发现STM32F10X_HD已经被定义过。
后面用MDK5试着新建工程编译时也是一样。
若用MDK3.8A编译,不预定义是显示错误的。
这是怎么回事啊?
|
|