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.

CODECOMPOSER: Using the GIT version of the SDK instead of the ZIP requires incantations that are not clear

Other Parts Discussed in Thread: CC1352P, CCSTUDIO

Tool/software:

I'm trying to use the 'official git repositories' (or a fork thereof) instead of downloading and unzipping the SDK, as I want to have history of changes. Cloning https://github.com/TexasInstruments/simplelink-zstack-examples/ works fine, but importing an example results with:

```

root@container:~/workspace# export COM_TI_SIMPLELINK_CC13XX_CC26XX_SDK_INSTALL_DIR=/sdk; eclipse -noSplash -data "${HOME}/workspace" -application 'com.ti.ccstudio.apps.projectImport' -ccs.location "/sdk/examples/rtos/CC1352P_2_LAUNCHXL/zstack/znp/tirtos7/ticlang/znp_CC1352P_2_LAUNCHXL_tirtos7_ticlang.projectspec"
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.

--------------------------------------------------------------------------------
Importing project from '/sdk/examples/rtos/CC1352P_2_LAUNCHXL/zstack/znp/tirtos7/ticlang/znp_CC1352P_2_LAUNCHXL_tirtos7_ticlang.projectspec'...

NOTE: Output-type not specified - defaulting to 'executable'.
NOTE: Compiler version 'TICLANG_1.2.1' is not currently installed! - defaulting to 'TICLANG_3.2.2.LTS'.
NOTE: Device endianness not specified - defaulting to 'little'.
NOTE: Output-format not specified - defaulting to 'ELF'.
!ERROR: Product com.ti.SIMPLELINK_CC13XX_CC26XX_SDK v0.0 is not currently installed and no compatible version is available. Please install this product or a compatible version.

```

Some background info, I am trying to also do this through CI using a containerized pipeline. I am installing CSS as follows:

```

"/tmp/ccs_install/CCS${CCS_VERSION}_linux-x64/ccs_setup_${CCS_VERSION}.run" --enable-components "PF_WCONN" --mode unattended --prefix '/opt/ti/' && \
echo 'Extracting the SDK ...' && \
unzip "/tmp/ccs_install/simplelink_cc13xx_cc26xx_sdk_${SLF2_VERSION_PATH:?}__linux.zip" -d '/opt/ti/

```

This results in a working setup. However if I clone the repo to '/sdk' (and thus `/sdk/cc13xx_cc26xx_sdk` recursively) trying to import as pasted above fails. If I import from the unzipped SDK everything works fine. So apparently the git repo does not setup things for the import to succeed, but what should I setup?

I read somewhere that with the IDE, one has to 'register' the SDK; but I didn't register it when unzipping it, so I don't think CSS/Eclipse has any sense of the difference. So there must be something different within the repo compared to the archive? What magic incarnations are needed here?

  • I read somewhere that with the IDE, one has to 'register' the SDK

    I assume you mean it has to be "discovered" by the IDE. Yes, this required.

    See the section called "Product Discovery" in the article below:

    https://dev.ti.com/tirex/explore/node?node=A__AO8DVCZhl0Kt5-yIAVmyvQ__ccs_devtools__FUz-xrs__LATEST

  • That's exactly what I was after. Thank you! It also explains the logic, in that it will search for 'CSS install path' (e.g. /opt/ti in my case) and (I think) "${HOME}" (which i've set to '/build' where my workspace will be). https://dev.ti.com/tirex/explore/node?node=A__AG8CwtaXYck9M-RnDSK3qA__ccs_devtools__FUz-xrs__LATEST even describes my exact scenario, having the SDK in a git repository.

    Now the only thing that remains a mystery, is how to set the "Product Discovery Path" from the CLI, which is documented here https://software-dl.ti.com/ccs/esd/documents/users_guide_ccs_theia/ccs_project-command-line.html#is-there-a-command-line-option-to-specify-a-path-for-a-new-discoverable-software-product-c2000ware-simplelink-sdk-etc-so-ccs-theia-can-detect-it, or so I thought; but that's for Theia; I need (for now) this for the '12.8 legacy' CCS' ... Sadly, searching for it on https://software-dl.ti.com/ccs/esd/documents/users_guide/search.html?q=productDiscoveryPath&check_keywords=yes&area=default hasn't resulted in anything (yet). Could always just hack it into `/opt/ti/ccs/eclipse/configuration/ccs.properties' by appending `com.ti.ccstudio.project.core.internal.tools.CodegenToolDiscoveryManager.TOOL_DISCOVERY_PATH=/sdk` ;) But software-dl.ti.com/.../ccs_projects-command-line.html looks like what I need!

    Will be testing things, but so far it can be considered resolved! Thank you for pointing me in the right direction and helping me identify the correct keywords.

    So this works in making the SDK available to eclipse, however, when I import a project from a projectspec file, I still get the same error :( This could be because the examples repository (which does include the SDK as submodule) 'assumes' things? To re-iterate, my process looks like this now:

    ```

    ccs_setup_${CCS_VERSION}.run" --enable-components "${SLF2_COMPONENTS:?}" --mode unattended --prefix '/opt/ti/'

    eclipse -nosplash -application com.ti.common.core.initialize -ccs.productDiscoveryPath "/sdk/cc13xx_cc26xx_sdk"

    eclipse -noSplash -data "${HOME}/workspace" -application 'com.ti.ccstudio.apps.projectImport' -ccs.location "/sdk/examples/rtos/CC1352P_2_LAUNCHXL/zstack/znp/tirtos7/ticlang/znp_CC1352P_2_LAUNCHXL_tirtos7_ticlang.projectspec"

    ```

    which then treats me with the same as without registering the product discovery path.

    I'll try to import it via the GUI, to see if that makes a difference....

    It does not, but! No product was discovered until I hit 'Refresh' So now, how can I refresh this list (from the CLI)?

    I can confirm that after clicking 'refresh' the import does work!

  • but that's for Theia; I need (for now) this for the '12.8 legacy' CCS'

    This is supported with CCS Eclipse.

    Please see the FAQs at the bottom of this article: https://dev.ti.com/tirex/explore/node?node=A__AJpAFDF7v70N4B0-zFMXpw__ccs_devtools__FUz-xrs__LATEST

  • Hey Ki, thanks, but that's the exact same page, just from within the resource browser. It however does not mention how to 'refresh' the paths from the CLI.

    e.g. it mentions :

    Is there a command line option to specify a path for newly installed version of compiler tools so CCS can detect it?

    In CCSv5, there isn't a command line option for this. However if the newly installed version of compiler tools is installed inside the CCS directory (<ccs_install_dir>\ccsv[x]\tools\compiler) it will automatically get discovered and can be used. If it is installed in a different location, you can first manually add the path via the CCS GUI, and then build via command line.

    In CCSv6 and higher, there is a command with which a new directory (or directories) can be added to the compiler tool discovery path. The command is:

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

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

    Which is great, perfect, but if you look at my post, including the screenshots, you'll see that while the change loads the path, it doesn't 'refresh' and actually scan the added paths.

    However this is not entirely true. If I add a 'discoverable software product' via the CLI, it will not automatically detect it. Maybe it will if you build it, but I need to first import the project, before I can build it. And import doesn't trigger the auto scan. Once the 'refresh' button has been pressed in the UI, all operations work from the CLI as well. So thus the question is, how can we trigger a 'refresh' or 'automatic discovery action' from the CLI. e.g. something as

    eclipse -nosplash -data <workspace> -application com.ti.common.core.refresh

    (i made that up of course)

    What also would work, is the GUI option 'automatically scan on eclipse startup (may affect startup time)' if I can set that from the CLI. Enabling the option from the GUI, and then doing the import does work on projectImport!

    Edit: Hmm, I think `/opt/ti/ccs/eclipse/eclipse -nosplash -application com.ti.common.core.initialize -ccs.productDiscoveryPath "${SLF2_SDK}"` stores something somewhere out of scope of my container. I ran this command as part of my 'docker build' script, (but there was no SDK at that point), which stored the toolpath as expected in the ccs.properties file, but it wasn't discovered' until I hit refresh as described above.

    However, when I ran the command again in the running container, which volume mounted the SDK, it actually worked. So adding the discovery path will do a scan, and when it finds something, stores something. So I probably need to fake/store a single file just to make sure the scan can find the SDK properly. This kind of sucks, because I want to build a container, and then later connect the SDK to it; but the SDK can be different, so being able to 'auto-refresh' is then a 'requirement'.