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/TMS320F28379D: Understanding Post Build Step Execution

Part Number: TMS320F28379D

Tool/software: Code Composer Studio

Greetings,
I’m running CCS under Windows , and using the Post-build step to accomplish a variety of tasks.  As far as paths are concerned, it seems to behave like a batch file in that, I can use the “..\” construct to move up in the folder structure, and then add the appropriate folder to it to start a batch file. i.e. ..\..\MyFolder\MyBatchFile will start executing MyBatchFile.  If I run MyBatchFile from a command prompt, it works fine.  But if it is run from the Post-build step, the paths are not correct.  I tried using a cd command in the Post-build step to change to MyFolder.  But it still didn’t work.  When I added the cd line to the batch file, it worked fine.  So that is my solution for now.  But the fact that the cd command didn’t behave, in the Post-build step, as I expected shows that there is something about that feature I don't understand.  What am I missing?  BTW, If it helps, I'm using CCS 9.1.0.
Thank you,
Ed

  • Ed Sanders said:
    If I run MyBatchFile from a command prompt, it works fine.  But if it is run from the Post-build step, the paths are not correct.

    During build, the current working directory is the build configuration directory, such as Debug or Release. So the path to batch file that you specify in Post-build step should be relative to the build config directory. Is that how you specified it?

  • Hi AartiG,

    Yes it is.  The batch file executes when started from the Post-build step.  The issue is that it thinks it is in the configuration directory, Debug in this case.  So I added a cd statement to the folder which the batch file expects.  This works if the cd statement is in the batch file.  But it doesn't work if the cd statement is in the Post-build step.

    Ed

  • Ed,

    I don't think the cd statement would work directly in the post-build step, as the current working directory for the build is set and does not change within that context. The solution is to add it to the batch file as you have already done. 

    However you should be able to place the batch file itself in any location, and call the batch file in the post-build step using absolute or relative path.

  • I've been using the relative path, and it has been working well.  Thanks for the info.

    Ed