How to fix error on TeamCity with SoC EDS 18.1: Toolchain required to build project is not registered: Altera Baremetal GCC (with eclipse console executable: eclipsec.exe)
Note: This problem was also posted on an old thread that does no longer get attention.
We use an application called TeamCity for continuous integration. When developers check-in their changes, TeamCity will rebuild the software on an agent (that runs on a virtual machine with Windows Server 2016).
I installed the following software on a TeamCity agent:
- Nios II EDS: Quartus Prime Lite Edition, 18.1 - Quartus Prime (includes Nios II EDS), Devices: Cyclone IV and V http://fpgasoftware.intel.com/?edition=lite
- SoC EDS: Intel SoC FPGA Embedded Development Suite, 18.1 Standard http://fpgasoftware.intel.com/soceds/18.1/?edition=standard&platform=windows&download_manager=dlm3
By default the TeamCity service runs with the SYSTEM account. I already detected some problems with Altera tooling and the SYSTEM account and decided to create a separate local account "svc_teamcity". I added this account to the administrators group and granted it permission to logon as a service (SeServiceLogonRight). I used this account to install the software (Nios II EDS and SoC EDS).
Next step is to configure the "Altera Baremetal GCC". First I did this manually with add_toolchain.exe and ds5_link.exe based on the info on: https://forums.intel.com/s/question/0D50P00003yyS7jSAE/
As this did not help I decided to create a script that could be run as a post-install by TeamCity. In this way it would run in the same environment as a software build.
This is the script:
#!/bin/bash
# https://developer.arm.com/products/software-development-tools/license-management/resources/product-and-toolkit-configuration
# http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.faqs/ka16372.html
# ARM_TOOL_VARIANT is already set via Windows Environment variable
# export ARM_TOOL_VARIANT=altera
env
# https://developer.arm.com/products/software-development-tools/ds-5-development-studio/resources/tutorials/adding-new-compiler-toolchains-to-ds-5
cd /cygdrive/c/altera/18.1/embedded/host_tools/mentor/gnu/arm/baremetal/bin
/cygdrive/c/altera/18.1/embedded/ds-5/bin/add_toolchain.exe --non-interactive .
cd /cygdrive/c/altera/18.1/embedded/host_tools/altera/ds5_link
./ds5_link.exeThis scripts runs successful on TeamCity, see output:
Step 2/2: Run SoC EDS Command Shell build (Command Line) (6s)
Launching ""C:\altera\18.1\embedded\Embedded_Command_Shell.bat"" in working directory D:\BuildAgentData1\work\350ec922e6c84c6 as it is not present in checkout directory D:\BuildAgentData1\work\350ec922e6c84c6
Running interpreter: C:\Windows\system32\cmd.exe
Starting: C:\Windows\system32\cmd.exe /c "C:\altera\18.1\embedded\Embedded_Command_Shell.bat" D:/BuildAgentData1/work/350ec922e6c84c6/post-install-altera.sh
in directory: D:\BuildAgentData1\work\350ec922e6c84c6
USERDOMAIN_ROAMINGPROFILE=NLHEN1BLD101
HOMEPATH=\Users\svc_teamcity
ARM_TOOL_VARIANT=altera
MANPATH=/usr/local/man:/usr/share/man:/usr/man:
LOC_JAVA=C:\Program Files\Java\jre1.8.0_162\bin\java.exe
APPDATA=C:\Users\svc_teamcity\AppData\Roaming
TEAMCITY_BUILD_PROPERTIES_FILE=D:\BuildAgentData1\temp\buildTmp\teamcity.build7896560630992200924.properties
ProgramW6432=C:\Program Files
HOSTNAME=nlhen1bld101
WRAPPER_BITS=32
JDK_18_x64=C:\Program Files\Java\jdk1.8.0_162
SHELL=/bin/bash
TERM=cygwin
PROCESSOR_IDENTIFIER=Intel64 Family 6 Model 63 Stepping 2, GenuineIntel
WINDIR=C:\Windows
TMPDIR=/cygdrive/d/BuildAgentData1/temp/buildTmp
TEAMCITY_CAPTURE_ENV="C:\Program Files\Java\jre1.8.0_162\bin\java.exe" -jar "D:\BuildAgent1\plugins\environment-fetcher\bin\env-fetcher.jar"
HAS_ALTERA=TRUE
PUBLIC=C:\Users\Public
SOPC_KIT_NIOS2=C:/altera/18.1/nios2eds
QSYS_ROOTDIR=C:\altera\18.1\quartus\sopc_builder\bin
ARM_PRODUCT_PATH=C:\altera\18.1\embedded\ds-5/sw/mappings
USERDOMAIN=NLHEN1BLD101
CommonProgramFiles(x86)=C:\Program Files (x86)\Common Files
OS=Windows_NT
ALLUSERSPROFILE=C:\ProgramData
TEAMCITY_VERSION=2018.1 (build 58245)
USER=NLHEN1BLD101+svc_teamcity
JRE_HOME=C:\Program Files\Java\jre1.8.0_162
TEMP=/tmp
temp=D:\BuildAgentData1\temp\buildTmp
COMMONPROGRAMFILES=C:\Program Files\Common Files
tmp=D:\BuildAgentData1\temp\buildTmp
ALTERA_DIR_181=C:\altera\18.1
TEAMCITY_BUILDCONF_NAME=Altera 18.1 post-install
USERNAME=svc_teamcity
PROCESSOR_LEVEL=6
JDK_18=C:\Program Files\Java\jdk1.8.0_162
BUILD_VCS_NUMBER=1181
ProgramFiles(x86)=C:\Program Files (x86)
QUARTUS_ROOTDIR=C:/altera/18.1/quartus
PATH=/cygdrive/c/altera/18.1/embedded/host_tools/mentor/gnu/arm/baremetal/bin:/cygdrive/c/altera/18.1/embedded/host_tools/gnu/make/H-x86_64-mingw32/bin:/cygdrive/c/altera/18.1/embedded/host_tools/altera/preloadergen:/cygdrive/c/altera/18.1/embedded/host_tools/altera/mkimage:/cygdrive/c/altera/18.1/embedded/host_tools/altera/mkpimage:/cygdrive/c/altera/18.1/embedded/host_tools/altera/device_tree:/cygdrive/c/altera/18.1/embedded/host_tools/altera/diskutils:/cygdrive/c/altera/18.1/embedded/host_tools/altera/imagecat:/cygdrive/c/altera/18.1/embedded/host_tools/altera/secureboot:/cygdrive/c/altera/18.1/embedded/host_tools/gnu/dtc:/cygdrive/c/altera/18.1/embedded/host_tools/python:/cygdrive/c/altera/18.1/embedded/ds-5/sw/gcc/bin:/cygdrive/c/altera/18.1/embedded/ds-5/sw/ARMCompiler5.06u6/bin:/cygdrive/c/altera/18.1/embedded/ds-5/bin:/cygdrive/c/altera/18.1/nios2eds/bin/gnu/H-x86_64-mingw32/bin:/cygdrive/c/altera/18.1/nios2eds/sdk2/bin:/cygdrive/c/altera/18.1/nios2eds/bin:/cygdrive/c/altera/18.1/quartus/bin64:/cygdrive/c/altera/18.1/quartus/sopc_builder/bin:/usr/local/bin:/usr/bin:/cygdrive/c/Windows/system32:/cygdrive/c/Windows:/cygdrive/c/Windows/System32/Wbem:/cygdrive/c/Windows/System32/WindowsPowerShell/v1.0:/cygdrive/c/Users/svc_teamcity/AppData/Local/Microsoft/WindowsApps:/cygdrive/c/Program Files/Java/jre1.8.0_162/bin
PSModulePath=%ProgramFiles%\WindowsPowerShell\Modules;C:\Windows\system32\WindowsPowerShell\v1.0\Modules
SHELLOPTS=braceexpand:hashall:igncr:interactive-comments
PWD=/cygdrive/c/Users/svc_teamcity
WRAPPER_PATH_SEPARATOR=;
SYSTEMDRIVE=C:
VER_JAVA=8.0.1620.12
JAVA_HOME=C:\Program Files\Java\jdk1.8.0_162
CYGWIN=nodosfilewarning
LANG=en_US.UTF-8
USERPROFILE=C:\Users\svc_teamcity
TZ=Europe/Amsterdam
HAS_JAVA=TRUE
LOGONSERVER=\\NLHEN1BLD101
CommonProgramW6432=C:\Program Files\Common Files
BUILD_VCS_NUMBER_CM_ROOT=1181
WRAPPER_OS=windows
PROCESSOR_ARCHITECTURE=AMD64
LOCALAPPDATA=C:\Users\svc_teamcity\AppData\Local
ProgramData=C:\ProgramData
SHLVL=2
JDK_HOME=C:\Program Files\Java\jdk1.8.0_162
HOME=/cygdrive/c/Users/svc_teamcity
PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC
HOMEDRIVE=C:
!D:=D:\BuildAgentData1\work\350ec922e6c84c6
TEAMCITY_PROCESS_FLOW_ID=412071308148
PROMPT=$P$G
COMSPEC=C:\Windows\system32\cmd.exe
TMP=/tmp
SYSTEMROOT=C:\Windows
PRINTER=Microsoft Print to PDF
PROCESSOR_REVISION=3f02
VER_ALTERA=;18.1;
BUILD_NUMBER=7
INFOPATH=/usr/local/info:/usr/share/info:/usr/info:
PROGRAMFILES=C:\Program Files
TEAMCITY_PROJECT_NAME=SW Group Tools
NUMBER_OF_PROCESSORS=2
WRAPPER_ARCH=x86
WRAPPER_FILE_SEPARATOR=\
TEAMCITY_PROCESS_PARENT_FLOW_ID=
COMPUTERNAME=NLHEN1BLD101
SOCEDS_DEST_ROOT=C:/altera/18.1/embedded
_=/usr/bin/env
Toolchain GCC 6.2.0 [arm-altera-eabi] was discovered from C:\altera\18.1\embedded\host_tools\mentor\gnu\arm\baremetal\bin\.
C Compiler : arm-altera-eabi-gcc.exe
C Linker : arm-altera-eabi-gcc.exe
C++ Compiler : arm-altera-eabi-g++.exe
C++ Linker : arm-altera-eabi-g++.exe
Assembler : arm-altera-eabi-as.exe
Archiver : arm-altera-eabi-ar.exe
Image Converter : arm-altera-eabi-objdump.exe
Toolchain 'GCC 6.2.0 [arm-altera-eabi]' added
C:\altera\18.1\embedded\ds-5\sw\eclipse\dropins\altera_baremetal_gcc.link => ../../../host_tools/mentor/gnu/arm
C:\altera\18.1\embedded\ds-5\sw\eclipse\dropins\altera_cheatsheets.lnk => ../../../host_tools/altera/cheatsheets
Process exited with code 0When I run a software build configuration with the console executer of Eclipse (eclipsec.exe) I get the following error:
Excecuting: eclipsec --launcher.suppressErrors -nosplash -application org.eclipse.cdt.managedbuilder.core.headlessbuild -data D:/BuildAgentData1/work/d908518b686f8579/workspace/headless_5748 -build test_baremetal
**** Build of configuration Debug for project test_baremetal ****
Toolchain required to build project is not registered: Altera Baremetal GCC
**** Build of configuration Release for project test_baremetal ****
Toolchain required to build project is not registered: Altera Baremetal GCC
Eclipsec:
Java was started but returned exit code=1
-Djava.class.path=C:\altera\18.1\embedded\ds-5\bin\..\sw\eclipse\\startup.jar
-os win32
-ws win32
-arch x86_64
-launcher C:\altera\18.1\embedded\ds-5\bin\..\sw\eclipse\eclipsec.exe
-name Eclipsec
--launcher.library C:\altera\18.1\embedded\ds-5\bin\..\sw\eclipse\plugins\org.eclipse.equinox.launcher.win32.win32.x86_64_1.1.401.v20161122-1740\eclipse_1617.dll
-startup C:\altera\18.1\embedded\ds-5\bin\..\sw\eclipse\\startup.jar
--launcher.overrideVmargs
-product com.arm.ds.${ARM_TOOL_VARIANT?$ARM_TOOL_VARIANT$:default}
-application org.eclipse.cdt.managedbuilder.core.headlessbuild
-data D:/BuildAgentData1/work/d908518b686f8579/workspace/headless_5748
-build test_baremetal
-vm C:\altera\18.1\embedded\ds-5\bin\..\sw\eclipse\\../java/bin/server/jvm.dll
-vmargs
-Djava.class.path=C:\altera\18.1\embedded\ds-5\bin\..\sw\eclipse\\startup.jarHow can this be solved?
Today we found a solution: Use eclipse itself in stead of the console version eclipsec. The same command-line options can be used, e.g:
I.s.o. using this:
COMMAND_TO_RUN="eclipsec --launcher.suppressErrors -nosplash -application org.eclipse.cdt.managedbuilder.core.headlessbuild -data ${TEMP_WORKSPACE_DIR} -build ${project}"
use this
COMMAND_TO_RUN="eclipse --launcher.suppressErrors -nosplash -application org.eclipse.cdt.managedbuilder.core.headlessbuild -data ${TEMP_WORKSPACE_DIR} -build ${project}"
This is related to case 00412336 on IPS (Intel Premier Support).