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.

SYSCONFIG: Is there a way to use a conditional compilation in Sysconfig script

Part Number: SYSCONFIG
Other Parts Discussed in Thread: CC1312R, , SYSBIOS

Hi,

I am dealing with a project based on a CC1312R using CCS, sysbios and SysConfig. In a XDCscript there is posibility to use conditional compilation.

The question is: Is there a way a conditional compilation to be used with in SysConfig script? 

And if there is such: Is it posible single condition define to be used from both XDC and SysConfig?  

Best Regards,

Dimitar Devedzhiev

  • Hi Dimitar

    Thanks for your question. I'll check with the R&D team and get back to you as soon as possible. 

    Thanks, 
    Elin 

  • Hi Dimitar,

    At first sight it doesn't seem that SysConfig can do this. That said I am not familiar with XDCscript so if you could send an example of an XDC-script that does what you want to do I could investigate if there is a possible way forward. If you by conditional compilation mean code encapsuled in pre-processor #ifdefs it can be achieved by changing the code generation templates. There are no common defines between XDCscript and SysConfig apart from those provided by CCS.

  • Hi Jomar,

    About XDCscript example: Thit is part of my code.

    // In order to be created DEBUG TP PRINT related instances a "DEBUG_TP_PRINT_ENABLED=1" have to be added  
    // to "Project->Properties->CCS Build->XDCtools->Advanced Options->Java properties text box"
    
    if(environment["DEBUG_TP_PRINT_ENABLED"] == 1)
    {	// Pass info to app. that Debug TP Print is enabled
    	Program.global.DEBUG_TP_PRINT_GLOBAL_EN = 1;
    
    	// Add TP print idle function
    	Idle.idleFxns[0] = "&TestPointPrint_idleFxn";
    }
     

    By conditional compilation I mean sometind like code encapsuled in pre-processor #ifdefs (In above exemple from XDCscripr it is not #ifdef exactly but the idea is the same).  What you mean by "changing the code generation templates"?

  • The notion of environment I don't think exist in SysConfig. Still I think you can achieve what you want by modifying the code generation templates so that they insert #ifdef in the code.  For RadioConfig the templates are located here in the SDK: .\source\ti\devices\radioconfig\.meta\templates. The board file template is located here: source\ti\devices\.meta\templates.

  • Hi Jomar,

    I take a fast look over these templates, but I think that this approach is too complecated for my needs and more important it is not "safe" as it is posible these tamplates to be changed from TI in the next SDKs. 

    Even is not exelent approach for me I think that it will be safer to use several .syscfg files for a several project configuration (like Release, Debug1, Debug2...).

    Regards

    Dimitar Devedzhiev