- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.exe
This 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 0
When 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.jar
How can this be solved?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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).
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Thanks a lot for your reply!
Yes, I created an account (named svc_teamcity) and granted it admin features.
With this account I successfully installed both SoC EDS (Intel SoC FPGA Embedded Development Suite, 18.1 Standard) and NIOS II EDS (Quartus Prime Lite Edition, 18.1).
The problem described in my previous message is NOT about NIOS II EDS but about SoC EDS. The targeted Altera chip is Cyclone V (part number 5CSEBA4U23C8N, with Dual ARM).
We use Eclipse to develop the software for Cyclone V (I think this is the default development environment provided by Intel Altera).
On the virtual machine, where I installed SoC EDS + NIOS II EDS + TeamCity agent service, we use the command-line version of Eclipse (eclipsec) to compile the software.
When I run eclipsec with TeamCity I get this error (see title of the thread):
Toolchain required to build project is not registered: Altera Baremetal GCC
The strange thing is that the build successfully runs when I login with "svc_teamcity" and run the same command-line directly e.g.:
C:\Windows\system32\cmd.exe /k "C:\altera\18.1\embedded\Embedded_Command_Shell.bat" D:/BuildAgentData1/work/d908518b686f8579/build/dbm2_boot_build.sh
So, I expect that some setting is needed to fix the problem. I could not figure out which setting this is. That's the reason I request for help.
The build-script works with Altera 15.1, although I had to fix a problem with the SYSTEM account: "Failed to query My Documents directory". I fixed this problem (with Altera 15.1) by adding a registry key for the SYSTEM account (S-1-5-18):
REG ADD "HKEY_USERS\S-1-5-18\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" /v "Personal" /t REG_SZ /d "C:\ProgramData" /f
To understand the context of the problem it may be helpful to show the complete content of the build script that is used to compile the software with eclipsec.
The command-line that is used to start the build-script is e.g.:
C:\Windows\system32\cmd.exe /c "C:\altera\18.1\embedded\Embedded_Command_Shell.bat" D:/BuildAgentData1/work/d908518b686f8579/build/dbm2_boot_build.sh
An example of a build-script that we use (this works with Altera SoC EDS 15.1 but not with 18.1) is:
#!/bin/bash
# Builds the ECSW projects with the command-line version of eclipse: eclipsec
# See documentation: http://infocenter.arm.com/help/topic/com.arm.doc.dui0478u/ris1421682431227.html
export SCRIPT_DIR_CYGWIN=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
export SCRIPT_DIR=$(cygpath -m -a ${SCRIPT_DIR_CYGWIN})
export CONFIGURATION_DIR_CYGWIN=$(cd ${SCRIPT_DIR}/.. && pwd)
export CONFIGURATION_DIR=$(cygpath -m -a ${CONFIGURATION_DIR_CYGWIN})
# Add root directories of projects to build to the next line
PROJECTS_TO_BUILD="test_baremetal Cyclone_V_ucos_port Cyclone_V_infra dbm2_infra dbm2_preloader dbm2_recovery"
retval=0
FAILED_PROJECTS=
TEMP_WORKSPACE_DIR=${CONFIGURATION_DIR}/workspace/headless_$$
pushd ${CONFIGURATION_DIR} > /dev/null
rm -fRv ${TEMP_WORKSPACE_DIR}
mkdir -p -v ${TEMP_WORKSPACE_DIR}
ECHO $(date) Script directory: ${SCRIPT_DIR}, Configuration directory: ${CONFIGURATION_DIR} ...
which eclipsec
ECHO Dump the environment with env
env
# Import and clean the projects
for project in ${PROJECTS_TO_BUILD}
do
ECHO "##teamcity[blockOpened name='importing ${project}']"
COMMAND_TO_RUN="eclipsec --launcher.suppressErrors -nosplash -application org.eclipse.cdt.managedbuilder.core.headlessbuild -data ${TEMP_WORKSPACE_DIR} -import /${CONFIGURATION_DIR}/${project}"
ECHO Excecuting: ${COMMAND_TO_RUN}
${COMMAND_TO_RUN}
lastRetval=$?
if [ $retval -eq 0 ]; then
retval=$lastRetval
fi
if [ $lastRetval -ne 0 ]; then
FAILED_PROJECTS="${FAILED_PROJECTS} ${project}:failed to import"
fi
ECHO "##teamcity[blockClosed name='importing ${project}']"
done
# Now build the projects
for project in ${PROJECTS_TO_BUILD}
do
ECHO "##teamcity[blockOpened name='building ${project}']"
COMMAND_TO_RUN="eclipsec --launcher.suppressErrors -nosplash -application org.eclipse.cdt.managedbuilder.core.headlessbuild -data ${TEMP_WORKSPACE_DIR} -build ${project}"
ECHO Excecuting: ${COMMAND_TO_RUN}
${COMMAND_TO_RUN}
lastRetval=$?
if [ $retval -eq 0 ]; then
retval=$lastRetval
fi
if [ $lastRetval -ne 0 ]; then
FAILED_PROJECTS="${FAILED_PROJECTS} ${project}:failed to build"
fi
ECHO "##teamcity[blockClosed name='building ${project}']"
done
rm -fRv ${TEMP_WORKSPACE_DIR}
ECHO ===================================
ECHO Return value: $retval
if [ "${FAILED_PROJECTS}" != "" ]; then
ECHO Failed projects: ${FAILED_PROJECTS}
fi
ECHO ===================================
popd > /dev/null
exit $retval
Until now we did not yet try version 18.1 of NIOS II EDS on the virtual machine with TeamCity. Some software engineers are still busy to prepare this. They try to upgrade from older Altera versions to the latest version.
The targeted Altera chip for NIOS II EDS is e.g. Cyclone IV (part number EP4CE30F23C7N) and Cyclone V (5CGXFC5C7F23C8N).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
In any case, I appreciate your answers and help. Thanks!
I expect that it has something to do with the integration between Altera tooling and DS5. Therefore I will investigate the settings on these pages:
* http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0529m/pge1399635613963.html
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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).

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page