IAR因版本不兼容打不开工程文件解决(Broken options、ICC8051、XLINK)

摘要:

    本文给出IAR因版本不兼容打不开IAR工作区遇到的各种问题及解决方法,包括依据提示修改版本,删除未知名称(ewp文件)。若还没解决,则创建新工作区、工程,并拷贝相关文件,我想这是一种通用化的解决方法(很诡异)。

 

PS:本文以IAR工程项目ContikiCC2530Port为例,IAR for MCS-51版本是7.51A。本文记录了整个调试过程,实际场景,不妨先跳到第三部分,看行不行,不行的话,再按第二部分修改。

 

一、IAR错误提示

    昨天,在GitHub下载了一个IAR工程项目ContikiCC2530Port,打开*.eww文件出现一系列错误,如下:

1.1 Broken options were detected in the project file.A backup copy will be made.

【转载】IAR因版本不兼容打不开工程文件解决(Broken <wbr>options、ICC8051、XLINK)

图1 IAR警告Broken options

1.2 The project file * was created by a newer version of project and cannot be opened

【转载】IAR因版本不兼容打不开工程文件解决(Broken <wbr>options、ICC8051、XLINK)

图2 IAR警告created by a newer version

1.3 The project * could not be open

【转载】IAR因版本不兼容打不开工程文件解决(Broken <wbr>options、ICC8051、XLINK)

图3 IAR警告could not be open

Build区域显示如下信息:

LOAD: Configuration 'ContikiBankedRelease' in the project 'ContikiCC253xProj' contains broken options for tool 'General': 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 'General': unsupported version - '. 

Options for 'General' will be set to default. Creating backup of original project file. 

LOAD: Configuration 'ContikiBankedRelease' in the project 'ContikiCC253xProj' contains broken options for tool 'ICC8051': (Registry: unknown name: CompilerMisraRules04) 

Options for 'ICC8051' will be set to default. 

LOAD: Configuration 'ContikiBankedRelease' in the project 'ContikiCC253xProj' contains broken options for tool 'XLINK': 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 'XLINK': unsupported version - '. 

Options for 'XLINK' will be set to default.

如下图所示:

【转载】IAR因版本不兼容打不开工程文件解决(Broken <wbr>options、ICC8051、XLINK)

图4 IAR log windows信息

    初步断定,这些警告是因为IAR版本不兼容引起的,但事实上没那么简单,之前也遇见用新版本IAR打开旧版本IAR工程文件,可以直接打开(给出提示信息),在这里还涉及到工程项目配置。解决方法是修改相关的IAR工程文件,描述IAR工程主要有.dep、.eww(Embedded Workbench Workspace)、.ewd(Embedded Workbench Debug)、.ewp(Embedded Workbench Project)文件。

dep --(我也不知道)

eww --工作区文件,描述工作区包含哪些project 

ewd --C-SPY调试器项目设置文件 

ewp --IA项目的配置信息

 

二、Broken options

    Broken options是由于项目文件配置不对引起的,按提示信息修改。版本不对的,修改版本;unknown name的,则删去这些配置选项。

2.1 General

2.1.1 'Settings 'General': unsupported version

(1)错误提示

LOAD: Configuration 'ContikiBankedRelease' in the project 'ContikiCC253xProj' contains broken options for tool 'General': 

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 'General': unsupported version - '. Options for 'General' will be set to default. Creating backup of original project file.

(2)解决

    找一个IAR现版本可以找开的工程文件,查看General的版本,并将工程文件的版本改成可支持的版本,如下图所示:

【转载】IAR因版本不兼容打不开工程文件解决(Broken <wbr>options、ICC8051、XLINK)

2.1.2 unknown name: PDATA 8-15 register address

(1)错误提示

LOAD: Configuration 'ContikiBankedRelease' in the project 'ContikiCC253xProj' contains broken options for tool 'General': (Registry: unknown name: PDATA 8-15 register address

Options for 'General' will be set to default. Creating backup of original project file. 

(2)解决

在.ewp文件找到PDATA 8-15 register address,删去

...,如下:

 PDATA 8-15 register address 

 0xA0 

【转载】IAR因版本不兼容打不开工程文件解决(Broken <wbr>options、ICC8051、XLINK)

2.1.3 unknown name: PDATA 16-31 register address

(1)错误提示

LOAD: Configuration 'ContikiBankedRelease' in the project 'ContikiCC253xProj' contains broken options for tool 'General': (Registry: unknown name: PDATA 16-31 register address

Options for 'General' will be set to default. Creating backup of original project file. 

(2)解决

    同2.1.2,在.ewp文件找到PDATA 16-31 register address,删去

...

2.1.4 unknown name: General Far22 Heap Size

(1)错误提示

LOAD: Configuration 'ContikiBankedRelease' in the project 'ContikiCC253xProj' contains broken options for tool 'General': (Registry: unknown name: General Far22 Heap Size

Options for 'General' will be set to default. Creating backup of original project file. 

(2)解决

    同2.1.2,在.ewp文件找到General Far22 Heap Size,删去

...

2.1.5 GeneralMisraVer

(1)错误提示

LOAD: Configuration 'ContikiBankedRelease' in the project 'ContikiCC253xProj' contains broken options for tool 'General': (Registry: unknown name: GeneralMisraVer

Options for 'General' will be set to default. Creating backup of original project file.

(2)解决

    同2.1.2,在.ewp文件找到GeneralMisraVer,删去

...

2.1.6 GeneralMisraRules04

(1)错误提示

LOAD: Configuration 'ContikiBankedRelease' in the project 'ContikiCC253xProj' contains broken options for tool 'General': (Registry: unknown name: GeneralMisraRules04

Options for 'General' will be set to default. Creating backup of original project file. 

(2)解决

    同2.1.2,在.ewp文件找到GeneralMisraRules04,删去

...

2.2 ICC8051(ARM平台为ICCARM)

2.2.1 'Settings 'ICC8051': unsupported vesion

(1)错误提示

LOAD: Configuration 'ContikiBankedRelease' in the project 'ContikiCC253xProj' contains broken options for tool 'ICC8051': 

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 'ICC8051': unsupported version - '. 

Options for 'ICC8051' will be set to default. Creating backup of original project file.

(2)解决

    同2.1.1,找一个IAR现版本可以找开的工程文件(或者自己创建一个工程文件),查看ICC8051的版本,并将工程文件的版本改成可支持的版本,如下图所示:

【转载】IAR因版本不兼容打不开工程文件解决(Broken <wbr>options、ICC8051、XLINK)

2.2.2 unknown name: CompilerMisraRules04

(1)错误提示

LOAD: Configuration 'ContikiBankedRelease' in the project 'ContikiCC253xProj' contains broken options for tool 'ICC8051': (Registry: unknown name: CompilerMisraRules04

Options for 'ICC8051' will be set to default. Creating backup of original project file. 

(2)解决

    同2.1.2,在.ewp文件找到CompilerMisraRules04,删去

...

2.2.3 unknown name: CompilerMisraRules04

(1)错误提示

LOAD: Configuration 'ContikiBankedRelease' in the project 'ContikiCC253xProj' contains broken options for tool 'ICC8051': (Registry: unknown name: CompilerMisraRules04

Options for 'ICC8051' will be set to default. Creating backup of original project file. 

(2)解决

    同2.1.2,在.ewp文件找到CompilerMisraRules04,删去

...

2.3 XLINK

2.3.1 'Settings 'XLINK': unsupported vers

(1)错误提示

LOAD: Configuration 'ContikiBankedRelease' in the project 'ContikiCC253xProj' contains broken options for tool 'XLINK': 

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 'XLINK': unsupported version - '

Options for 'XLINK' will be set to default. Creating backup of original project file.

(2)解决 

    同2.1.1,找一个IAR现版本可以找开的工程文件(或者自己创建一个工程文件),查看XLINK的版本,并将工程文件的版本改成可支持的版本,如下图所示:

【转载】IAR因版本不兼容打不开工程文件解决(Broken <wbr>options、ICC8051、XLINK)

2.3.2 unknown name: Linker Far22 Heap Size

(1)错误提示

LOAD: Configuration 'ContikiBankedRelease' in the project 'ContikiCC253xProj' contains broken options for tool 'XLINK': (Registry: unknown name: Linker Far22 Heap Size

Options for 'XLINK' will be set to default. Creating backup of original project file. 

(2)解决

    同2.1.2,在.ewp文件找到Linker Far22 Heap Size,删去

...

2.3.3 unknown name: Linker Far22 Heap S

(1)错误提示

LOAD: Configuration 'ContikiBankedRelease' in the project 'ContikiCC253xProj' contains broken options for tool 'XLINK': (Registry: unknown name: Linker Far22 Heap Size

Options for 'XLINK' will be set to default. Creating backup of original project file. 

(2)解决

    同2.1.2,在.ewp文件找到Linker Far22 Heap Size,删去

...

 

三、遗留问题及诡异方法

    打开eww文件,还提示图2的The project file * was created by a newer version of project and cannot be opened、图3的The project * could not be open的警告,但Build区域没有任何信息。还是打不开,我估计是版本跨度太大,换个老一点的版本试试。如果您有更好的方法,烦您告诉我Jelline@126.com,谢谢!

 

================分隔线=====================

    最后,我找到了一种很诡异的方法解决这个问题。即在不同目录创建新的工作区,创建新的工程,将工作区和工程名称与版本不兼容的IAR相同(在本例为ContikiCC2530Port),而后将修改好的ContikiCC2530Port.ewp(注:.eww、.ewd、.dep文件不拷贝,只拷贝ewp文件)和项目相关文件(注:不包括Debug、Release、settings文件夹)拷贝到新创建工程的目录。问题解决:-)不禁感慨,编程世界真美好!

  • 5
    点赞
  • 23
    收藏
    觉得还不错? 一键收藏
  • 2
    评论
### 回答1: 当出现“文件可能已损坏或是使用较新版本的Unity序列化”错误时,通常是由于以下几种情况造成的: 1. 文件损坏:文件在传输或保存过程中可能遭受了损坏。在这种情况下,会导致Unity无法正确读取或解析文件内容。 解决方法:尝试从备份或可信源中获取备份文件,以确保文件完整无损。也可以尝试使用文件修复工具来修复损坏的文件。 2. Unity版本不兼容文件是使用较新版本的Unity进行序列化的,而当前打开的Unity版本较旧,无法正确解析文件内容。 解决方法:升级Unity到与文件创建时使用的版本相匹配的版本。或者,尝试联系文件的创建者,询问文件使用的Unity版本,并使用相应的版本进行操作。在Unity编辑器中,您可以通过“Help”>“About Unity”来查看当前Unity版本。 3. 扩展或外部工具的兼容性:如果文件是通过使用Unity的扩展或外部工具进行序列化的,而当前的Unity环境没有正确配置或加载这些扩展或工具,也会导致该错误。 解决方法:确保使用的扩展或外部工具与当前Unity版本兼容,并且已正确配置和加载。可以尝试更新或重新安装相关的扩展或外部工具,并确保其完全符合当前Unity环境的要求。 总之,当出现“文件可能已损坏或是使用较新版本的Unity序列化”错误时,我们需要确定文件的完整性、Unity版本以及相关的扩展或外部工具的兼容性,并相应地采取适当的措施来解决该错误。 ### 回答2: 当您在使用Unity软件打开一个文件时,出现“file may be corrupted or was serialized with a newer version of unity”这个错误消息,可能有两个原因。 首先,文件可能已经损坏。这可能是由于文件在传输过程中被意外中断、存储设备出现故障或者在保存过程中出现错误等。在这种情况下,您可以尝试使用备份文件(如果有的话)或者尝试修复损坏的文件。如果无法修复,您可能需要联系文件的创建者以获取一个新的文件。 其次,该文件可能是使用Unity的更新版本序列化的。Unity软件经常会发布更新版本,这些版本可能会对文件的结构和格式进行更改。如果您的Unity版本文件序列化时使用的版本不兼容,您将收到此错误消息。要解决问题,您需要确保您的Unity软件版本文件序列化时使用的版本相同或更高。如果您的Unity版本较低,您可能需要升级Unity软件以支持该文件。 总而言之,当您遇到“file may be corrupted or was serialized with a newer version of unity”错误消息时,您应该首先尝试修复损坏的文件,如果无法修复,则需要确保使用与文件序列化时相同或较高的Unity版本打开该文件。 ### 回答3: 当Unity打开或导入某个文件时,有时会出现“file may be corrupted or was serialized with a newer version of unity”(文件可能已损坏或是使用新版本Unity序列化的)的报错提示。这种报错一般有以下几种可能原因: 1. 导入的Unity文件版本不兼容:Unity的不同版本之间可能存在一些不兼容问题。如果你尝试导入一个较新版本Unity创建的文件到旧版本Unity中,就很可能出现该报错。解决方法是升级Unity到与文件创建版本相匹配的版本,或者重新导入文件并确保使用与文件创建版本相同的Unity版本。 2. 文件损坏:文件可能在导出或存储过程中出现错误,导致文件损坏。这可能是由于磁盘错误、中断的存储过程或其他异常情况引起。解决方法是尝试使用备份文件或重新从原始源获取文件。 3. 引擎版本不一致:如果在项目中同时使用多个Unity引擎版本,不同的引擎版本之间可能会存在一些不兼容性。尝试使用与文件创建版本相同的引擎版本打开文件,或者将文件导入到使用相同引擎版本的新项目中。 4. 官方插件或第三方插件不兼容:某些官方或第三方插件可能无法与某些Unity版本兼容,从而导致文件打开时出错。解决方法是升级或卸载不兼容的插件,或者尝试使用兼容的Unity版本重新导入文件。 总之,在遇到“file may be corrupted or was serialized with a newer version of unity”报错时,我们应该确认文件的兼容性、文件是否损坏以及Unity引擎及插件的版本是否一致,以找到解决问题的方法。
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值