CCS not detecting installed compiler tools in Windows Docker container for CI build
Hello all
BACKGROUND: I'm trying to set up a CI build for a CC2640 processor using a Windows Docker container. I need to use Windows and not Linux because the BLE SDK for CC2640 only supports windows development (ugh)
So far I have a Docker container built and working with CCS and the various SDKs and libs that we need:
CCS (i've tried 11.2.0.00007 and the latest 12.4.0.00007)
CC2640 BLE SDK 2.01.00.44423
SimpleLink TIRTOS 2.13.00.06
Compiler: TI CGT TMS470 16.9.3LTS (also tried latest version 16.9.11 LTS)
The install of all of these tools is successful and working.
PROBLEM:
When I go to build my code in the Docker container, the CGT TMS470 compiler is not found by CCS.
I'm following this documentation for using CCS on the command line software-dl.ti.com/.../ccs_projects-command-line.html
The other SDK packages are found and included just fine with this command
eclipsec.exe -noSplash -data C:\\workspace1 -application com.ti.common.core.initialize -rtsc.productDiscoveryPath c:\ti\tirtos_simplelink_2_13_00_06
eclipsec.exe -noSplash -data C:\\workspace1 -application com.ti.common.core.initialize -rtsc.productDiscoveryPath c:\ti\xdctools_3_31_01_33_core
C:\ti\ccs1240\ccs\eclipse>eclipsec.exe -noSplash -data C:\\workspace1 -application com.ti.common.core.initialize -rtsc.productDiscoveryPath c:\ti\tirtos_simplelink_2_13_00_06 SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder". SLF4J: Defaulting to no-operation (NOP) logger implementation SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details. Searching for deleted extension-sites to uninstall: Finished! Searching for new extension-sites to install: Discovered new extension-site: c:\ti\tirtos_simplelink_2_13_00_06 Installing new extension-sites... done! Finished! C:\ti\ccs1240\ccs\eclipse>eclipsec.exe -noSplash -data C:\\workspace1 -application com.ti.common.core.initialize -rtsc.productDiscoveryPath c:\ti\xdctools_3_31_01_33_core SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder". SLF4J: Defaulting to no-operation (NOP) logger implementation SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details. Searching for deleted extension-sites to uninstall: Finished! Searching for new extension-sites to install: Discovered new extension-site: c:\ti\xdctools_3_31_01_33_core Installing new extension-sites... done! Finished! C:\ti\ccs1240\ccs\eclipse>
However the CCS compiler search fails
eclipsec -nosplash -data C:\\workspace1 -application com.ti.common.core.initialize -ccs.toolDiscoveryPath C:\ti\ccs1240\ccs\tools\compiler\ti-cgt-arm_16.9.11.LTS
Here is the compiler dir, I run the commands from CMD instead of powershell as powershell hs issues with CCS.
PS C:\ti\ccs1240\ccs\eclipse> dir ..\tools\compiler\ Directory: C:\ti\ccs1240\ccs\tools\compiler Mode LastWriteTime Length Name ---- ------------- ------ ---- d----- 9/28/2023 3:59 PM ti-cgt-arm_16.9.11.LTS d----- 9/28/2023 3:58 PM ti-cgt-arm_16.9.3.LTS
C:\ti\ccs1240\ccs\eclipse>eclipsec -nosplash -data C:\\workspace1 -application com.ti.common.core.initialize -ccs.toolDiscoveryPath C:\ti\ccs1240\ccs\tools\compiler\ti-cgt-arm_16.9.11.LTS SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder". SLF4J: Defaulting to no-operation (NOP) logger implementation SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details. Searching for deleted extension-sites to uninstall: Finished! Searching for new extension-sites to install: Finished! C:\ti\ccs1240\ccs\eclipse>
When I run:
eclipsec.exe -verbose -noSplash -data C:\\workspace1 -application com.ti.ccstudio.apps.inspect -ccs.product
I don't see the compiler but I see the packages installed.
C:\ti\ccs1240\ccs\eclipse>eclipsec.exe -verbose -noSplash -data C:\\workspace1 -application com.ti.ccstudio.apps.inspect -ccs.product SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder". SLF4J: Defaulting to no-operation (NOP) logger implementation SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details. Product location: C:/ti/ccs1240/ccs Compilers: Products: sysconfig [SysConfig]: 1.17.0 [C:/ti/ccs1240/ccs/utils/sysconfig_1.17.0] com.ti.rtsc.TIRTOSsimplelink [TI-RTOS for SimpleLink Wireless MCUs]: 2.13.0.06 [c:/ti/tirtos_simplelink_2_13_00_06] com.ti.rtsc.XDCtools [XDCtools]: 3.62.1.16_core [C:/ti/ccs1240/xdctools_3_62_01_16_core] 3.31.1.33_core [C:/ti/xdctools_3_31_01_33_core] C:\ti\ccs1240\ccs\eclipse>
Now I searched around and after I run the compiler search command I see this file
c:\ti\ccs1240\ccs\eclipse\configuration\com.ti.common.project.core>type compilerProperties.cache.log
Total tool discovery time: 203 ms Discovered a total of 2 tools: C:\ti\ccs1240\ccs\tools\compiler\ti-cgt-arm_16.9.11.LTS : 16.9.11.LTS C:\ti\ccs1240\ccs\tools\compiler\ti-cgt-arm_16.9.3.LTS : 16.9.3.LTS C:\ti\ccs1240\ccs\eclipse\configuration\com.ti.common.project.core>
and the cache file shows it too, so I see that CCS is detecting the compiler and just not installing them.
c:\ti\ccs1240\ccs\eclipse\configuration\com.ti.common.project.core>type compilerProperties.cache
cacheFileNamet ↕Ljava/lang/String;L ♣indext ☼Ljava/util/Map;xpt ↑compilerProperties.cachesr ↨java.util.LinkedHashMap4�N\►l��☻ ☺Z ♂accessOrderxr ◄java.util.HashMap♣���▬`�♥ ☻F ��♥ ☺L ♦pathq ~ ☺xpt 7C:\ti\ccs1240\ccs\tools\compiler\ti-cgt-arm_16.9.11.LTSw☻ \xsr 9com.ti.common.project.core.tools.AToolType$ToolProperties ☺☻ ♥L propertiesq ~ ☻L ◄toolTypeClassNameq ~ ☺L versionq ~ ☺xpsq ~ ♣?@ ♀ ► ☺t toolFamilyt ♥Armx t *com.ti.ccstudio.buildmodel.CodegenToolTypet ♂16.9.11.LTSsq ~t 6C:\ti\ccs1240\ccs\tools\compiler\ti-cgt-arm_16.9.3.LTSw☻ \xsq ~ ♂sq ~ ♣?@ ♀ ► ☺q ~ ♫q ~ ☼x q ~ ►t 16.9.3.LTSx
Interestingly enough this does work when I run this on my local machine that I've been doing development with in the CCS UI, and the compiler gets installed. But this commandline compiler stuff doesn't work in the docker system.
My Dockerfile to setup the system looks liek this
#Dockerfile # Full windows base image. FROM mcr.microsoft.com/windows:ltsc2019 # Metadata indicating an image maintainer. LABEL maintainer="xxx" SHELL ["cmd", "/S", "/C"] RUN "mkdir work" ADD CCS12.4.0.00007_win64.zip 'c:/work' ADD ble_cc26xx_setupwin32_2_01_00_44423.exe 'c:/work' ADD ble_sdk_install.bat 'c:/work' ADD tirtos_simplelink_setupwin32_2_13_00_06.exe 'c:/work' ADD ti_cgt_tms470_16.9.3.LTS_windows_installer.exe 'c:/work' ADD ti_cgt_tms470_16.9.11.LTS_windows_installer.exe 'c:/work' ADD python-3.11.5-amd64.exe 'c:/work' ADD fw.tar 'c:/work' RUN ["powershell.exe", "Expand-Archive -LiteralPath 'C:/work/CCS12.4.0.00007_win64.zip' -DestinationPath 'c:/work'"] RUN ["powershell.exe", "Start-Process -FilePath 'ccs_setup_12.4.0.00007.exe' -ArgumentList '--mode unattended --disable-components PF_MSP430,PF_MSP432' -WorkingDirectory 'work/CCS12.4.0.00007_win64' -Wait"] WORKDIR /work RUN tirtos_simplelink_setupwin32_2_13_00_06.exe --mode unattended RUN ti_cgt_tms470_16.9.3.LTS_windows_installer.exe --mode unattended --prefix C:\ti\ccs1240\ccs\tools\compiler RUN ti_cgt_tms470_16.9.11.LTS_windows_installer.exe --mode unattended --prefix C:\ti\ccs1240\ccs\tools\compiler RUN python-3.11.5-amd64.exe /quiet RUN ble_sdk_install.bat CMD ["powershell.exe", "-NoLogo", "-ExecutionPolicy", "Bypass"]