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: DCSM Security tool not able to build on an existing driverlib example project

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

Tool/software:

I am trying to use the DCSM security tool, by following the exact steps listed in C2000Tm DCSM Security Tool (Rev. A) under the section "6 Adding DCSM Security Tool Support to an Existing Driverlib Project ", by copying the dcsm syscfg file from its example project folder in C20000Ware for F28004x.

I am using the SCI loopback example to import the dcsm syscfg into, however, I get the following error with it:


**** Build of configuration CPU1_RAM for project sci_ex1_loopback ****

"C:\\ti\\ccs1270\\ccs\\utils\\bin\\gmake" -k -j 12 all -O

Building file: "../dcsm_security_tool.syscfg"
Invoking: SysConfig
"C:/ti/ccs1270/ccs/utils/sysconfig_1.20.0/sysconfig_cli.bat" --script "C:/Users/sananth/test_dcsm/sci_ex1_loopback/dcsm_security_tool.syscfg" -o "syscfg" -s "C:/ti/c2000/C2000Ware_5_02_00_00/.metadata/sdk.json" -s "C:/ti/c2000/C2000Ware_5_02_00_00/utilities/dcsm_tool/dcsm_syscfg/.metadata/product.json" -d "F28004x" --compiler ccs
Running script...
Validating...
subdir_rules.mk:9: recipe for target 'build-1844291215' failed
Error: The following templates are declared more than once: dcsm.asm,dcsm.cmd
at t.CodeGenerator.getTemplates (C:\ti\ccs1270\ccs\utils\sysconfig_1.20.0\dist\webpack:\sysconfig\src\pinmux\services\codeGeneration\codeGenerator.ts:70:10)
at iteratee (C:\ti\ccs1270\ccs\utils\sysconfig_1.20.0\dist\webpack:\sysconfig\src\cli\cli_core.ts:124:37)
at baseEach (C:\ti\ccs1270\ccs\utils\sysconfig_1.20.0\dist\webpack:\sysconfig\node_modules\lodash\lodash.js:530:11)
at Function.each (C:\ti\ccs1270\ccs\utils\sysconfig_1.20.0\dist\webpack:\sysconfig\node_modules\lodash\lodash.js:9409:52)
at errorStore (C:\ti\ccs1270\ccs\utils\sysconfig_1.20.0\dist\webpack:\sysconfig\src\cli\cli_core.ts:114:4)
at t.runCLI (C:\ti\ccs1270\ccs\utils\sysconfig_1.20.0\dist\webpack:\sysconfig\src\cli\runCli.ts:36:35)
gmake: *** [build-1844291215] Error 1
Building file: "../sci_ex1_loopback.syscfg"
Invoking: SysConfig
"C:/ti/ccs1270/ccs/utils/sysconfig_1.20.0/sysconfig_cli.bat" --script "C:/Users/sananth/test_dcsm/sci_ex1_loopback/sci_ex1_loopback.syscfg" -o "syscfg" -s "C:/ti/c2000/C2000Ware_5_02_00_00/.metadata/sdk.json" -s "C:/ti/c2000/C2000Ware_5_02_00_00/utilities/dcsm_tool/dcsm_syscfg/.metadata/product.json" -d "F28004x" --compiler ccs
Running script...
Validating...
Generating Code (sci_ex1_loopback.syscfg)...
Writing C:\Users\sananth\test_dcsm\sci_ex1_loopback\CPU1_RAM\syscfg\board.c...
Writing C:\Users\sananth\test_dcsm\sci_ex1_loopback\CPU1_RAM\syscfg\board.h...
Writing C:\Users\sananth\test_dcsm\sci_ex1_loopback\CPU1_RAM\syscfg\board.cmd.genlibs...
Writing C:\Users\sananth\test_dcsm\sci_ex1_loopback\CPU1_RAM\syscfg\board.opt...
Writing C:\Users\sananth\test_dcsm\sci_ex1_loopback\CPU1_RAM\syscfg\board.json...
Writing C:\Users\sananth\test_dcsm\sci_ex1_loopback\CPU1_RAM\syscfg\pinmux.csv...
Writing C:\Users\sananth\test_dcsm\sci_ex1_loopback\CPU1_RAM\syscfg\device.c...
Writing C:\Users\sananth\test_dcsm\sci_ex1_loopback\CPU1_RAM\syscfg\device.h...
Writing C:\Users\sananth\test_dcsm\sci_ex1_loopback\CPU1_RAM\syscfg\device_cmd.cmd...
Writing C:\Users\sananth\test_dcsm\sci_ex1_loopback\CPU1_RAM\syscfg\device_cmd.c...
Writing C:\Users\sananth\test_dcsm\sci_ex1_loopback\CPU1_RAM\syscfg\device_cmd.h...
Writing C:\Users\sananth\test_dcsm\sci_ex1_loopback\CPU1_RAM\syscfg\device_cmd.opt...
Writing C:\Users\sananth\test_dcsm\sci_ex1_loopback\CPU1_RAM\syscfg\device_cmd.cmd.genlibs...
Writing C:\Users\sananth\test_dcsm\sci_ex1_loopback\CPU1_RAM\syscfg\c2000ware_libraries.cmd.genlibs...
Writing C:\Users\sananth\test_dcsm\sci_ex1_loopback\CPU1_RAM\syscfg\c2000ware_libraries.opt...
Writing C:\Users\sananth\test_dcsm\sci_ex1_loopback\CPU1_RAM\syscfg\c2000ware_libraries.c...
Writing C:\Users\sananth\test_dcsm\sci_ex1_loopback\CPU1_RAM\syscfg\c2000ware_libraries.h...
Writing C:\Users\sananth\test_dcsm\sci_ex1_loopback\CPU1_RAM\syscfg\clocktree.h...
Finished building: "../sci_ex1_loopback.syscfg"

gmake: Target 'all' not remade because of errors.

**** Build Finished ****


I couldn't find any resources for this.
I found another e2e post where a similar error was being faced, however the solution provided there was not working at all:

CC1312R: Build Error: Templates are declared more than once - Sub-1 GHz forum - Sub-1 GHz - TI E2E support forums

I need to understand how to resolve this error. Let me know what additional info you need.
CCS version is 12.70
C2000 ware version is 5_02_00
Here is the image attached for reference
Image showing the error in CCS

  • can you try again with the target configuration set to CPU1_FLASH?

  • Hi Luke, 
    No, even with CPU1_FLASH, the same issue occurs.


    Is there some bug with DCSM?
    Are the steps in C2000 DCSM Security Tool document not proper?
    Here are the configurations in the Project Properties post following the steps in the Security Tool document:

  • I think there is some issue with syscfg, but I am not sure what it is.

    I see that when I try to see the generated dcsm.asm and dcsm.cmd (they are not generated yet, just wanted to check it out), I get the same error as before, that dcsm.asm and dcsm.cmd are declared more than once:


    I am just not sure how is this possible. There are just two syscfgs as shown below, and in the SCI syscfg, the DCSM section is not at all configured:
        

    So, I am unaware as to how it is declared more than once.
    Here is the subdir_rules.mk file that is generating the error in the Console:


    Is there some step that is missing when using multiple syscfg files?

  • Hi Sumukh

    You cannot have two syscfg files in the same project.  You will have to add configurations for the DCSM section in the SCI syscfg file.

    Best Regards

    Siddharth

  • Yeh, it appears so.
    The project is building now if I just configure DCSM within the existing syscfg file itself.
    Perhaps it would be better if this is mentioned somewhere, or better yet, in the C2000 DCSM Security Tool doc itself.
    I think that doc is old and by default, SysCfg is not present in the example projects of older CCS versions, so that is the reason the 2nd point in the section mentions a dialog box that enables SysCfg.
    Alright, thank you.

  • However, I have not added the DCSM variable in the Linked resources or the syscfg options in the Project Properties, as mentioned in the doc.
    So, if the Build for the project goes through, does it mean it included the .asm and .cmd in the .out file creation of the project? Or it did not?

  • The issue reappears if I include the DCSMTOOL_SYSCFG_ROOT variable paths in the Project properties, even if I use a single syscfg file in which DCSM is configured:


    So, what is the exact procedure to be followed to use DCSM when it is configured within the existing syscfg file of the example project?
    Should the DCSMTOOL_SYSCFG_ROOT path be included to build the project so that the .out file is created with the DCSM configurations?
    Or, 
    Should the DCSMTOOL_SYSCFG_ROOT path not be included to build the project?

  • Hi Sumukh,

    If you are utilizing other features of sysconfig besides DCSM you should not need separate include paths for DCSM such as DCSMTOOL_SYSCFG_ROOT, you simply need to configure DCSM in the same .syscfg file as the rest of your project.

    Thank you,

    Luke