Description It is sometimes useful to be able to execute DOS commands from an APM project template, e.g. to perform some extra build steps, or copy some files. This is possible, but with some restrictions (Windows NT only, not Windows 95). Application Note 46, Editing Project Templates in the ARM Application Notes describes a procedure (in Section 5.2) for adding an executable DOS utility called AIF2HEX as part of a build step. This procedure works for adding executable programs like AIF2HEX to a build process. However, DOS commands like 'copy' must be treated differently. You cannot simply replace the word 'AIF2HEX' with 'copy', because 'copy' is not an executable program as such. Solution The solution for Windows NT is to launch 'cmd.exe' from APM, with command-line parameters like:
copy .axf .ROM
Unfortunately, there is no such solution for Windows 95, which does not have 'cmd.exe' available. In fact, you cannot pass a command from APM to command.com either - command execution starts OK but then never terminates (a batch file fails similarly). When you rebuild the project, if you see an error message like:
"project.apj"; No build target named '<$projectname>.bin'
you will need to then: - Remove all source files from your project by highlighting the files, then pressing delete.
- Replace all source files into your project using the Add Files to Project from the Project menu.
This should clear the error message.
|