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.

Need help running CCS command line inside of a podman container

Other Parts Discussed in Thread: CCSTUDIO, SYSCONFIG, C2000WARE, SW-TM4C

I need to build software via command line in a container to ensure that the process will remain "pure". Our build system at Oracle is naturally done from a linux OL8 server.

I was able to install CCS1210 on a OL8 system and import via command line an example project that I initially built via the CCS IDE. I then built that project using CCS via command line with no errors

~ $ cd /opt/ti/ccs1210/ccs/eclipse

/opt/ti/ccs1210/ccs/eclipse $ ./eclipse -noSplash -data ~/workspace_ccs/gpio_led_blink -application com.ti.ccstudio.apps.projectImport -ccs.location ~/workspace_ccs/gpio_led_blink_am243x-lp_r5fss0-0_nortos_ti-arm-clang

/opt/ti/ccs1210/ccs/eclipse $ ./eclipse -noSplash -data ~/workspace_ccs/gpio_led_blink -application com.ti.ccstudio.apps.projectBuild -ccs.workspace

I then tried to create a podman container to run those same three lines of code, but ran into roadblock after roadblock of thing missing, or simply hanging.  I was reminded by TI in my questions to them that they did not support OL8. So now I am trying the same thing based on a Ubuntu 22.10 image.

Again I started by creating VM, this time with Ubuntu and installing CCS on it and testing both the IDE and command line builds for the same example project before attempting to creating a podman container.  I tarballed the install directory for CCS and copied that to a fresh Ubuntu VM and extracted it.  After installing a few required packages (libc6-i386 libusb-0.1-4 libgconf-2-4 libncurses5 libpython2.7 libtinfo5) I was then able to run CCS again both with the GUI and command line.

I then created a podman container (nearly identical to Docker) where I extracted the tarball of the CCS install directory added the same package installs to the Dockerfile and tried to run the command line import and build.

Again I ran into failures of missing packages, which I have iteratively installed and retested. Now I am to a point were I am not seeing errors, but the import command hangs. Please help me to know what I need to do to get this working. My Dockerfile has gone through many steps of evolution, some of which probably didn't add to my success.

My Dockerfile:

FROM ubuntu:22.10

RUN apt -y update

RUN apt install -y libc6-i386 libusb-0.1-4 libgconf-2-4 libncurses5 libpython2.7 libtinfo5
RUN apt install -y libswt-gtk-4-jni
RUN apt install -y x xvfb
RUN apt install -y xdg-utils
RUN apt install -y slirp4netns openssh-client iputil-ping

COPY ti.ccs1210.ubuntu22_10.tar.gz .
RUN tar xafz ti.ccs1210.ubuntu22_10.tar.gz -C /
RUN rm ti.ccs1210.ubuntu22_10.tar.gz

Add build-proj.sh /

My script to do the build: /workspace_ccs/gpio_led_blink_am243x-lp_r5fss0-0_nortos_ti-arm-clang is a copy of the example project imported and built in CCS IDE.

#!/bin/bash

#echo ">>> Setup dumby graphics display for eclipse output"
Xvfb :1 -ac -screen 0 1024x768x8 & export DISPLAY=:1

echo ">>>> Remove any existing tmp project file"
rm -rf /workspace_ccs/gpio_led_blink

echo ">>>> Change to eclipe directory"
cd /opt/ti/ccs1220/ccs/eclipse

echo ">>>> Import gpio led blink project"
./eclipse -noSplash -data /workspace_ccs/gpio_led_blink --application com.ti.ccstudio.app.projectImport -cccs.location /workspace_ccs/gpio_led_blink_am243x-lp_r5fss0-0_nortos_ti-arm-clang

echo ">>>> Build gpio led blink project"
./eclipse -noSplash -data /workspace_ccs/gpio_led_blink --application com.ti.ccsstudio.app.projectBuild -ccs.workspace

Run command for the container: Instead of running the my script directly I entered the container and executed the script commands manually.  

$ podman run -ti -v workspace_ccs:/workspace_ccs:Z ubuntu22.10-ccs1210 bash
root@46d4c944984b:/# ./build-proj.sh

Output seen on the console for just the CCS project import :

root@cc196f4fa8c3:/opt/ti/ccs1220/ccs/eclipse# ./eclipse -noSplash -data /workspace_ccs/gpio_led_blink --application com.ti.c cstudio.app.projectImport -cccs.location /workspace_ccs/gpio_led_blink_am243x- lp_r5fss0-0_nortos_ti-arm-clang
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See www.slf4j.org/codes.html for further details.
SWT SessionManagerDBus: Failed to connect to org.gnome.SessionManager: Failed to execute child process ?dbus-launch? (No such file or directory)
SWT SessionManagerDBus: Failed to connect to org.xfce.SessionManager: Failed to execute child process ?dbus-launch? (No such file or directory)
SWT Webkit: Warning, You are using an old version of webkitgtk. (pre 2.4) BrowserFunction functionality will not be available
SWT WebKit: error initializing DBus server, dBusServer == 0

(Eclipse:7056): Gtk-WARNING **: 23:33:30.008: Negative content width -12 (allocation 1, extents 6x7) while allocating gadget (node separator, owner GtkSeparatorToolItem)

(Eclipse:7056): Gtk-WARNING **: 23:33:30.009: Negative content width -12 (allocation 1, extents 6x7) while allocating gadget (node separator, owner GtkSeparatorToolItem)

(Eclipse:7056): Gtk-WARNING **: 23:33:30.013: Negative content width -12 (allocation 1, extents 6x7) while allocating gadget (node separator, owner GtkSeparatorToolItem)

(Eclipse:7056): Gtk-WARNING **: 23:33:30.026: Negative content width -7 (allocation 6, extents 6x7) while allocating gadget (node separator, owner GtkSeparatorToolItem)

(Eclipse:7056): Gtk-WARNING **: 23:33:30.027: Negative content width -7 (allocation 6, extents 6x7) while allocating gadget (node separator, owner GtkSeparatorToolItem)

(Eclipse:7056): Gtk-WARNING **: 23:33:30.033: Negative content width -7 (allocation 6, extents 6x7) while allocating gadget (node separator, owner GtkSeparatorToolItem)

Warning: Nashorn engine is planned to be removed from a future JDK release
Warning: Nashorn engine is planned to be removed from a future JDK release
Warning: Nashorn engine is planned to be removed from a future JDK release
Warning: Nashorn engine is planned to be removed from a future JDK release
Warning: Nashorn engine is planned to be removed from a future JDK release
com.ti.rov: baseDir = /opt/ti/ccs1220/ccs/eclipse/plugins/com.ti.rov_1.0.0.202108240702/webcontents/, url = file:/opt/ti/ccs1220/ccs/eclipse/plugins/com.ti.rov_1.0.0.202108240702/webcontents/
com.ti.rov: globalRoots = []

CCS HTTP adapter started! [ccs.port:41117] - Open 'localhost:41117/ide' in web browser to see listing of available APIs...

^C

/workspace_ccs/gpio_led_blink/.metadata/.log after hung import was stopped:

!SESSION 2023-01-17 23:33:25.421 -----------------------------------------------
eclipse.buildId=4.23.0.I20220308-0310
java.version=11.0.13
java.vendor=Eclipse Adoptium
BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=en_US
Framework arguments: --application com.ti.c cstudio.app.projectImport -cccs.location /workspace_ccs/gpio_led_blink_am243x- lp_r5fss0-0_nortos_ti-arm-clang
Command-line arguments: -os linux -ws gtk -arch x86_64 -data /workspace_ccs/gpio_led_blink --application com.ti.c cstudio.app.projectImport -cccs.location /workspace_ccs/gpio_led_blink_am243x- lp_r5fss0-0_nortos_ti-arm-clang

!ENTRY com.ti.common.core 1 0 2023-01-17 23:33:28.973
!MESSAGE path=ccs_base/DebugServer

!ENTRY com.ti.common.core 1 0 2023-01-17 23:33:28.974
!MESSAGE debugServerDir=/opt/ti/ccs1220/ccs/ccs_base/DebugServer

!ENTRY com.ti.ccstudio.ui 1 0 2023-01-17 23:33:32.620
!MESSAGE CCS IDE session started!
CCS build: 12.2.0.00009
CCS location: /opt/ti/ccs1220/ccs
Workspace location: /workspace_ccs/gpio_led_blink

!ENTRY com.ti.ccstudio.debug.server 4 214294189 2023-01-17 23:33:32.680
!MESSAGE Unexpected CCS exit detected [1/17/23, 5:03 PM]!!!

!ENTRY com.ti.dbgtrc.webapp.CloudTraceInterface 0 0 2023-01-17 23:33:32.760
!MESSAGE constructor

!ENTRY com.ti.dbgtrc.webapp.CloudTraceInterface 0 0 2023-01-17 23:33:32.760
!MESSAGE done with directories

!ENTRY com.ti.dbgtrc.webapp.CloudTraceInterface 0 0 2023-01-17 23:33:32.761
!MESSAGE loading ti_logger

!ENTRY com.ti.dbgtrc.webapp.CloudTraceInterface 0 0 2023-01-17 23:33:32.762
!MESSAGE Platform os: linux

!ENTRY com.ti.dbgtrc.webapp.CloudTraceInterface 0 0 2023-01-17 23:33:32.762
!MESSAGE loading cTools

!ENTRY com.ti.dbgtrc.webapp.CloudTraceInterface 0 0 2023-01-17 23:33:32.764
!MESSAGE loading TraceFactory

!ENTRY com.ti.dbgtrc.webapp.CloudTraceInterface 0 0 2023-01-17 23:33:32.765
!MESSAGE loading sqlite3

!ENTRY com.ti.dbgtrc.webapp.CloudTraceInterface 0 0 2023-01-17 23:33:32.765
!MESSAGE loading CloudTrace

!ENTRY com.ti.dbgtrc.webapp.CloudTraceInterface 0 0 2023-01-17 23:33:32.771
!MESSAGE CloudTrace interface loaded

!ENTRY com.ti.ccstudio.project.ui.webcontent 1 0 2023-01-17 23:33:32.857
!MESSAGE CCS HTTP adapter started! [ccs.port:41117] - Open 'localhost:41117/ide' in web browser to see listing of available APIs...

!ENTRY org.eclipse.equinox.p2.repository 2 0 2023-01-17 23:33:33.452
!MESSAGE Using unsafe http transport to retrieve software-dl.ti.com/.../content.xml.xz, see CVE-2021-41033. Consider using https instead.

!ENTRY org.eclipse.equinox.p2.repository 2 0 2023-01-17 23:33:34.159
!MESSAGE Using unsafe http transport to retrieve software-dl.ti.com/.../content.xml.xz, see CVE-2021-41033. Consider using https instead.

!ENTRY org.eclipse.equinox.p2.repository 2 0 2023-01-17 23:33:34.971
!MESSAGE Using unsafe http transport to retrieve software-dl.ti.com/.../content.xml.xz, see CVE-2021-41033. Consider using https instead.

!ENTRY org.eclipse.equinox.p2.repository 2 0 2023-01-17 23:33:35.482
!MESSAGE Using unsafe http transport to retrieve software-dl.ti.com/.../, see CVE-2021-41033. Consider using https instead.

!ENTRY org.eclipse.equinox.p2.repository 2 0 2023-01-17 23:33:35.589
!MESSAGE Using unsafe http transport to retrieve software-dl.ti.com/.../content.xml.xz, see CVE-2021-41033. Consider using https instead.

!ENTRY org.eclipse.equinox.p2.repository 2 0 2023-01-17 23:33:36.223
!MESSAGE Using unsafe http transport to retrieve software-dl.ti.com/.../content.xml.xz, see CVE-2021-41033. Consider using https instead.

!ENTRY org.eclipse.equinox.p2.repository 2 0 2023-01-17 23:33:36.836
!MESSAGE Using unsafe http transport to retrieve software-dl.ti.com/.../content.xml.xz, see CVE-2021-41033. Consider using https instead.

!ENTRY org.eclipse.equinox.p2.repository 2 0 2023-01-17 23:33:36.981
!MESSAGE Using unsafe http transport to retrieve software-dl.ti.com/.../, see CVE-2021-41033. Consider using https instead.

!ENTRY org.eclipse.equinox.p2.repository 2 0 2023-01-17 23:33:37.682
!MESSAGE Using unsafe http transport to retrieve software-dl.ti.com/.../content.xml.xz, see CVE-2021-41033. Consider using https instead.

!ENTRY org.eclipse.equinox.p2.repository 2 0 2023-01-17 23:33:38.208
!MESSAGE Using unsafe http transport to retrieve software-dl.ti.com/.../content.xml.xz, see CVE-2021-41033. Consider using https instead.

  • Hello,

    echo ">>>> Import gpio led blink project"
    ./eclipse -noSplash -data /workspace_ccs/gpio_led_blink --application com.ti.ccstudio.app.projectImport -cccs.location /workspace_ccs/gpio_led_blink_am243x-lp_r5fss0-0_nortos_ti-arm-clang

    There are multiple typos in this command. The below is the correct command syntax:

    ./eclipse -noSplash -data /workspace_ccs/gpio_led_blink -application com.ti.ccstudio.apps.projectImport -ccs.location /workspace_ccs/gpio_led_blink_am243x-lp_r5fss0-0_nortos_ti-arm-clang

    Please try that command.

    Thanks

    ki

  • Egg on face; fixing the typos fixed the build issues as far as I can tell.  Thanks.

  • Should I be concerned about this error in the .log file?

    !SESSION 2023-01-18 19:57:45.760 -----------------------------------------------
    eclipse.buildId=4.23.0.I20220308-0310
    java.version=11.0.13
    java.vendor=Eclipse Adoptium
    BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=en_US
    Framework arguments: -application com.ti.ccstudio.apps.projectImport -ccs.location /workspace_ccs/gpio_led_blink_am243x-lp_r5fss0-0_nortos_ti-a
    rm-clang
    Command-line arguments: -os linux -ws gtk -arch x86_64 -data /workspace_ccs/gpio_led_blink -application com.ti.ccstudio.apps.projectImport -ccs.location /workspace_ccs/gpio_led_blink_am243x-lp_r5fss0-0_nortos_ti-arm-clang

    !ENTRY com.ti.common.core 1 0 2023-01-18 19:57:50.617
    !MESSAGE path=ccs_base/DebugServer

    !ENTRY com.ti.common.core 1 0 2023-01-18 19:57:50.620
    !MESSAGE debugServerDir=/opt/ti/ccs1220/ccs/ccs_base/DebugServer

    !ENTRY com.ti.ccstudio.project.core 1 0 2023-01-18 19:57:53.085
    !MESSAGE SysConfigOutputNameProvider: error invoking sysconfig-tool for project 'gpio_led_blink_am243x-lp_r5fss0-0_nortos_ti-arm-clang': Invalid argument '--product': No product with name "MCU_PLUS_SDK" and version "07.03.01" found

  • !MESSAGE SysConfigOutputNameProvider: error invoking sysconfig-tool for project 'gpio_led_blink_am243x-lp_r5fss0-0_nortos_ti-arm-clang': Invalid argument '--product': No product with name "MCU_PLUS_SDK" and version "07.03.01" found

    Looks like the project you imported is a sysconfig project that has a dependency on v07.03.01 of the SDK. I assume you are importing the project from that SDK? If so, it sounds like CCS did not "discover" it yet. 

    There is a command to have CCS look for (discover) installed SDKs:

    https://dev.ti.com/tirex/explore/node?node=A__AJpAFDF7v70N4B0-zFMXpw__ccs_devtools__FUz-xrs__LATEST

    Look for the FAQ: "Is there a command line option to specify a path for a new discoverable software product (C2000Ware, SimpleLink SDK, etc) so CCS can detect it?" in the above document.

  • WIll I need a network connection in my podman image to do that?

  • WIll I need a network connection in my podman image to do that?

    I assume the SDK is installed locally in the same environment as CCS?

  • Then what path should I use for this command?

    eclipsec -nosplash -data <workspace> -application com.ti.common.core.initialize -ccs.productDiscoveryPath "<path1>;<path2>"

    Should I be grepping for "MCU_PLUS_SDK" to figure out what path it will need?

  • I assume project "gpio_led_blink_am243x-lp_r5fss0-0_nortos_ti-arm-clang" is from the AM243x SDK so you must have the SDK installed somewhere. The root location of that SDK is the path CCS would need.

  • I have installed CCS and using the IDE imported the gpio_led_blink_am243x-lp_r5fss0-0_nortos_ti-arm-clang project.  I then built that project in the IDE.

    The project I used for my command line projectImport was the folder where the gpio_led_blink_am243x-lp_r5fss0-0_nortos_ti-arm-clang was.

  • I did not install a separate SDK.  I just downloaded CCS from https://www.ti.com/tool/download/CCSTUDIO/12.1.0 and installed it per instructions provided in the README file.

  • I have installed CCS and using the IDE imported the gpio_led_blink_am243x-lp_r5fss0-0_nortos_ti-arm-clang project

    That project comes with the SDK. I have SDK version 08.03.00.18. On my machine, that project resides in:

    C:\ti\mcu_plus_sdk_am243x_08_03_00_18\examples\drivers\gpio\gpio_led_blink\am243x-lp\r5fss0-0_nortos\ti-arm-clang

    With C:\ti\mcu_plus_sdk_am243x_08_03_00_18\ being the SDK root installation directory.

    If you did not install the SDK, where did the project you are importing comes from?

  • I imported it via the built in Project Wizard in the CCS GUI.

    I provided the name of my dev board and searched for example projects with no OS.

  • I imported it via the built in Project Wizard in the CCS GUI.

    I provided the name of my dev board and searched for example projects with no OS.

    via Resource Explorer?

  • Sorry for the comment edit.  I thought I imported the project via Resource Explorer, but after a look at the CCS IDE I realized it was via "Project Wizard".

  • but after a look at the CCS IDE I realized it was via "Project Wizard".

     

    I suspect that someone imported this project from the SDK into their workspace, which would create a project subfolder in the workspace called 'gpio_led_blink_am243x-lp_r5fss0-0_nortos_ti-arm-clang'. You likely were given this project folder to import into your CCS. Is that correct? But that 'gpio_led_blink_am243x-lp_r5fss0-0_nortos_ti-arm-clang' folder was created by someone importing the projectspec for it from the actual SDK.

  • You are passing in:

    -ccs.location /workspace_ccs/gpio_led_blink_am243x-lp_r5fss0-0_nortos_ti-arm-clang

    Where did this path "/workspace_ccs/gpio_led_blink_am243x-lp_r5fss0-0_nortos_ti-arm-clang" come from? How was it generated?

  • There was no "someone" else.  I imported the project via "Project Wizard" in the CCS IDE.  When I started CCS IDE I was asked for a workspace folder which I specified as workspace_ccs.  So CCS created and populated the /workspace_ccs/gpio_led_blink_am243x-lp_r5fss0-0_nortos_ti-arm-clang folder.

  • In any case, the project you imported has a dependency on the AM243x MCU+ SDK v7.03.01.

    Downloads for the SDK are available at: https://www.ti.com/tool/MCU-PLUS-SDK-AM243X

    However, the oldest version I see available is 8.00.00.21. I'm not sure where you can get older versions. I suggest starting a new thread for that in the Processors forum.

    Thanks

    ki

  • That worked thanks.  Can you also share with me the link to the TM4C SDK?

  • Can I specify the discovery path with wildcards? Or should/must I specify each path?

    ./eclipse -nosplash -data <workspace> -application com.ti.common.core.initialize -ccs.productDiscoveryPath "opt/ti/mcu*"

  • New problem the https://www.ti.com/tool/SW-TM4C ink does not take me to a linux SDK for install but instead to a bunch of .exe files that I don't know how to ingest.  I am also not sure which of those files I should be using for my TM4C129 ENCPDT part.  There are three TM4C129 parts listed (TM4C1294XL, TM4C129EXL and TM4C129X).  My guess is the TM4C129X, but I still need to know if this works for Linux install of CCS12.

  • Can I specify the discovery path with wildcards? Or should/must I specify each path?

    Sorry you must specify each path

  • My guess is the TM4C129X, but I still need to know if this works for Linux install of CCS12.

    It's likely that TivaWare is not supported on Linux. If you have any further questions on it, please start a new thread in the ARM based MCU forum for the Tiva experts.

  • Thanks.

  • New problem the https://www.ti.com/tool/SW-TM4C ink does not take me to a linux SDK for install but instead to a bunch of .exe files that I don't know how to ingest.  I am also not sure which of those files I should be using for my TM4C129 ENCPDT part.

    Under Ubuntu 18.04.6 LTS file reports the following for the SW-TM4C-2.2.0.295.exe downloaded executable for "SW-TM4C — TivaWare for C Series Software (Complete)":

    $ file SW-TM4C-2.2.0.295.exe 
    SW-TM4C-2.2.0.295.exe: PE32 executable (GUI) Intel 80386 (stripped to external PDB), for MS Windows, UPX compressed

    The unzip command under Ubuntu is able to extract the archived files within SW-TM4C-2.2.0.295.exe

  • I downloaded the file and extracted it, but I see no readme file to tell me anything about install or where to put this.  Is this as simple as extracting this to a "SW-TM4C-2.2.0.295" folder in the install directory for TI, in my case "/opt/ti"?

    This also looks like it is intended for a MS Windows system not a Linux Ubuntu system, which is what I am running on.

  • Mark,

    It is best to start a new thread  in the ARM based MCU forum for the Tiva experts to comment.

    Thanks

    ki

  • Okay, thanks.