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.

CCS: Is there any way of generating Sensor Controller Studio Project code during its Code Composer Studio project build?

Tool/software: Code Composer Studio

Is there any way of generating Sensor Controller Studio Project code during Code Composer Studio project build?

If that is not possible, one has either to commit all generated files or to generate them manually every time one needs to build the project or to simply trust that the latest generated files are correct.

  • Arthur,

    I am going to need to loop in the Sensor Controller Studio team. From a CCS Build perspective it is possible to have pre and post build steps. Thus if there is a command line interface for Sensor Controller Studio to generate the files this should be possible. However I am not sure if that interface is there.

    Regards,
    John
  • OK! Let's see what the Sensor Controller Studio team says about it.
  • Hello Arthur, JohnS.

    you have raised an interesting question.
    I am very interested to observe this thread to verify my understanding of Main CPU, RF Core, Peripherals and Sensor Controller on a software level.

    Main CPU communicates with RC Core and Peripherals using APIs with well defined interfaces.
    RF Core interface to Main CPU cannot be changed because it is fixed by a hardware.
    Peripherals interface to Main CPU cannot ... like above.

    In case of Main CPU and SC the situation is different.
    Both are separate computing entities.
    The contract between them is based on:
    - an event fabric defined by hardware
    - shared memory defined by us, programmers.

    Arthur,
    you have said:
    If that is not possible, one has either to commit all generated files or to generate them manually every time one needs to build the project or to simply trust that the latest generated files are correct.

    SC is designed to be as simple as possible.
    There is no formal mechanism defining shared memory usage by SC and Main CPU.
    In my honest opinion, having no such a formal mechanism, there are no reasonable rules to make any project build dependencies between SC and Main CPU.
    We have to simply trust that the latest generated files are correct.
    That is the reason why we do not have an integration between Sensor Controller code generation and Code Composer Studio main project build.
    Such an integration makes no value for a development process, in my opinion.
  • I'm not talking about communication between CPUs. I'm just trying to make a prebuild step in Code Composer Studio which generates code from a Sensor Controller Project.
  • Where is the sense to do that automatically based on available dependencies?
    Always you need to trust.
  • I believe this is useful, so you don't need to always open Sensor Controller Studio and generate the code before building a project in Code Composer Studio.
  • I agree with you. Thank you for a good idea.
    According to my understanding there are no rules telling at CCS level when to rebuild SC code and there are no rules to guarantee that data models at Main CPU and SC levels are consistent.
    In my honest opinion you have very good idea but based on definition of Main CPU and SC interface, automation proposed by you is a pitfall.
  • Am I talking to a Sensor Controller Studio developer?

    There is no need for Code Composer Studio to know when to regenerate Sensor Controller Studio code. All I'm asking is: is there a way to generate code from a Sensor Controller Studio Project (there is a button in Sensor Controller Studio called "Generate Code" or something) from the command line?
  • Now I understand your statement:
    one has either to commit all generated files or to generate them manually every time one needs to build the project or to simply trust that the latest generated files are correct.
    Simple modification to SC code, then Project Build, then SC code generation with its console redirection, then in case of error break, if no error regular CCS project build.
    One click less.
    Mylyn? Lets wait.
  • Hi Arthur,

    You can use the Sensor Controller Studio CLI to generate code from Sensor Controller Projects. This, combined with the pre-build step in CCS, you can generate SCS code from CCS.

    Sensor Controller Studio CLI path: <SCS install dir>/bin/sensor_controller_studio_cli.exe

    Example usage as CCS pre-build step, given default SCS install directory, SCS project in the CCS project, and output code to a folder in your CCS project:

    C:/ti/Sensor Controller Studio/bin/sensor_controller_studio_cli.exe -g ${PROJECT_LOC}/my_scs_project.scs -o ${PROJECT_LOC}/scs

  • Edvard's solution is the way to go here.

    Just wanted to add that the next version of Sensor Controller Studio's CLI will support "not touching" generated files if there are no code changes (only timestamp comment etc.). This should avoid that all generated files must be recompiled by the IDE. The new version is planned to be released mid. October 2018.

    TIABO