When specified in a build configuration, the post-build command will be executed prior to calling the optional tools. For this reason, when you try to use a file produced by an optional tool in a post-build command, you get the error message “No such file or directory”.
To work around this issue, create and launch a sequence of two build configurations. The first configuration will produce secondary output (SREC, HEX and LST files), and the second configuration will execute the post-build command for these build targets.
To use secondary build targets in a post-build command: