This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Tool/software: Code Composer Studio
I am trying to build a Code Composer studio in Jenkins. I have the build server setup correctly and can login and build the code from the following build script:
#!/bin/bash CCS=/opt/ti/ccs910/ccs/eclipse/eclipse #CCS=/home/builduser/ti/ccs910/ccs/eclipse/eclipse WS=. strings=( libmbedcrypto_CC1352R1_LAUNCHXL_tirtos_gcc libopenthread_diag_ncp_CC1352R1_LAUNCHXL_tirtos_gcc libopenthread_ncp_CC1352R1_LAUNCHXL_tirtos_gcc libopenthread_ncp_ncp_CC1352R1_LAUNCHXL_tirtos_gcc libopenthread_platform_utils_ncp_CC1352R1_LAUNCHXL_tirtos_gcc ncp_ftd_GRIM ) if [ -d .metadata ] then rm -rf .metadata fi for i in "${strings[@]}"; do echo Importing $i $CCS -noSplash -data $WS -application com.ti.ccstudio.apps.projectImport -ccs.location $i done $CCS -noSplash -data $WS -application com.ti.ccstudio.apps.projectBuild -ccs.workspace -ccs.buildType full
This will create the CCS workspace, add the projects, clean and build the project. But when Jenkins runs this script I get the following error message:
[EnvInject] - Loading node environment variables. Building in workspace /var/lib/jenkins/workspace/cc1352p_thread [WS-CLEANUP] Deleting project workspace... [WS-CLEANUP] Done Cloning the remote Git repository Cloning repository ssh://git@bitbucket:7999/ar2/cc1352p_thread.git > git init /var/lib/jenkins/workspace/cc1352p_thread # timeout=10 Fetching upstream changes from ssh://git@bitbucket:7999/ar2/cc1352p_thread.git > git --version # timeout=10 using GIT_ASKPASS to set credentials > git fetch --tags --progress ssh://git@bitbucket:7999/ar2/cc1352p_thread.git +refs/heads/*:refs/remotes/origin/* > git config remote.origin.url ssh://git@bitbucket:7999/ar2/cc1352p_thread.git # timeout=10 > git config --add remote.origin.fetch +refs/heads/*:refs/remotes/origin/* # timeout=10 > git config remote.origin.url ssh://git@bitbucket:7999/ar2/cc1352p_thread.git # timeout=10 Fetching upstream changes from ssh://git@bitbucket:7999/ar2/cc1352p_thread.git using GIT_ASKPASS to set credentials > git fetch --tags --progress ssh://git@bitbucket:7999/ar2/cc1352p_thread.git +refs/heads/*:refs/remotes/origin/* > git rev-parse refs/remotes/origin/master^{commit} # timeout=10 > git rev-parse refs/remotes/origin/origin/master^{commit} # timeout=10 Checking out Revision d16f0b14bf0740697c34e8e68128af8f4f9f0dd2 (refs/remotes/origin/master) > git config core.sparsecheckout # timeout=10 > git checkout -f d16f0b14bf0740697c34e8e68128af8f4f9f0dd2 > git rev-list 2965f0e4f6ea83f801d18c497628a0302ecd151e # timeout=10 [cc1352p_thread] $ /bin/sh -xe /tmp/jenkins682198274838958152.sh + ./generate_build.sh Importing libmbedcrypto_CC1352R1_LAUNCHXL_tirtos_gcc -------------------------------------------------------------------------------- Importing project from '/var/lib/jenkins/workspace/cc1352p_thread/libmbedcrypto_CC1352R1_LAUNCHXL_tirtos_gcc'... Done! Importing libopenthread_diag_ncp_CC1352R1_LAUNCHXL_tirtos_gcc -------------------------------------------------------------------------------- Importing project from '/var/lib/jenkins/workspace/cc1352p_thread/libopenthread_diag_ncp_CC1352R1_LAUNCHXL_tirtos_gcc'... Done! Importing libopenthread_ncp_CC1352R1_LAUNCHXL_tirtos_gcc -------------------------------------------------------------------------------- Importing project from '/var/lib/jenkins/workspace/cc1352p_thread/libopenthread_ncp_CC1352R1_LAUNCHXL_tirtos_gcc'... Done! Importing libopenthread_ncp_ncp_CC1352R1_LAUNCHXL_tirtos_gcc -------------------------------------------------------------------------------- Importing project from '/var/lib/jenkins/workspace/cc1352p_thread/libopenthread_ncp_ncp_CC1352R1_LAUNCHXL_tirtos_gcc'... Done! Importing libopenthread_platform_utils_ncp_CC1352R1_LAUNCHXL_tirtos_gcc -------------------------------------------------------------------------------- Importing project from '/var/lib/jenkins/workspace/cc1352p_thread/libopenthread_platform_utils_ncp_CC1352R1_LAUNCHXL_tirtos_gcc'... Done! Importing ncp_ftd_GRIM -------------------------------------------------------------------------------- Importing project from '/var/lib/jenkins/workspace/cc1352p_thread/ncp_ftd_GRIM'... Done! %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% CCS headless build starting... [Fri Aug 30 08:50:01 CDT 2019] %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ================================================================================ Pre processing... ================================================================================ Building... Buildfile generation error occurred.. Product 'com.ti.SIMPLELINK_CC13X2_26X2_SDK' v3.20.0.68 is not currently installed and no compatible version is available. Please install this product or a compatible version. Build stopped.. Buildfile generation error occurred.. Product 'com.ti.SIMPLELINK_CC13X2_26X2_SDK' v3.20.0.68 is not currently installed and no compatible version is available. Please install this product or a compatible version. Build stopped.. Buildfile generation error occurred.. Product 'com.ti.SIMPLELINK_CC13X2_26X2_SDK' v3.20.0.68 is not currently installed and no compatible version is available. Please install this product or a compatible version. Build stopped.. Buildfile generation error occurred.. Product 'com.ti.SIMPLELINK_CC13X2_26X2_SDK' v3.20.0.68 is not currently installed and no compatible version is available. Please install this product or a compatible version. Build stopped.. Buildfile generation error occurred.. Product 'com.ti.SIMPLELINK_CC13X2_26X2_SDK' v3.20.0.68 is not currently installed and no compatible version is available. Please install this product or a compatible version. Build stopped.. Buildfile generation error occurred.. Product 'com.ti.SIMPLELINK_CC13X2_26X2_SDK' v3.20.0.68 is not currently installed and no compatible version is available. Please install this product or a compatible version. Build stopped.. ================================================================================ CCS headless build complete! 6 out of 6 projects have errors. Build step 'Execute shell' marked build as failure [BFA] Scanning build for known causes... [BFA] No failure causes found [BFA] Done. 0s Finished: FAILURE
Why can't the Jenkins user find the SDK, but when I login as a user of the machine it can find the SDK?
Hi Nick,
The SDK needs to be "discovered" by the CCS install. The discovery usually happens when CCS is launched once by the user. If the user launching CCS has write permissions inside the CCS folder, then the discovery information is written inside the CCS install folder. If the user does not have write permissions, then the information will be written to the user's home folder. If the latter is the case, then if some other user logs in to use CCS, the SDK will not have yet been discovered since that information last time was written to the last user's home directory.
I suspect this is the scenario that is happening here. For the user account running jenkins, make sure CCS has been "discovered" first.
Thanks
ki
That makes sense. The problem is the Jenkins user is not a standard user account. There is no way to login to the machine with the username Jenkins and therefore get CCS to discover the SDK. Is there another way to inform CCS on the location of the SDK? Perhaps an environment variable?
Does your user account have write permissions to that CCS install folder?
The directory was not writable:
drwxr-xr-x 8 root root 4096 Aug 30 08:47 ti/
I went through and made everything read/write/executable, but it still fails to find the SDK.
TI, you guys need to make this work in a much smoother manor. I can't believe I'm the only one to wants to build code on a Build Server. Here are the steps I needed to follow to get this to work:
1) sudo passwd jenkins
Create a password for Jenkins so you can log into the machine.
2) log off machine
3) Log back on with the Jenkins acount.
4) Install CCS and Simple Link SDK as sudo and install into /opt
5) sudo chmod -R 777 /opt/ti
This is required because CCS writes data back into this directory.
6) Run /opt/ti/ccsxxx/ccs/eclipse/eclipse
7) Be default, on Linux CCS doesn't search the correct path. Go Window->Preferences, then Code Composer Studio->Products, click add and add /opt/ti to the search path. Click Apply and close and it will discover the Simplelink SDK.
8) Clean and re-build your project and it "should" work.