I'm trying to some custom build steps to build a project. I have done the more complicated bits (converting .out to .bin, combining two ELF files) using TI tools and some example variables but the last very simple step is a bit of a puzzler for me. I simply want to copy a file, to replace the normal project .out file with the combined ELF file. But how to do so in a cross-platform way? I want this project to work regardless if running under the Windows or Linux or macOS versions of Code Composer that are available.
Of course in Linux and macOS I could use `cp` assuming they are in the PATH or available at a known path like "/bin/cp". Under Windows perhaps it would be `COPY` although looks like that is a DOS builtin and it's unclear whether CCS runs the build steps in a shell or parsing/executing them itself directly. And to do both I would need to do some sort of `if POSIX then … else if WINDOWS then …" logic which also opens questions of whether there is a shell language available to pre/post-build steps or at least what environment they run in. My impression so far is that:
* CCS is doing its own variable expansion first with its own syntax for things like "${CCS_INSTALL_ROOT}/utils/tiobj2bin/mkhex4bin" even though it looks like something compatible with a Unix shell
* probably just running directly, with the working directory set to the active configuration folder like "Debug/" and things like "pipes" or "redirection" or conditional logic is not available?
* if the tools are not installed with CCS (I only see `gmake` and `unzip` and `zip`) or with the SDK (like the ARM compilers and such) then I probably cannot rely on them cross-platform??
Is there documentation I should be referring to for these kinds of questions? The information at "6.1.3.4. Pre and Post Build Steps" of the Users Guide (currently found at https://software-dl.ti.com/ccs/esd/documents/users_guide/ccs_project-management.html#pre-and-post-build-steps although the link doesn't seem to take you directly to that section in prctice) is very high-level and doesn't really go into details like this.