Attempting to utilize Jenkins with Arm Development Studio 2022.2 to do some builds but the pipeline fails.
This is the command being run (based on the documentation):
C:\"Program Files"\Arm\"Development Studio 2022.2"\bin\armds_idec.exe -nosplash --launcher.suppressErrors -application com.arm.cmsis.pack.project.headlessbuild -data C:\git\workspace -import test_module\code -cleanBuild "Test_Project/Debug"
Here's the relevant log output:
11:46:07 Build Finished. 0 errors, 80 warnings. (took 21s.966ms)Armds_idec:Java was started but returned exit code=1-Xms1024m-Xmx2048m--add-opens=java.base/java.io=ALL-UNNAMED--add-opens=java.base/sun.nio.ch=ALL-UNNAMED--add-opens=java.base/java.lang=ALL-UNNAMED--add-opens=java.base/java.util=ALL-UNNAMED--add-opens=java.base/java.nio.charset=ALL-UNNAMED--add-opens=java.base/java.nio=ALL-UNNAMED--add-opens=java.base/java.lang.reflect=ALL-UNNAMED-Dnashorn.args=--no-deprecation-warning-Djava.class.path=C:\Program Files\Arm\Development Studio 2022.2\bin\..\sw\ide\\plugins/org.eclipse.equinox.launcher_1.6.400.v20210924-0641.jar-os win32-ws win32-arch x86_64-launcher C:\Program Files\Arm\Development Studio 2022.2\bin\..\sw\ide\armds_idec.exe-name Armds_idec--launcher.library C:\Program Files\Arm\Development Studio 2022.2\bin\..\sw\ide\\plugins/org.eclipse.equinox.launcher.win32.win32.x86_64_1.2.400.v20211117-0650\eclipse_11602.dll-startup C:\Program Files\Arm\Development Studio 2022.2\bin\..\sw\ide\\plugins/org.eclipse.equinox.launcher_1.6.400.v20210924-0641.jar--launcher.overrideVmargs-application com.arm.cmsis.pack.project.headlessbuild-data C:\git\workspace-import test_module\code-cleanBuild Test_Project/Debug-vm C:\Program Files\Arm\Development Studio 2022.2\bin\..\sw\ide\\../java/bin/server/jvm.dll-vmargs-Xms1024m-Xmx2048m--add-opens=java.base/java.io=ALL-UNNAMED--add-opens=java.base/sun.nio.ch=ALL-UNNAMED--add-opens=java.base/java.lang=ALL-UNNAMED--add-opens=java.base/java.util=ALL-UNNAMED--add-opens=java.base/java.nio.charset=ALL-UNNAMED--add-opens=java.base/java.nio=ALL-UNNAMED--add-opens=java.base/java.lang.reflect=ALL-UNNAMED-Dnashorn.args=--no-deprecation-warning-Djava.class.path=C:\Program Files\Arm\Development Studio 2022.2\bin\..\sw\ide\\plugins/org.eclipse.equinox.launcher_1.6.400.v20210924-0641.jar
and the armds_ide.ini:
-startupplugins/org.eclipse.equinox.launcher_1.6.400.v20210924-0641.jar--launcher.libraryplugins/org.eclipse.equinox.launcher.win32.win32.x86_64_1.2.400.v20211117-0650-vm../java/bin/server/jvm.dll-vmargs-Xms1024m-Xmx2048m--add-opens=java.base/java.io=ALL-UNNAMED--add-opens=java.base/sun.nio.ch=ALL-UNNAMED--add-opens=java.base/java.lang=ALL-UNNAMED--add-opens=java.base/java.util=ALL-UNNAMED--add-opens=java.base/java.nio.charset=ALL-UNNAMED--add-opens=java.base/java.nio=ALL-UNNAMED--add-opens=java.base/java.lang.reflect=ALL-UNNAMED-Dnashorn.args=--no-deprecation-warning
The only thing that was added to the .ini from stock was the -Xms and -Xmx options.
When running from the IDE, there are no errors when I close out. I tried the recommended eclipse option of using "-XX:-UseCompressedOops" but that produces a new error:
Opening 'Test_Project'.Invalid Arguments: [-XX:-UseCompressedOops, -cleanBuild, Test_Project/Debug, -no-indexer]Error: Unknown argument: -XX:-UseCompressedOops -cmsisRoot {path} CMSIS-Packs root directory -help prints the list of argumentsArmds_idec:Java was started but returned exit code=2
Also tried removing/modifying the Xms and Xmx options, setting JAVA_HOME, switching between the .dll and .exe for the -vm argument and even re-installing but no luck. The system where the project is to be run is clean: only has the java that was installed with the Arm Development Studio nor has any environment variables like JAVA_HOME set. The fails occurs whether I try to run through the pipeline or directly from a command prompt. The error also occurs when I try to run armds_idec on my local machine.
Hi againAre you able to fix the orphaned configuration? You might need to remake the Eclipse project afresh to do so.If you can fix it, it'd be interesting to find out whether that was the cause of the exit code=1 error you see.Have you tried a simple "Hello World" project in your Jenkins flow?Stephen
A customer requirement is to use the legacy 5.0.6u3 toolchain, downloaded from the Arm site, and anything that gets set to use that toolchain seems to produce the "orphaned toolchain" complaint under release. But that's on my machine. I'll try rebuilding the project from scratch in a clean environment to see if that doesn't work as I honestly don't remember if I already tried that.
So it turns out that the default configuration I selected was wrong. At first, when I went into "Build Configurations->Manage", I was given a choice of Debug or Release for "Default configuration." When I went back in, I was given the options of "Debug : Arm Compiler 5" or "Release : Arm Compiler 5". I choose the debug option and all seemed well, at least within the GUI environment. Going back in for a third time, I saw options for "Arm Compiler 5" and "Arm Compiler 5.06u3" with the second being for the 5.0.6u3 toolchain I installed. Not sure why I had to jump through hoops to find it but as soon as I rebuild my configurations using the defaults for 5.0.6u3, the "orphaned toolchain" and Java errors all went away. So the problem does appear to be that the toolchain specific plugins/versions didn't get picked up when I first went to create the project. I even went back into a copy of the project and the toolchain specific version will not show up until after I create at least one temp configuration using the "Arm Compiler 5" version. The workaround to create the temp from the old default and then use the correct/toolchain default once it appears has worked every time so far.
Glad to hear that you've resolved the issue, and thanks for sharing the solution with the community :)
Stephen