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.

MCU-PLUS-SDK-AM243X: AM243x

Part Number: MCU-PLUS-SDK-AM243X
Other Parts Discussed in Thread: CCSTUDIO, SYSCONFIG

I am trying to build our project with CCS12.5 inside of a docker container.  I have done this in the past when we were using only one SDK, but now I need to use two different SDK depending on the project.

I have installed both SDK on a Ubuntu 22.04LTS system and from the command line I can build all of my projects; some with one SDK version and the others with the other other SDK version with no problem, but when I run inside of a docker container only one of the two SDK are found.  The docker container is also Ubuntu 22.04LTS.

To create the docker I have taken the entire install directory for CCS starting at /home/markwar/ti and put it in the docker.  The two SDKs I am using are:

* mcu_plus_sdk_am243x_08_05_00_24

* mcu_plus_sdk_am243x_09_00_00_35

The project that builds with the first of the two SDK is found and builds fine, but the project that requires the second is not found in the docker run.

Can I use the -ccs.toolDiscoveryPath "/ti/;/ti/mcu_plus_sdk_am243x_08_05_00_24;/ti/mcu_plus_sdk_am243x_09_00_00_35" option to solve this problem or is there a better way to do this?

One of the reasons that I ask this question before I have the results from trying this is I don't know what path(s) to use and it takes a long time to build my docker and get results from out automated testing system.

  • Adding ` -ccs.toolDiscoveryPath "/ti/;/ti/mcu_plus_sdk_am243x_08_05_00_24;/ti/mcu_plus_sdk_am243x_09_00_00_35" ` to my command line for the build operation did not work.

    This is my bash script that is used to build inside of my docker container:

    #!/bin/bash
    #
    # Build the CCS project in /proj

    # Remove old /workspace_ccs to start a fresh build
    rm -rf /workspace_ccs

    # Point CCS to AM243 SDK
    /ti/ccs1250/ccs/eclipse/eclipse -noSplash -data /workspace_ccs -application com.ti.common.core.initialize

    # Import project to /workspace_ccs folder before build
    /ti/ccs1250/ccs/eclipse/eclipse -noSplash -data /workspace_ccs -application com.ti.ccstudio.apps.projectImport \

    -ccs.location /proj
    # Build project
    /ti/ccs1250/ccs/eclipse/eclipse -noSplash -data /workspace_ccs -application com.ti.ccstudio.apps.projectBuild \

    -ccs.workspace -ccs.configuration Debug -ccs.buildType full \
    -ccs.toolDiscoveryPath "/ti/;/ti/mcu_plus_sdk_am243x_08_05_00_24;/ti/mcu_plus_sdk_am243x_09_00_00_35"

    This is the error I get:

    Buildfile generation error occurred..
    Product com.ti.MCU_PLUS_SDK_AM243X v9.0.0.35 is not currently installed and no compatible version is available. Please install this product or a compatible version.
    Build stopped..
  • PLEASE HELP.

    The MCU_PLUS_SDK_AM243X v9.0.0.35 is installed for the IDE but when I try and run via command line in a docker, I get the error message above that the SDK can't be found.  How do I let the command line know that this SDK is available?

    The -ccs.productDiscoveryPath does not work. I found a note that -ccs.toolDiscoveryPath would help, but still gets same error.  I also tried the older approach of `export MCU_PLUS_SDK_AM243X_PATH=/ti/mcu_plus_sdk_am243x_09_00_00_35/` also doesn't work.

  • Hi Mark,

    Have you made sure that the SDK paths are discoverable from inside the docker container? As in, once you do the docker build you will have an image from which you can instantiate a container in docker run. If you do a "docker run -i <image name>" you will get an SSH-ish shell into the container. In that initially check if both the SDKs exist from inside the container and check if there are any permissions issues for both the folders. I am not sure if you're doing a bind mount of the SDKs or adding them to the image itself. Either way, if you're able to find both paths, you shouldn't be seeing the issue particularly for one SDK. Regarding the ccs.toolDiscoveryPath, let me check with the CCS team and get back in 2 days if there is a different format or something to be used.

    Regards,
    Anand Mahadevan SS

  • * Have you made sure that the SDK paths are discoverable from inside the docker container?

    Not sure what you mean by this.  The folder is in the docker and in the expected location.  I have also tried the -ccs.toolDiscoveryPath option to point at the new SDK (which isn't required for the build in the VM).

    * In that initially check if both the SDKs exist from inside the container and check if there are any permissions issues for both the folders.

    I can clearly see that the SDKs (both) are installed in the VM and docker in the expected folders.  The permissions and ownership of both folders is exactly the same.

  • Hi Mark,

    Thank you for the details. If possible can you share the Dockerfile and the bind mount list you're using while starting the container? I can try to replicate this at my end and see what could be the issue.

    Regards,
    Anand Mahadevan SS

  • Docker file (the docker name is: ubuntu22.04-ccs12.5-am243x8.5-9.0-tm4c3.0.0)

    FROM ohdho-dev-docker-local.artifactory.oci.oraclecorp.com/ubuntu22.04-plus-20231117

    ARG USER
    ARG PASS

    RUN curl -u$USER:$PASS -O "">artifactory.oci.oraclecorp.com/.../ti.ccs12.5-am243x8.5.0.24-9.0.0.35-tm4c3.0.0.tar.gz" \
    --output ti.ccs12.5-am243x8.5.0.24-9.0.0.35-tm4c3.0.0.tar.gz
    RUN tar xafz ti.ccs12.5-am243x8.5.0.24-9.0.0.35-tm4c3.0.0.tar.gz -C /
    RUN rm ti.ccs12.5-am243x8.5.0.24-9.0.0.35-tm4c3.0.0.tar.gz

    ENV TI_PRODUCTS_DIR__TIREX /ti
    ENV TI_ARM_C_DIR=$TI_PRODUCTS_DIR__TIREX/ccs1250/ccs/tools/compiler/ti-cgt-arm_20.2.7.LTS/include

    Add build-proj.sh /

    ti.ccs12.5-am243x8.5.0.24-9.0.0.35-tm4c3.0.0.tar.gz is a tarball of the ti/ install folder that works for the VM
    ohdho-dev-docker-local.artifactory.oci.oraclecorp.com/ubuntu22.04-plus-20231117 is a modified base docker that includes some installed packages
    It's Docker file looks like this

    FROM ubuntu:22.04
    ARG MYPROXY=www-proxy-hqdc.us.oracle.com:80
    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 xvfb
    RUN apt install -y xdg-utils
    RUN apt install -y curl

    And the build-prog.sh file

    #!/bin/bash
    #
    # Build the CCS project in /proj

    ls -la /ti
    # Remove old /workspace_ccs to start a fresh build
    rm -rf /workspace_ccs
    # Point CCS to AM243 SDK
    /ti/ccs1250/ccs/eclipse/eclipse -noSplash -data /workspace_ccs -application com.ti.common.core.initialize
    # Import project to /workspace_ccs folder before build
    /ti/ccs1250/ccs/eclipse/eclipse -noSplash -data /workspace_ccs -application com.ti.ccstudio.apps.projectImport \
    -ccs.location /proj
    # Build project
    /ti/ccs1250/ccs/eclipse/eclipse -noSplash -data /workspace_ccs -application com.ti.ccstudio.apps.projectBuild \
    -ccs.workspace -ccs.configuration Debug -ccs.buildType full

    This docker is executed like this, where WORKSPACE and project_dir are use to identify the specific project we want to build.

    podman run -i --rm -v ${WORKSPACE}/firmware/projects/${project_dir}:/proj:Z \
    ubuntu22.04-ccs12.5-am243x8.5-9.0-tm4c3.0.0 /build-proj.sh

    This is what it looks like when I run from inside the container:

    11:14:54 $  podman run -ti --rm -v /home/markwar/workspaces/ti/firmware/projects/kitchen_sink_am243:/proj:Z ubuntu22.04-ccs12.5-am243x8.5-9.0-tm4c3.0.0 bash
    root@7ef802b0bdc7:/# ./build-proj.sh 
    total 48
    drwxrwxr-x. 12 1000 1000 4096 Nov 16 19:05 .
    dr-xr-xr-x. 19 root root 4096 Dec  1 17:15 ..
    drwxrwxrwx.  2 1000 1000 4096 Nov 14 22:59 CCSExternalReferences
    drwxrwxr-x.  2 1000 1000 4096 Apr  5  2023 CCSTargetConfigurations
    drwxrwx---.  4 1000 1000 4096 Apr 12  2023 TivaWare_C_Series-2.1.4.178
    drwxrwxr-x.  4 1000 1000 4096 Nov 14 23:00 ccs1250
    drwxrwxr-x.  8 1000 1000 4096 Apr  3  2023 mcu_plus_sdk_am243x_08_05_00_24
    drwxr-xr-x.  8 1000 1000 4096 Nov 15 16:29 mcu_plus_sdk_am243x_09_00_00_35
    drwxrwxr-x.  8 1000 1000 4096 Nov 15 19:13 sysconfig_1.14.0
    drwxrwxr-x.  8 1000 1000 4096 Nov 15 19:14 sysconfig_1.17.0
    drwxrwxrwx.  5 1000 1000 4096 Nov 15 19:02 tirex-localserver-3.7.1
    drwxrwxrwx.  2 1000 1000 4096 Nov 15 19:02 zips
    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:
    	Found deleted extension-site: /home/pi/ti/ccs1250/xdctools_3_62_01_16_core
    	Uninstalling deleted extension-sites... done!
    	Finished!
    
    Searching for new extension-sites to install:
    	Discovered new extension-site: /ti/ccs1250/xdctools_3_62_01_16_core
    	Installing new extension-sites... done!
    	Finished!
    
    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.
    
    --------------------------------------------------------------------------------
    Importing project from '/proj'...
    
    
    Done!
    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.
    
    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    CCS headless build starting... [Fri Dec 01 17:15:36 GMT 2023] 
    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    
    ================================================================================
    Pre processing...
    
    
    ================================================================================
    Building...
    
    
    **** Clean-only build of configuration Debug for project kitchen_sink_am243 ****
    
    /ti/ccs1250/ccs/utils/bin/gmake -k -j 8 clean -O 
     
    rm -rf  "syscfg/error.h"  "kitchen_sink_am243.out" 
    rm -rf "HwiP_armv7r_vectors_nortos_asm.d" 
    rm -rf "HwiP_armv7r_vectors_nortos_asm.o" "aic_isolation.o" "aic_isolation_test.o" "atecc.o" "atecc_test.o" "bootflash.o" "bootflash_am243x.o" "bootflash_test.o" "clock_am243.o" "cmd_line.o" "cmd_line_test.o" "eeprom_am243x.o" "eeprom_util.o" "fault_handler_am243.o" "fault_handler_test.o" "flash.o" "flash_test.o" "fpga_i2c.o" "fpga_i2c_test.o" "gpio.o" "gpio_am243.o" "hardening_vector.o" "hardening_vector_test.o" "i2c_am243.o" "io_expander.o" "io_expander_test.o" "isolation.o" "isolation_test.o" "jtag.o" "jtag_test.o" "led.o" "main.o" "mb_prom.o" "mb_prom_test.o" "measure.o" "measure_test.o" "metrics.o" "metrics_test.o" "nonce.o" "persist.o" "persist_test.o" "platform.o" "platform_test.o" "power_control.o" "power_control_test.o" "region.o" "region_test.o" "reset_am243.o" "rot_error.o" "sha256_cmds.o" "sha256_openssl.o" "sp_log_test.o" "spi_memory_am243x.o" "spi_memory_test.o" "spi_xfer_am243x.o" "sspi_write_sector_test.o" "str_util.o" "tick_am243.o" "tick_test_am243.o" "uart_buf.o" "uart_buf_am243x.o" 
    rm -rf "update_rtm_am243x.o" "update_rtm_test.o" "watchdog_am243x.o" "wipe.o" "wipe_test.o" 
    rm -rf "aic_isolation.d" "aic_isolation_test.d" "atecc.d" "atecc_test.d" "bootflash.d" "bootflash_am243x.d" "bootflash_test.d" "clock_am243.d" "cmd_line.d" "cmd_line_test.d" "eeprom_am243x.d" "eeprom_util.d" "fault_handler_am243.d" "fault_handler_test.d" "flash.d" "flash_test.d" "fpga_i2c.d" "fpga_i2c_test.d" "gpio.d" "gpio_am243.d" "hardening_vector.d" "hardening_vector_test.d" "i2c_am243.d" "io_expander.d" "io_expander_test.d" "isolation.d" "isolation_test.d" "jtag.d" "jtag_test.d" "led.d" "main.d" "mb_prom.d" "mb_prom_test.d" "measure.d" "measure_test.d" "metrics.d" "metrics_test.d" "nonce.d" "persist.d" "persist_test.d" "platform.d" "platform_test.d" "power_control.d" "power_control_test.d" "region.d" "region_test.d" "reset_am243.d" "rot_error.d" "sha256_cmds.d" "sha256_openssl.d" "sp_log_test.d" "spi_memory_am243x.d" "spi_memory_test.d" "spi_xfer_am243x.d" "sspi_write_sector_test.d" "str_util.d" "tick_am243.d" "tick_test_am243.d" "uart_buf.d" "uart_buf_am243x.d" "update_rtm_am243x.d" "update_rtm_test.d" 
    rm -rf "watchdog_am243x.d" "wipe.d" "wipe_test.d" 
    rm -rf  "syscfg/" 
    Finished clean
     
    
    **** Build Finished ****
    Buildfile generation error occurred..
    Product com.ti.MCU_PLUS_SDK_AM243X v9.0.0.35 is not currently installed and no compatible version is available. Please install this product or a compatible version.
    Build stopped..
    
    
    ================================================================================
    CCS headless build complete! 1 out of 1 projects have errors.
    root@7ef802b0bdc7:/cd ti
    root@7ef802b0bdc7:/ti# ls -la
    total 48
    drwxrwxr-x. 12 1000 1000 4096 Dec 1 17:15 .
    dr-xr-xr-x. 20 root root 4096 Dec 1 17:15 ..
    drwxrwxrwx. 2 1000 1000 4096 Nov 14 22:59 CCSExternalReferences
    drwxrwxr-x. 2 1000 1000 4096 Apr 5 2023 CCSTargetConfigurations
    drwxrwx---. 4 1000 1000 4096 Apr 12 2023 TivaWare_C_Series-2.1.4.178
    drwxrwxr-x. 4 1000 1000 4096 Dec 1 17:15 ccs1250
    drwxrwxr-x. 8 1000 1000 4096 Apr 3 2023 mcu_plus_sdk_am243x_08_05_00_24
    drwxr-xr-x. 8 1000 1000 4096 Nov 15 16:29 mcu_plus_sdk_am243x_09_00_00_35
    drwxrwxr-x. 8 1000 1000 4096 Nov 15 19:13 sysconfig_1.14.0
    drwxrwxr-x. 8 1000 1000 4096 Nov 15 19:14 sysconfig_1.17.0
    drwxrwxrwx. 5 1000 1000 4096 Nov 15 19:02 tirex-localserver-3.7.1
    drwxrwxrwx. 2 1000 1000 4096 Nov 15 19:02 zips
    root@7ef802b0bdc7:/ti# 
  • In the VM that works I did a `printenv | grep ti` and didn't find anything in the environment variables.  I then compared that to what I found in the docker container and they were the same.

  • I also looked in my working VM using CCS IDE at the project Properties->General->Products tab and the details for "MCU+ SDK for AM243x [9.0.0.35]" and found this:

    MCU+ SDK for AM243x v9.0.0.35

    Install location: /home/pi/ti/mcu_plus_sdk_am243x_09_00_00_35
    Product-type ID: com.ti.MCU_PLUS_SDK_AM243X
    Dependencies:
    sysconfig:1.17.0 [/home/pi/ti/sysconfig_1.17.0]
    ti_cgt_tiarmclang:2.1.3 [not installed]


    *** Declared Variables

    Root directory: COM_TI_MCU_PLUS_SDK_AM243X_INSTALL_DIR
    Exported locations: <none>


    *** File-system Layout

    RTSC repositories:
    /home/pi/ti/mcu_plus_sdk_am243x_09_00_00_35/source
    /home/pi/ti/mcu_plus_sdk_am243x_09_00_00_35

    Documents locations: <none>
    Resource locations: <none>
    Tool locations: <none>


    *** Build-time Contributions

    Compiler include-path: <none>
    Compiler symbols: <none>
    Linker library-path: <none>
    Linker libraries: <none>
    SysConfig manifest: /home/pi/ti/mcu_plus_sdk_am243x_09_00_00_35/.metadata/product.json

    /home/pi/ti/mcu_plus_sdk_am243x_09_00_00_35 is not exactly were the SDK is within the docker so I tried setting up a symbolic link for this and that didn't help either.

    root@c718e1caa17e:/home/pi/ti# ln -s /ti/mcu_plus_sdk_am243x_09_00_00_35 mcu_plus_sdk_am243x_09_00_00_35

  • Hi Mark,

    Thank you for the details. Let me try to recreate and get back to you tomorrow. I feel like the SDK installation path is the issue, CCS might have some saved paths since you're not installing it but creating a tarball from a previously installed location. 

    Regards,
    Anand Mahadevan SS

  • Hi Mark,

    As per our discussion over webex meeting, I have shared with you a working Dockerfile which creates an image with all the tools necessary. Try it out and let me know if more help is required.

    Regards,
    Anand Mahadevan SS

  • As per our discussion via email.   That Docker file where I install all the dependencies and installed CCS and SDK fails in the same way as above.  Pleas let me know if you have been able to reproduce this and how to move forward.

    Any updates from your side?

  • Hi Mark,

    As I had communicated earlier yesterday, I am able to import CCS projects in a docker container run from and image created using the same Dockerfile I shared with you. Not sure what could be the issue  at your end. We can have a debug call today.

    Regards,
    Anand Mahadevan SS

  • Hi Mark,

    As we have solved the issues over the call, please let me know if this thread needs to open. If it is solved, please mark this response as the answer so we can close the thread. If there is any more issues, please post the updates here or via email. Summarizing the issue and actions taken:

    Issue:
    CCS project fails to build because of unmet dependencies (SDK, SysConfig) inside docker container

    Actions towards closure: 
    1. New Dockerfile provided with a cleaner way to have SDK and other build dependencies as part of the image
    2. Issue recreated and solved at SDK end with SDK example
    3. Existing issues at Oracle end solved with some modifications in ccs initialization commands and cleaning up the build artifacts directory

    Regards,
    Anand Mahadevan SS