使用Eclipse CDT和IAR插件进行无界面构建。

huangapple go评论64阅读模式
英文:

Headless build using Eclipse CDT with the IAR plugin

问题

我有一个使用Renesas e2studio创建的C项目,用于Synergy,并使用Renesas Synergy的IAR Embedded Workbench进行编译。

我想要利用Eclipse的无头构建选项从命令行构建它。我尝试了以下命令:

C:\Renesas\e2studio_v2022-10_ssp_v2.4.0\eclipse\e2studioc.exe -application org.eclipse.cdt.managedbuilder.core.headlessbuild -data \tempWorkspace -import \Projects\My_S7G2_FW -vmargs -Diar.sdkprovider.arm.v8.location="C:\Program Files (x86)\IAR Systems\Embedded Workbench for Synergy 8.23.3" -cleanBuild My_S7G2_FW/Release

但是得到了以下结果:

Create.
Opening 'My_S7G2_FW'.
06/22/2023 9:20:31.950 | INFO   | com.iar.ide.common.ewpath.EwPathManager  | ension configuration -- Path to EW stage not found for provider iar.sdkprovider.arm.v8. Requesting a settings dialog to be displayed...
06/22/2023 9:20:31.969 | INFO   | com.iar.ide.common.ewpath.EwPathManager  | main                 -- Path to EW stage not found for provider iar.sdkprovider.arm.v8. Requesting a settings dialog to be displayed...
06/22/2023 9:20:31.188 | INFO   | m.v7.toolchain.tables.ArmCoreFpuRegistry | ension configuration -- Enabling Cortex-*F workaround (ECL-1993) for EWARM 7.40.3
06/22/2023 9:20:32.018 | INFO   | com.iar.ide.common.ewpath.EwPathManager  | ension configuration -- Path to EW stage not found for provider iar.sdkprovider.arm.v8. Requesting a settings dialog to be displayed...
06/22/2023 9:20:32.111 | INFO   | com.iar.ide.common.ewpath.EwPathManager  | ension configuration -- Path to EW stage not found for provider iar.sdkprovider.arm.v8. Requesting a settings dialog to be displayed...
06/22/2023 9:20:32.120 | INFO   | com.iar.ide.common.ewpath.EwPathManager  | ension configuration -- Path to EW stage not found for provider iar.sdkprovider.arm.v8. Requesting a settings dialog to be displayed...
06/22/2023 9:20:32.134 | INFO   | com.iar.ide.common.ewpath.EwPathManager  | ractCProjectListener -- Path to EW stage not found for provider iar.sdkprovider.arm.v8. Requesting a settings dialog to be displayed...
06/22/2023 9:20:32.159 | INFO   | com.iar.ide.common.ewpath.EwPathManager  |ker-5: C/C++ Indexer -- Path to EW stage not found for provider iar.sdkprovider.arm.v8. Requesting a settings dialog to be displayed...
06/22/2023 9:20:32.191 | INFO   | com.iar.ide.common.ewpath.EwPathManager  | ension configuration -- Path to EW stage not found for provider iar.sdkprovider.arm.v8. Requesting a settings dialog to be displayed..

是否有其他方法可以帮助Eclipse插件找到IAR SDK位置,以便可以完全从命令行构建项目?

英文:

I have a C project which was created with Renesas e2studio for Synergy and compiled with IAR Embedded Workbench for Renesas Synergy.

I would like to take advantage of Eclipse's headless build option to build it from command line. I tried this:

C:\Renesas\e2studio_v2022-10_ssp_v2.4.0\eclipse\e2studioc.exe -application org.eclipse.cdt.managedbuilder.core.headlessbuild -data \tempWorkspace -import \Projects\My_S7G2_FW -vmargs -Diar.sdkprovider.arm.v8.location="C:\Program Files (x86)\IAR Systems\Embedded Workbench for Synergy 8.23.3" -cleanBuild My_S7G2_FW/Release

And got:

Create.
Opening 'My_S7G2_FW '.
06/22/2023 9:20:31.950 | INFO   | com.iar.ide.common.ewpath.EwPathManager  | ension configuration -- Path to EW stage not found for provider iar.sdkprovider.arm.v8. Requesting a settings dialog to be displayed...
06/22/2023 9:20:31.969 | INFO   | com.iar.ide.common.ewpath.EwPathManager  | main                 -- Path to EW stage not found for provider iar.sdkprovider.arm.v8. Requesting a settings dialog to be displayed...
06/22/2023 9:20:31.188 | INFO   | m.v7.toolchain.tables.ArmCoreFpuRegistry | ension configuration -- Enabling Cortex-*F workaround (ECL-1993) for EWARM 7.40.3
06/22/2023 9:20:32.018 | INFO   | com.iar.ide.common.ewpath.EwPathManager  | ension configuration -- Path to EW stage not found for provider iar.sdkprovider.arm.v8. Requesting a settings dialog to be displayed...
06/22/2023 9:20:32.111 | INFO   | com.iar.ide.common.ewpath.EwPathManager  | ension configuration -- Path to EW stage not found for provider iar.sdkprovider.arm.v8. Requesting a settings dialog to be displayed...
06/22/2023 9:20:32.120 | INFO   | com.iar.ide.common.ewpath.EwPathManager  | ension configuration -- Path to EW stage not found for provider iar.sdkprovider.arm.v8. Requesting a settings dialog to be displayed...
06/22/2023 9:20:32.134 | INFO   | com.iar.ide.common.ewpath.EwPathManager  | ractCProjectListener -- Path to EW stage not found for provider iar.sdkprovider.arm.v8. Requesting a settings dialog to be displayed...
06/22/2023 9:20:32.159 | INFO   | com.iar.ide.common.ewpath.EwPathManager  | ker-5: C/C++ Indexer -- Path to EW stage not found for provider iar.sdkprovider.arm.v8. Requesting a settings dialog to be displayed...
06/22/2023 9:20:32.191 | INFO   | com.iar.ide.common.ewpath.EwPathManager  | ension configuration -- Path to EW stage not found for provider iar.sdkprovider.arm.v8. Requesting a settings dialog to be displayed..

Is there another way to help the Eclipse plugin to find the IAR SDK location so that the project can be built entirely from the command line?

答案1

得分: 3

我遇到了相同的问题,以下是我们解决问题的方法:

  1. 在 Eclipse(e2studio)中,转到您的 IAR SDK 插件首选项并更新 IAR IDE 安装目录的路径。
  2. 导出首选项(按钮位于左下角)。Eclipse 将提供“应用并继续”的选择。
  3. 在文本编辑器中打开“MyPrefs.epf”并开始搜索“iar”,直到找到/instance/com.iar.ide/common.ui/EWPath.iar.sdkprovider...
  4. 复制该行的内容,除了前缀 /instance/,然后粘贴到 C:\Renesas\Synergy\e2studio...\eclipse\plugins\com.renesas.ide.e2studio_...\plugin_customization.ini 的末尾。

现在,e2studio(Eclipse CDT)应该能够在不需要进一步手动步骤的情况下从 GUI 和 CLI 中找到 IAR SDK。

此过程非常有助于在创建工作区之前设置所有我们需要的插件选项。同样的过程也可以用于标准的 Eclipse CDT 实例。

此外,您还可以在从命令行构建项目时(根据您的示例)使用带有 --no-indexer 选项的 e2studioc.exe 来加快速度:

C:\Renesas\e2studio_v2022-10_ssp_v2.4.0\eclipse\e2studioc.exe
 -no-indexer
 -application org.eclipse.cdt.managedbuilder.core.headlessbuild
 -verbose
 -data \tempWorkspace
 -import \Projects\My_S7G2_FW 
 -cleanBuild My_S7G2_FW/Release
英文:

I have run into an identical issue and here is how we solved it:

  1. In Eclipse (e2studio), go to your IAR SDK plugin preferences and update the path to the IAR IDE installation directory.
  2. Export the preferences (the button is located at bottom left). Eclipse will offer the choice to "Apply and Continue".
  3. Open "MyPrefs.epf" in a Text Editor and start searching for "iar" until you hit /instance/com.iar.ide/common.ui/EWPath.iar.sdkprovider....
  4. Copy that line contents except for the prefix /instance/ and paste it to the end of C:\Renesas\Synergy\e2studio...\eclipse\plugins\com.renesas.ide.e2studio_...\plugin_customization.ini

Now it should be possible for e2studio (Eclipse CDT) to find the IAR SDK without any further manual steps from the GUI and from the CLI.

This procedure was quite helpful for customizing all the plugin options we needed to be set before creating the Workspace. The same procedure can be used similarly with standard Eclipse CDT instances that ships as well.

Additionally you can also use e2studioc.exe with the --no-indexer option for speeding up things a little bit when building a project from the command line (based on your example):

C:\Renesas\e2studio_v2022-10_ssp_v2.4.0\eclipse\e2studioc.exe
 -no-indexer
 -application org.eclipse.cdt.managedbuilder.core.headlessbuild
 -verbose
 -data \tempWorkspace
 -import \Projects\My_S7G2_FW 
 -cleanBuild My_S7G2_FW/Release

huangapple
  • 本文由 发表于 2023年6月22日 18:03:33
  • 转载请务必保留本文链接:https://go.coder-hub.com/76530753.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定