IAR编辑 identifier "__IO" is undefined
用IAR在编译的时候出现Error: invalid redeclaration of type name "int16_t"Error: identifier "uint32_t" is undefined D:\STM32_TEST\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\system_stm32f10x.h 53
Error: identifier "__IO" is undefined \CM3\DeviceSupport\ST\STM32F10x\stm32f10x.h 494
也就是在stdlib.h和stm32f10x.h两个文件中都对int16_t做了定义,两个都是标准头文件,这个问题怎么解决呢?
stdlib.h中定义如下:
#ifdef __INT32_T_TYPE__
typedef __INT32_T_TYPE__ int32_t;
typedef __UINT32_T_TYPE__ uint32_t;
#endif /* __INT32_T_TYPE__ */
stm32f10x.h定义如下:
typedef __IO int32_tvs32;
RE:IAR编辑 identifier "__IO" is undefined【悬赏贴】
你要包含cmsis\cm3\coresupport\iar这个目录下面的Core_Cm3.h这个文件。RE:IAR编辑 identifier "__IO" is undefined
你要把core_cm3.c加入你的工程里,因为uint32_t,uint16_t等这些是在stdint.h中定义的。加入core_cm3.c后,编译在它的目录下就会有stdint.h文件
页:
[1]