Build Server - Mcuxpressoidec: Java was started but returned exit code=1

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

Build Server - Mcuxpressoidec: Java was started but returned exit code=1

跳至解决方案
2,820 次查看
elijah
Contributor III

I am setting up a build server for an MCUXpresso Project, and I have configured it to build the Release configuration. The build finishes correctly but the build server is reporting that it failed with the following message:

 

 

Mcuxpressoidec:
Java was started but returned exit code=1
-Djava.class.path=C:\nxp\MCUXpressoIDE_11.2.0_4120\ide\\plugins/org.eclipse.equinox.launcher_1.5.600.v20191014-2022.jar
-os win32
-ws win32
-arch x86_64
-launcher C:\nxp\MCUXpressoIDE_11.2.0_4120\ide\mcuxpressoidec.exe
-name Mcuxpressoidec
--launcher.library C:\nxp\MCUXpressoIDE_11.2.0_4120\ide\\plugins/org.eclipse.equinox.launcher.win32.win32.x86_64_1.1.1100.v20190907-0426\eclipse_1902.dll
-startup C:\nxp\MCUXpressoIDE_11.2.0_4120\ide\\plugins/org.eclipse.equinox.launcher_1.5.600.v20191014-2022.jar
--launcher.overrideVmargs
-application org.eclipse.cdt.managedbuilder.core.headlessbuild
-import ./ProjectName
-cleanBuild ProjectName/Release
-vm C:\nxp\MCUXpressoIDE_11.2.0_4120\ide\jre\bin\server\jvm.dll
-vmargs
-Djava.class.path=C:\nxp\MCUXpressoIDE_11.2.0_4120\ide\\plugins/org.eclipse.equinox.launcher_1.5.600.v20191014-2022.jar 
##[error]Process completed with exit code 1.

 

 

I am using a batch file to run the build with the following contents:

 

 

rem Batch file that builds firmware for release

@echo off

rem path to build tools
SET TOOLCHAIN_PATH=C:\nxp\MCUXpressoIDE_11.2.0_4120\ide\tools\bin

rem path to command line executable for MCUXpresso
SET IDE=C:\nxp\MCUXpressoIDE_11.2.0_4120\ide\mcuxpressoidec.exe

ECHO Extending PATH if not already present
ECHO %PATH%|findstr /i /c:"%TOOLCHAIN_PATH:"=%">nul || set PATH=%PATH%;%TOOLCHAIN_PATH%

ECHO Launching MCUXpresso IDE
"%IDE%" -nosplash --launcher.suppressErrors -application org.eclipse.cdt.managedbuilder.core.headlessbuild -import "./ProjectName" -cleanBuild ProjectName/Release

 

 

Manually running the batch file reports build succeeded with no errors, but the server reports it failed due to the Java error in mcuxpressoidec.exe.

How can I fix this issue?

0 项奖励
回复
1 解答
2,561 次查看
elijah
Contributor III

I did fix it, I think I had to specify a workspace in the arguments when launching mcuxpressoidec.exe using -data "C:\MCUXpressoIDE_11.2.0_4120\workspace". My batch file is now:

 

rem Batch file that builds firmware for release

@echo off

rem path to build tools
SET TOOLCHAIN_PATH=C:\nxp\MCUXpressoIDE_11.2.0_4120\ide\tools\bin

rem path to command line executable for MCUXpresso
SET IDE=C:\nxp\MCUXpressoIDE_11.2.0_4120\ide\mcuxpressoidec.exe

ECHO Extending PATH if not already present
ECHO %PATH%|findstr /i /c:"%TOOLCHAIN_PATH:"=%">nul || set PATH=%PATH%;%TOOLCHAIN_PATH%

ECHO Launching MCUXpresso IDE
"%IDE%" -nosplash --launcher.suppressErrors  -application org.eclipse.cdt.managedbuilder.core.headlessbuild -data "C:\MCUXpressoIDE_11.2.0_4120\workspace" -import "./ProjName" -cleanBuild ProjName/Release

 


Useful link with a batch file that I played spot the difference with:
https://mcuoneclipse.com/2017/08/03/building-eclipse-and-mcuxpresso-ide-projects-from-the-command-li...

 

在原帖中查看解决方案

0 项奖励
回复
6 回复数
2,585 次查看
Smatt
Contributor I

I am encountering the same error. The build process itself is successful and reports 0 errors. Also a functional image is generated. 

However, eclipse exits with return code 1, which leads to the build automation system to register the build as failed. 

Could you solve the issue?

0 项奖励
回复
2,554 次查看
elijah
Contributor III

I did fix it, I had to specify a workspace in the arguments when launching mcuxpressoidec.exe using -data "C:\MCUXpressoIDE_11.2.0_4120\workspace". My batch file is now:

rem Batch file that builds firmware for release

@echo off

rem path to build tools
SET TOOLCHAIN_PATH=C:\nxp\MCUXpressoIDE_11.2.0_4120\ide\tools\bin

rem path to command line executable for MCUXpresso
SET IDE=C:\nxp\MCUXpressoIDE_11.2.0_4120\ide\mcuxpressoidec.exe

ECHO Extending PATH if not already present
ECHO %PATH%|findstr /i /c:"%TOOLCHAIN_PATH:"=%">nul || set PATH=%PATH%;%TOOLCHAIN_PATH%

ECHO Launching MCUXpresso IDE
"%IDE%" -nosplash --launcher.suppressErrors  -application org.eclipse.cdt.managedbuilder.core.headlessbuild -data "C:\MCUXpressoIDE_11.2.0_4120\workspace" -import "./ProjectName" -cleanBuild ProjectName/Release

Useful link that has a batch file that I played spot the difference with to find the issue:

https://mcuoneclipse.com/2017/08/03/building-eclipse-and-mcuxpresso-ide-projects-from-the-command-li...

0 项奖励
回复
2,562 次查看
elijah
Contributor III

I did fix it, I think I had to specify a workspace in the arguments when launching mcuxpressoidec.exe using -data "C:\MCUXpressoIDE_11.2.0_4120\workspace". My batch file is now:

 

rem Batch file that builds firmware for release

@echo off

rem path to build tools
SET TOOLCHAIN_PATH=C:\nxp\MCUXpressoIDE_11.2.0_4120\ide\tools\bin

rem path to command line executable for MCUXpresso
SET IDE=C:\nxp\MCUXpressoIDE_11.2.0_4120\ide\mcuxpressoidec.exe

ECHO Extending PATH if not already present
ECHO %PATH%|findstr /i /c:"%TOOLCHAIN_PATH:"=%">nul || set PATH=%PATH%;%TOOLCHAIN_PATH%

ECHO Launching MCUXpresso IDE
"%IDE%" -nosplash --launcher.suppressErrors  -application org.eclipse.cdt.managedbuilder.core.headlessbuild -data "C:\MCUXpressoIDE_11.2.0_4120\workspace" -import "./ProjName" -cleanBuild ProjName/Release

 


Useful link with a batch file that I played spot the difference with:
https://mcuoneclipse.com/2017/08/03/building-eclipse-and-mcuxpresso-ide-projects-from-the-command-li...

 

0 项奖励
回复
2,552 次查看
elijah
Contributor III

https://mcuoneclipse.com/2017/08/03/building-eclipse-and-mcuxpresso-ide-projects-from-the-command-li...

I spotted a difference between the example here and my batch file, which was specifying a workspace.

0 项奖励
回复
2,813 次查看
converse
Senior Contributor V

I would guess that there *is* an error being reported in the build - check the complete build log.

0 项奖励
回复
2,798 次查看
elijah
Contributor III

I've checked through the whole log, the only error is the one in my post which appears at the end after the build finishes

0 项奖励
回复