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.

CODECOMPOSER: Path delimiters in variable expansion

Part Number: CODECOMPOSER

I have post build steps to create a binary file that have been working, until I updated the workspace to CCS12.7.1.
I notice that the path after expansion has Linux style delimiters instead of Windows when the post build step is executed.
Looking at the path variables CCS_INSTALL_ROOT and CG_TOOL_ROOT and both look like Windows format, but when it is expanded in the command it is being expanded to Linux format so the post build step fails.
I can hard code the path and it works, but I would rather use the path variables so it will continue to be updated in the future.
How can I fix this ?

Here's the post build step:
${CCS_INSTALL_ROOT}\utils\tiobj2bin\tiobj2binfill ${BuildArtifactFileName} ${BuildArtifactFileBaseName}.bin ${CG_TOOL_ROOT}\bin\ofd2000 ${CG_TOOL_ROOT}\bin\hex2000 ${CCS_INSTALL_ROOT}\utils\tiobj2bin\mkhex4bin;

  • Ki,

    Thanks for the link.
    I should have added this detail about hard coding the path.
    Here is the error I get which is similar to what is in the post you linked to except I am using the C drive.

    MY POST BUILD STEP
    ${CCS_INSTALL_ROOT}\utils\tiobj2bin\tiobj2binfill ${BuildArtifactFileName} ${BuildArtifactFileBaseName}.bin ${CG_TOOL_ROOT}\bin\ofd2000 ${CG_TOOL_ROOT}\bin\hex2000 ${CCS_INSTALL_ROOT}\utils\tiobj2bin\mkhex4bin;

    THE RESULT IN THE CONSOLE
    C:/ti/ccs1271/ccs\utils\tiobj2bin\tiobj2binfill MbcDualCoreCpu2.out MbcDualCoreCpu2.bin C:/ti/ti-cgt-c2000_18.12.8.LTS\bin\ofd2000 C:/ti/ti-cgt-c2000_18.12.8.LTS\bin\hex2000 C:/ti/ccs1271/ccs\utils\tiobj2bin\mkhex4bin
    'C:' is not recognized as an internal or external command,
    operable program or batch file.

    Note that the path variables have been expanded with Linux/Mac style delimiters.

    If I run this same thing on the command line I get:

    C:/ti/ccs1271/ccs\utils\tiobj2bin\tiobj2binfill MbcDualCoreCpu2.out MbcDualCoreCpu2.bin C:/ti/ti-cgt-c2000_18.12.8.LTS\bin\ofd2000 C:/ti/ti-cgt-c2000_18.12.8.LTS\bin\hex2000 C:/ti/ccs1271/ccs\utils\tiobj2bin\mkhex4bin
    'C:' is not recognized as an internal or external command,
    operable program or batch file.

    If I run the command with the path delimiters corrected in succeeds:

    C:\ti\ccs1271\ccs\utils\tiobj2bin\tiobj2binfill MbcDualCoreCpu2.out MbcDualCoreCpu2.bin C:\ti\ti-cgt-c2000_18.12.8.LTS\bin\ofd2000 C:\ti\ti-cgt-c2000_18.12.8.LTS\bin\hex2000 C:\ti\ccs1271\ccs\utils\tiobj2bin\mkhex4bin

    Also if I replace the post build step with:

    C:\ti\ccs1271\ccs\utils\tiobj2bin\tiobj2binfill MbcDualCoreCpu2.out MbcDualCoreCpu2.bin C:\ti\ti-cgt-c2000_18.12.8.LTS\bin\ofd2000 C:\ti\ti-cgt-c2000_18.12.8.LTS\bin\hex2000 C:\ti\ccs1271\ccs\utils\tiobj2bin\mkhex4bin;

    It succeeds and creates the binary files correctly.

    I don't think my issue is with the batch file, I think it is with the incorrect expansion of the path variables by CCS.

    Thanks John

  • The proper fix is in the batch file as Mark mentioned in this post:

    https://e2e.ti.com/support/microcontrollers/c2000-microcontrollers-group/c2000/f/c2000-microcontrollers-forum/1197688/tms320f280039c-post-build-failed-in-ccs12-2/4549961#4549961

    When I split the line in 109 of the bat file as Mark suggested, it worked as expected.