你的浏览器版本过低,可能导致网站不能正常访问!
为了你能正常使用网站功能,请使用这些浏览器。

IAR编辑 identifier "__IO" is undefined

[复制链接]
蝶舞娇阳 提问时间:2013-9-5 15:28 /
用IAR在编译的时候出现Error[Pe256]: invalid redeclaration of type name "int16_t"

Error[Pe020]: identifier "uint32_t" is undefined D:\STM32_TEST\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\system_stm32f10x.h 53
Error[Pe020]: 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_t  vs32;
收藏 评论2 发布时间:2013-9-5 15:28

举报

2个回答
stephenking 回答时间:2013-9-5 17:11:23

RE:IAR编辑 identifier "__IO" is undefined【悬赏贴】

你要包含cmsis\cm3\coresupport\iar这个目录下面的Core_Cm3.h这个文件。
feiante-155820 回答时间:2013-9-5 17:55:40

RE:IAR编辑 identifier "__IO" is undefined

你要把core_cm3.c加入你的工程里,因为uint32_t,uint16_t等这些是在stdint.h中定义的。加入core_cm3.c后,编译在它的目录下就会有stdint.h文件

所属标签

相似问题

关于意法半导体
我们是谁
投资者关系
意法半导体可持续发展举措
创新与技术
招聘信息
联系我们
联系ST分支机构
寻找销售人员和分销渠道
社区
媒体中心
活动与培训
隐私策略
隐私策略
Cookies管理
行使您的权利
关注我们
st-img 微信公众号
st-img 手机版