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.

MSPM0L1306: Switching an existing project from GCC to TI Clang

Part Number: MSPM0L1306
Other Parts Discussed in Thread: SYSCONFIG,

Tool/software:

I have an existing project using the MSPM0 SDK and GCC in CCS Theia. I want to switch it to use TI Clang instead. However, after I changed the Compiler in the Project General properties, the build now fails with an error from SysConfig:

[10]**** Build of configuration Debug-Launchpad__TICLANG for project MotionLogicController ****
[11]"C:\\ti\\ccstheia140\\ccs\\utils\\bin\\gmake" -k -j 16 all -O

[12]Building file: "../mspm0l1306_launchpad.syscfg"
[13]Invoking: SysConfig
[14]"C:/ti/ccstheia140/ccs/utils/sysconfig_1.20.0/sysconfig_cli.bat" --script "C:/Users/gordon.tyler/workspace_ccstheia/MotionLogicController/mspm0l1306_launchpad.syscfg" -o "syscfg" --compiler ticlang

[15]Usage:
[16] cli [-o &lt;dir&gt;] [-s <file>] [-u <string>] [-b <name>] [-d <name>] [-p <name>] [-r <name>] [--treatWarningsAsErrors] [--quiet -q] <script>
[17] cli --help
[18] cli --version

[19] example: cli -s meta_data/sdk.json -d MSP432P401R scripts/two_uarts.js
[20] example: -s sdk.json -d MSP432P401R -o ./display_cfg sdk/cfgs/display.syscfg

[21] Note that the all arguments other than '--help' and '--version' may also be
[22] specified via the script with an embedded @cliArgs comment directive.
[23] E.g. // @cliArgs -d MSP432P401R

[24] If an argument is embedded in a script and explicitly specified via the CLI
[25] then precedence is given to the CLI arguments. Additionally, specifying
[26] "--board" or "--device" on the CLI will override any "--board" and "--device"
[27] arguments specified in the script.

[28]subdir_rules.mk:16: recipe for target 'build-763525025' failed
[29]Invalid argument '--product': No product with name "mspm0_sdk" and version "2.00.01.01" found

It looks like the Product Dependencies for the MSPM0 SDK and SysConfig were not added to the new build configuration created when I switch the compiler. However, after re-adding these dependencies, the build still fails at the SysConfig step:

[10]**** Build of configuration Debug-Launchpad__TICLANG for project MotionLogicController ****
[11]"C:\\ti\\ccstheia140\\ccs\\utils\\bin\\gmake" -k -j 16 all -O

[12]Building file: "../mspm0l1306_launchpad.syscfg"
[13]Invoking: SysConfig
[14]"C:/ti/ccstheia140/ccs/utils/sysconfig_1.20.0/sysconfig_cli.bat" --script "C:/Users/gordon.tyler/workspace_ccstheia/MotionLogicController/mspm0l1306_launchpad.syscfg" -o "syscfg" -s "C:/ti/simplelink_msp432e4_sdk_4_20_00_12/.metadata/product.json" --compiler ticlang

[15]Usage:
[16] cli [-o &lt;dir&gt;] [-s <file>] [-u <string>] [-b <name>] [-d <name>] [-p <name>] [-r <name>] [--treatWarningsAsErrors] [--quiet -q] <script>
[17] cli --help
[18] cli --version

[19] example: cli -s meta_data/sdk.json -d MSP432P401R scripts/two_uarts.js
[20] example: -s sdk.json -d MSP432P401R -o ./display_cfg sdk/cfgs/display.syscfg

[21] Note that the all arguments other than '--help' and '--version' may also be
[22] specified via the script with an embedded @cliArgs comment directive.
[23] E.g. // @cliArgs -d MSP432P401R

[24] If an argument is embedded in a script and explicitly specified via the CLI
[25] then precedence is given to the CLI arguments. Additionally, specifying
[26] "--board" or "--device" on the CLI will override any "--board" and "--device"
[27] arguments specified in the script.

[28]subdir_rules.mk:16: recipe for target 'build-763525025' failed
[29]/ti/boards/LP_MSPM0L1306: No such resource: /ti/boards/LP_MSPM0L1306.syscfg.json
[30]Paths searched:
[31]C:\ti\simplelink_msp432e4_sdk_4_20_00_12\source\ti\boards\LP_MSPM0L1306.syscfg.json
[32]C:\ti\simplelink_msp432e4_sdk_4_20_00_12\source\ti\boards\.meta\LP_MSPM0L1306.syscfg.json
[33]C:\ti\simplelink_msp432e4_sdk_4_20_00_12\source\ti\.meta\boards\LP_MSPM0L1306.syscfg.json
[34]C:\ti\simplelink_msp432e4_sdk_4_20_00_12\source\.meta\ti\boards\LP_MSPM0L1306.syscfg.json
[35]C:\Users\gordon.tyler\workspace_ccstheia\MotionLogicController\ti\boards\LP_MSPM0L1306.syscfg.json
[36]C:\Users\gordon.tyler\workspace_ccstheia\MotionLogicController\ti\boards\.meta\LP_MSPM0L1306.syscfg.json
[37]C:\Users\gordon.tyler\workspace_ccstheia\MotionLogicController\ti\.meta\boards\LP_MSPM0L1306.syscfg.json
[38]C:\Users\gordon.tyler\workspace_ccstheia\MotionLogicController\.meta\ti\boards\LP_MSPM0L1306.syscfg.json

What adjustments do I need to make to the project configuration to get it working again?

  • The Invalid argument '--product' error message indicates that there's an issue with the product dependency for the MSPM0 SDK. correct product and version should be specified in the project configuration. Product dependency should be correctly added and configured for the TI Clang build configuration.

    The No such resource: /ti/boards/LP_MSPM0L1306.syscfg.json error suggests that the SysConfig tool cannot find the required board configuration file. Ensure that the board configuration file LP_MSPM0L1306.syscfg.json is present in the appropriate directory within your project or SDK. The board configuration file LP_MSPM0L1306.syscfg.json should be present in the appropriate directory within your project or SDK. 

    If you want suggestions about some more ARM cortex ICs, you can  find here: www.theengineeringprojects.com/.../top-embedded-ics-to-learn-in-2023.html

  • Hello

    Thank you for Zain's reply and I will post this E2E to SDTO team. And if Gordon you still have issue about the GCC and TI Clang, our SDTO colleague will help you on it. 

    Best Regards,

    Janz Bai

  • I resolved the --product error and the "no such resource" error by recreating the configuration with the TI Clang compiler and adding in the necessary product dependencies before building.

    However, it still failed with other errors, which I eventually figured out were due to the new build configuration missing various compiler includes, linker include paths and linker input files. Since CCS created the configuration automatically when I changed the compiler, I would have expected it to setup those correctly from the original configuration.

    The changes I had to make:

    • Add the following to compiler includes:
      ${PROJECT_ROOT}
      ${PROJECT_ROOT}/${ConfigName}
      ${COM_TI_MSPM0_SDK_INSTALL_DIR}/source/third_party/CMSIS/Core/Include
      ${COM_TI_MSPM0_SDK_INSTALL_DIR}/source
    • Add the following to linker file inputs:
      device.cmd.genlibs
      libc.a
    • Add the following to linker search path:
      ${COM_TI_MSPM0_SDK_INSTALL_DIR}/source
      ${PROJECT_ROOT}
      ${PROJECT_BUILD_DIR}/syscfg
      ${CG_TOOL_ROOT}/lib

    I patterned this off a TI Clang example project.

    It would be nice if the tool were smart enough to make these adjustments for me when switching compilers. Or perhaps provided a more guided process for adding a new build configuration that uses a different compiler that makes suggestions about which modifications to make.

  • It sounds good! Congratulations!