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.

LAUNCHXL-F280049C: sysconfig errors when configuring for LAUNCHXL in Csstudio Version:12.5.0.00007

Part Number: LAUNCHXL-F280049C
Other Parts Discussed in Thread: SYSCONFIG, C2000WARE

Hi i am having a issue with sysconfig when trying to add an LED when using syscfg 1.18

TypeError: Cannot read properties of undefined (reading 'components')
Hide Details...

at scriptFunc (D:\csstudio\empty_driverlib_project_cpp\c2000.syscfg:18:42) at cb (webpack:///src/pinmux/services/scripting/runScript.ts:112:7) at Object.withDeprecatedAccess (webpack:///src/pinmux/services/deprecatedAccessGuard.ts:14:10) at Object.runAsUserScript (webpack:///src/pinmux/services/scripting/scriptingGuard.ts:61:3) at iteratee (webpack:///src/pinmux/services/scripting/runScript.ts:110:5) at baseEach (webpack:///node_modules/lodash/lodash.js:530:11) at Function.each (webpack:///node_modules/lodash/lodash.js:9409:52) at iteratee (webpack:///src/pinmux/services/scripting/runScript.ts:108:6) at baseEach (webpack:///node_modules/lodash/lodash.js:530:11) at Function.la (webpack:///node_modules/lodash/lodash.js:9409:52)

i am not sure if I attached the c2000.syscfg file so i added the code snippet just in case

/**
 * These arguments were used when this file was generated. They will be automatically applied on subsequent loads
 * via the GUI or CLI. Run CLI with '--help' for additional information on how to override these arguments.
 * @cliArgs --board "/boards/LAUNCHXL_F280049C" --context "system" --product "C2000WARE@5.00.00.00"
 * @versions {"tool":"1.18.0+3266"}
 */

/**
 * Import the modules used in this configuration.
 */
const led  = scripting.addModule("/driverlib/board_components/led", {}, false);
const led1 = led.addInstance();

/**
 * Write custom configuration values to the imported modules.
 */
led1.$name     = "myBoardLED0";
led1.$hardware = system.deviceData.board.components.LED5;

/**
 * Pinmux solution for unlocked pins/peripherals. This ensures that minor changes to the automatic solver in a future
 * version of the tool will not impact the pinmux you originally saw.  These lines can be completely deleted in order to
 * re-solve from scratch.
 */
led1.gpio.gpioPin.$suggestSolution = "boosterpack2.52";

the project was created from a project import of empy_driverlib_project_cpp in the driverlib c2000ware example folder

  • Hi Michael,

    I tried to use this sysconfig settings in my empty driverlib example and i was able to reproduce the issue that you are facing.

    The projectspec settings for the empty driverlib project prevents from using the Launchpad support for accessing LED5 configuration.

    As a workaround, i am attaching the projectspec for the empty driverlib_cpp project, please replace the file in the 

    C2000ware-release\driverlib\f28004x\examples\empty_projects\CCS\ folder and try to import the example again.

    <projectSpec>
      <project
            name="empty_driverlib_project_cpp"
            device="TMS320F280049C"
            cgtVersion="22.6.0.LTS"
            products="sysconfig;c2000ware_software_package"
            outputFormat="ELF"
            launchWizard="False"
            enableSysConfigTool="true"
            sysConfigBuildOptions="--product ${C2000WARE_ROOT}/.metadata/sdk.json"
            postBuildStep="
               echo "========= Build of the CLB simulation has moved to the CLB Tool. Click the '?' icon by the _Generate CLB Simulation File_ enable for more details (located in the Global Parameters of the Tile Design SysConfig module) ============="
              ;if ${GENERATE_DIAGRAM} == 1  ${NODE_TOOL} "${C2000WARE_ROOT}/utilities/clb_tool/clb_syscfg/dot_file_libraries/clbDotUtility.js"  "${C2000WARE_ROOT}/utilities/clb_tool/clb_syscfg/" "${BuildDirectory}/syscfg" "${BuildDirectory}/syscfg/clb.dot"
              ;if ${GENERATE_DIAGRAM} == 1  mkdir "${BuildDirectory}/diagrams"
              ;if ${GENERATE_DIAGRAM} == 1  ${NODE_TOOL} "${C2000WARE_ROOT}/driverlib/.meta/generate_diagrams.js" "${C2000WARE_ROOT}" "${BuildDirectory}/diagrams" "${BuildDirectory}/syscfg"
            "
            >
        <configuration name="CPU1_RAM" compilerBuildOptions="--opt_level=off -I${C2000WARE_ROOT} -v28 -ml -mt --cla_support=cla2 --float_support=fpu32 --tmu_support=tmu0 --vcu_support=vcu0  --gen_func_subsections=on --define=DEBUG --diag_warning=225 --diag_suppress=10063 --display_error_number" linkerBuildOptions="--entry_point code_start --stack_size=0x3F8 --heap_size=0x200 -i${C2000WARE_ROOT} -i${PROJECT_BUILD_DIR}/syscfg -lc2000ware_libraries.cmd.genlibs -lboard.cmd.genlibs -ldevice_cmd.cmd.genlibs" />
        <configuration name="CPU1_FLASH" compilerBuildOptions="--opt_level=off -I${C2000WARE_ROOT} -v28 -ml -mt --cla_support=cla2 --float_support=fpu32 --tmu_support=tmu0 --vcu_support=vcu0   --gen_func_subsections=on --define=DEBUG --define=_FLASH --diag_warning=225 --diag_suppress=10063 --display_error_number" linkerBuildOptions="--entry_point code_start --stack_size=0x3F8 --heap_size=0x200 --define=_FLASH -i${C2000WARE_ROOT} -i${PROJECT_BUILD_DIR}/syscfg -lc2000ware_libraries.cmd.genlibs -lboard.cmd.genlibs -ldevice_cmd.cmd.genlibs" />
        <configuration name="CPU1_LAUNCHXL_RAM" compilerBuildOptions="--opt_level=off -I${C2000WARE_ROOT} -v28 -ml -mt --cla_support=cla2 --float_support=fpu32 --tmu_support=tmu0 --vcu_support=vcu0  --gen_func_subsections=on --define=DEBUG --define=_LAUNCHXL_F280049C --diag_warning=225 --diag_suppress=10063 --display_error_number" linkerBuildOptions="--entry_point code_start --stack_size=0x3F8 --heap_size=0x200 -i${C2000WARE_ROOT} -i${PROJECT_BUILD_DIR}/syscfg -lc2000ware_libraries.cmd.genlibs -lboard.cmd.genlibs -ldevice_cmd.cmd.genlibs" />
        <configuration name="CPU1_LAUNCHXL_FLASH" compilerBuildOptions="--opt_level=off -I${C2000WARE_ROOT} -v28 -ml -mt --cla_support=cla2 --float_support=fpu32 --tmu_support=tmu0 --vcu_support=vcu0  --gen_func_subsections=on --define=DEBUG --define=_LAUNCHXL_F280049C --define=_FLASH --diag_warning=225 --diag_suppress=10063 --display_error_number" linkerBuildOptions="--entry_point code_start --stack_size=0x3F8 --heap_size=0x200 --define=_FLASH -i${C2000WARE_ROOT} -i${PROJECT_BUILD_DIR}/syscfg -lc2000ware_libraries.cmd.genlibs -lboard.cmd.genlibs -ldevice_cmd.cmd.genlibs" />
    
        <pathVariable name="C2000WARE_ROOT" path="../../../../../" scope="project" />
        <pathVariable name="CLB_SYSCFG_ROOT" path="../../../../../utilities/clb_tool/clb_syscfg/" scope="project" />
        <pathVariable name="SYSTEMC_INSTALL" path="../../../../../utilities/clb_tool/clb_syscfg/systemc-2.3.3" scope="project" />
        <pathVariable name="CLB_SIM_COMPILER" path="C:/TDM-GCC-64/bin" scope="project" />
        <buildVariable name="CLB_DEBUG" value="0" scope="project" />
        <buildVariable name="GENERATE_DIAGRAM" value="0" scope="project" />
        <file action="copy" path="../empty_driverlib_main.cpp" targetDirectory="" />
        <file action="copy" path="../c2000.syscfg" targetDirectory="" />
      </project>
    </projectSpec>
    

    Let me analyze further and get back to you if i find another approach.

    Thanks

    Aswin

  • sorry this took me so long. but i found that the config above does not show up in import dialog.

    ii had to modify it by putting &quot; on some of the lines.

    <projectSpec>
      <project
            name="empty_driverlib_project_cpp"
            device="TMS320F280049C"
            cgtVersion="22.6.0.LTS"
            products="sysconfig;c2000ware_software_package"
            outputFormat="ELF"
            launchWizard="False"
            enableSysConfigTool="true"
            sysConfigBuildOptions="--product ${C2000WARE_ROOT}/.metadata/sdk.json"
            postBuildStep="
               echo "========= Build of the CLB simulation has moved to the CLB Tool. Click the '?' icon by the _Generate CLB Simulation File_ enable for more details (located in the Global Parameters of the Tile Design SysConfig module) ============="
              ;if ${GENERATE_DIAGRAM} == 1  ${NODE_TOOL} "${C2000WARE_ROOT}/utilities/clb_tool/clb_syscfg/dot_file_libraries/clbDotUtility.js"  "${C2000WARE_ROOT}/utilities/clb_tool/clb_syscfg/" "${BuildDirectory}/syscfg" "${BuildDirectory}/syscfg/clb.dot"
              ;if ${GENERATE_DIAGRAM} == 1  mkdir "${BuildDirectory}/diagrams"
              ;if ${GENERATE_DIAGRAM} == 1  ${NODE_TOOL} "${C2000WARE_ROOT}/driverlib/.meta/generate_diagrams.js" "${C2000WARE_ROOT}" "${BuildDirectory}/diagrams" "${BuildDirectory}/syscfg"
            "
            >
        <configuration name="CPU1_RAM" compilerBuildOptions="--opt_level=off -I${C2000WARE_ROOT} -v28 -ml -mt --cla_support=cla2 --float_support=fpu32 --tmu_support=tmu0 --vcu_support=vcu0  --gen_func_subsections=on --define=DEBUG --diag_warning=225 --diag_suppress=10063 --display_error_number" linkerBuildOptions="--entry_point code_start --stack_size=0x3F8 --heap_size=0x200 -i${C2000WARE_ROOT} -i${PROJECT_BUILD_DIR}/syscfg -lc2000ware_libraries.cmd.genlibs -lboard.cmd.genlibs -ldevice_cmd.cmd.genlibs" />
        <configuration name="CPU1_FLASH" compilerBuildOptions="--opt_level=off -I${C2000WARE_ROOT} -v28 -ml -mt --cla_support=cla2 --float_support=fpu32 --tmu_support=tmu0 --vcu_support=vcu0   --gen_func_subsections=on --define=DEBUG --define=_FLASH --diag_warning=225 --diag_suppress=10063 --display_error_number" linkerBuildOptions="--entry_point code_start --stack_size=0x3F8 --heap_size=0x200 --define=_FLASH -i${C2000WARE_ROOT} -i${PROJECT_BUILD_DIR}/syscfg -lc2000ware_libraries.cmd.genlibs -lboard.cmd.genlibs -ldevice_cmd.cmd.genlibs" />
        <configuration name="CPU1_LAUNCHXL_RAM" compilerBuildOptions="--opt_level=off -I${C2000WARE_ROOT} -v28 -ml -mt --cla_support=cla2 --float_support=fpu32 --tmu_support=tmu0 --vcu_support=vcu0  --gen_func_subsections=on --define=DEBUG --define=_LAUNCHXL_F280049C --diag_warning=225 --diag_suppress=10063 --display_error_number" linkerBuildOptions="--entry_point code_start --stack_size=0x3F8 --heap_size=0x200 -i${C2000WARE_ROOT} -i${PROJECT_BUILD_DIR}/syscfg -lc2000ware_libraries.cmd.genlibs -lboard.cmd.genlibs -ldevice_cmd.cmd.genlibs" />
        <configuration name="CPU1_LAUNCHXL_FLASH" compilerBuildOptions="--opt_level=off -I${C2000WARE_ROOT} -v28 -ml -mt --cla_support=cla2 --float_support=fpu32 --tmu_support=tmu0 --vcu_support=vcu0  --gen_func_subsections=on --define=DEBUG --define=_LAUNCHXL_F280049C --define=_FLASH --diag_warning=225 --diag_suppress=10063 --display_error_number" linkerBuildOptions="--entry_point code_start --stack_size=0x3F8 --heap_size=0x200 --define=_FLASH -i${C2000WARE_ROOT} -i${PROJECT_BUILD_DIR}/syscfg -lc2000ware_libraries.cmd.genlibs -lboard.cmd.genlibs -ldevice_cmd.cmd.genlibs" />
    
        <pathVariable name="C2000WARE_ROOT" path="../../../../../" scope="project" />
        <pathVariable name="CLB_SYSCFG_ROOT" path="../../../../../utilities/clb_tool/clb_syscfg/" scope="project" />
        <pathVariable name="SYSTEMC_INSTALL" path="../../../../../utilities/clb_tool/clb_syscfg/systemc-2.3.3" scope="project" />
        <pathVariable name="CLB_SIM_COMPILER" path="C:/TDM-GCC-64/bin" scope="project" />
        <buildVariable name="CLB_DEBUG" value="0" scope="project" />
        <buildVariable name="GENERATE_DIAGRAM" value="0" scope="project" />
        <file action="copy" path="../empty_driverlib_main.cpp" targetDirectory="" />
        <file action="copy" path="../c2000.syscfg" targetDirectory="" />
      </project>
    </projectSpec>

    unfortunately the C2000.syscfg does not work. i get this

    Error: Unknown runtime index: -1
    Hide Details...

    at t.ConfigStore.setSelectedContext (webpack:///src/pinmux/services/configStore.ts:1195:10) at h.isEclipse.window.pinmuxNavigateToScript (webpack:///src/pinmux/services/configStore.ts:218:11) at <anonymous>:1:8

  • Hi Michael,

    First you need to update the empty_driverlib_project_cpp.projectspec in C2000ware-release\driverlib\f28004x\examples\empty_projects\CCS\ folder with the above attached projectspec.

    Because in the default projectspec you can see a --device F28004x --package F28004x_100PZ --part F28004x_100PZ settings, which prevent from using the syscfg setting as  - led1.$hardware = system.deviceData.board.components.LED5; Hence in the attached projectsoec i have removed those settings.

    Next you need to open the c2000.syscfg file in the C2000Ware_release\driverlib\f28004x\examples\empty_projects and copy the below settings.

    /**
    * These arguments were used when this file was generated. They will be automatically applied on subsequent loads
    * via the GUI or CLI. Run CLI with '--help' for additional information on how to override these arguments.
    * @cliArgs --board "/boards/LAUNCHXL_F280049C" --context "system" --product "C2000WARE@5.00.00.00"
    * @versions {"tool":"1.18.0+3266"}
    */

    Now you can go to CCS and import this empty_driverlib example and add an LED in the syscfg.

    Thanks

    Aswin

     

  • Thanks this did resolve my issue. I also dug into why it was not working in the first place taking what i learned from you. This is what i found.

    In Project Properties under Build>SysConfig>Basic Options with build configurations CPU1_LAUNCHXL_RAM and CPU1_LAUNCHXL_FLASH.

    the board field is blank.

    putting /boards/LAUNCHXL_F280049C into that field fixes the issue as well

    Thank you for your help