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.
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?
Solved! Go to Solution.
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...
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?
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:
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...
I spotted a difference between the example here and my batch file, which was specifying a workspace.
I would guess that there *is* an error being reported in the build - check the complete build log.
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