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/CCSTUDIO: Version management

Part Number: CCSTUDIO


Tool/software: Code Composer Studio

Customer wants to manage version automatically.

Now define a version number in CCS, and refer it to output it to file name as below.

But don't know how to refer it in code, for example below code doesn't work.

const UBYTE g_sFwVersion[10] = "$(APP_VERSION)";//

Is there anyway to implement it?

  • Hi Tony,
    Project build variables are only meant to be used in the project properties, not referenced by the actual source code. The customer will need to find another way to do this. One technique I've seen is to use a pre-build step to generate a header file that defines the version number, of which that header file would then get used during the build.

    Thanks
    ki
  • Thanks Ki-Soo,

    Ki-Soo Lee said:
    ne technique I've seen is to use a pre-build step to generate a header file

    Do you have more detail what tools to be used in pre-build command?

  • Tony Tang said:
    Do you have more detail what tools to be used in pre-build command?

    It varies a lot. Often times it is simply a system call to run some custom script (like a perl script) that generates a the file.