嵌入式开发/学习过程中,难免需要借鉴别人的工程,但是开发环境的匹配始终是个问题==版本不匹配—无法正常的打开工程文件。
一般官方标配的开发环境包括:
- MDK
- IAR
这里描述IAR环境下,如何解决版本兼容问题。
IAR版本引起的提示消息:
broken options:
unknown tool:
打开工程后的一堆messages:
LOAD: Configuration ‘FLASH_512KB’ in the project ‘ceac-k60-adc’ contains broken options for tool ‘ICCARM’:
(Registry: unknown name: CCOptimizationNoSizeConstraints)
Options for ‘ICCARM’ will be set to default.
Creating backup of original project file.
LOAD: Configuration ‘FLASH_512KB’ in the project ‘ceac-k60-adc’ contains broken options for tool ‘C-SPY’:
The format of this file is not supported by this version of the workbench. It appears to have been written by a newer version of the workbench.
Diagnostics: ‘Settings ‘C-SPY’: unsupported version - ’.
Options for ‘C-SPY’ will be set to default.
LOAD: Configuration ‘FLASH_512KB’ in the project ‘ceac-k60-adc’ contains broken options for tool ‘JLINK_ID’:
The format of this file is not supported by this version of the workbench. It appears to have been written by a newer version of the workbench.
Diagnostics: ‘Settings ‘JLINK_ID’: unsupported version - ’.
Options for ‘JLINK_ID’ will be set to default.
LOAD: Configuration ‘FLASH_512KB’ in the project ‘ceac-k60-adc’ contains broken options for tool ‘PEMICRO_ID’:
The format of this file is not supported by this version of the workbench. It appears to have been written by a newer version of the workbench.
Diagnostics: ‘Settings ‘PEMICRO_ID’: unsupported version - ’.
Options for ‘PEMICRO_ID’ will be set to default.
LOAD: Configuration ‘FLASH_512KB’ in the project ‘ceac-k60-adc’ contains broken options for tool ‘XDS100_ID’:
The format of this file is not supported by this version of the workbench. It appears to have been written by a newer version of the workbench.
Diagnostics: ‘Settings ‘XDS100_ID’: unsupported version - ’.
Options for ‘XDS100_ID’ will be set to default.
IAR工程文件描述文件解析:
IAR工程所有的配置都采用的脚本的方式进行描述,
描述工程的三个文件:
- IAP.eww–IAR EWARM工作区文件,描述工作区中包含那些project;
- IAP.ewp–C-SPY调试器项目设置文件;
- IAP.ewd–IAR EWARM项目文件,有关项目的配置信息全在里面;
这里关注IAP.ewp文件,脚本结构是这样子(使用Notepad++文本编辑器):
找到ICCARM关键字的setting段,此为IAR开发环境相关的。
查看IAR版本:
如何查看找到的 IAR工程文件版本?
如下图:
正常来说这样子可以看到上次工程被保存时的IAR版本,但实测并没有什么卵用(手动改了便是改了,不更新==不完全可信)。
使IAR版本兼容的解决方案:
不兼容的表现:
一堆告警+error,打开options 关注下边图示的内容:
那么,怎么恢复呐?
芯片型号选择:
工程内的宏定义:
文件路径包含:
去掉每次打开工程的异常提示:
至此,版本兼容的事儿,完全解决,,,
附:core_m3.c相关的
对于IAR 6.5以后的版本,由于IAR开始集成了CORTEX-M3的C文件,因此可以会跟st官方的core_m3.c冲突,解决的办法就是移除官方的该文件,然后在iar的库定义里面添加cm3库。
可能的设置选项在这里:
如使用IAR环境自带的内核文件,勾选上它。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)