Question:
How to Build/Clean VDSP project in command-line?
Answer:
VisualDSP++ can be invoked from the command line without the need to invoke IDDE. The best approach for this is to use 'Export Makefile' option within the IDDE, which will produce a makefile which can be used to build the project from the command line.
For further details of the makefiles, check the following help path 'Help'->'Contents'->'Graphical Environment'->'IDDE'->'How To'->'Projects'->'Makefiles'. Makefile can be used with GNU Make to build the project.
To build the project from command line suitable makefile is needed. This can be created by own, however VisualDSP++ offers the means to export a makefile for command-line builds. This is done via 'Project: Export Makefile'. This generates makefile compatible with gmake-378 utility provided in the VisualDSP++ tools. By default exporting makefile will append the "_export.mak" name, so the makefile for "Project.dpj" becomes "Project_export.mak".
Also place the gmake-378.exe file in current project directory and create "Debug" or "Release" folder in the same directory before running.
User need to give a call to any one of the below line from the command line from project directory, e.g.:
gmake-378 -f Project_export.mak Project_Debug
gmake-378 -f Project_export.mak Project_Release
Where "Project_export.mak" is the project name with "_export.mak" appended at the end and "Project_Debug" is the project name with the configuration that user want to build (e.g. the defaults are _Debug and _Release, but if the user have custom configurations defined under Project: Configurations these will be available also).
The exported make file supports below targets to run:
#projectname_Debug
#projectname_Debug_clean
#projectname_Release
#projectname_Release_clean
Also, user can use "_Debug_clean" or "_Release_clean" command as below to make the clean project.
gmake-378 -f Project_export.mak Project_Debug_clean
If the “'cmd' is not recognized as an internal or external command" issue occurs, while cleaning the project:
please ensure that "C:\Windows\System32;" path is listed in the command line by execute the command "PATH" from the command line.
If the above path is not listed, user need to place windows\system32 path in the part of the 'Path' Windows Environment variable.
Also user can set C:\Windows\System32 to the first entry in the PATH variable as follows:
PATH=C:\Windows\System32;%PATH%
It will be resulting a successful cleaning of the project without any issue.