Working with Keil 5.x and the --Via option in batch file
-Open the Keil uVision project.
-Go to Options for target and open the Output tab.
-Check/activate the Create Batch File option.
- Run the build from GUI.
- The batch file will be generated. It will be named as project name. So let's assume the project name is "ProjectABC"
The ProjectABC.bat is now can be executed from command line. Take a look at the bat file and if compiler is being called with -Via option, you will see lines like that:
"[install dir]\ARM\ARMCC\Bin\ArmCC" --Via ".\objects\main.__i"
In this case, you need to add the "cpptesttraceResponseFileOption" to the cpptesttrace arguments:
cpptesttrace --cpptesttraceOutputFile=ProjectABC.bdf --cpptesttraceProjectName=ProjectABC --cpptesttraceResponseFileOption=--Via ProjectABC.bat
Once the bdf is created you can use it to create projects in C/C++Test Desktop GUI or run from command line.