To import a Keil uVision project, you need the original uVision project configured to generate a .bat build file. To do this:
- Open the Keil uVision project.
- Go to Options for target and open the Output tab.
- Check/activate the Create Batch File option.
- Rebuild the project.
Once a .bat build file is generated, import the project into C++test as follows:
- Choose File> New> Project, select Import Keil uVision projects, then click Next.
- Type (or browse to) the path to the appropriate project/workspace file or directory.
- Click the Refresh, select the projects to import, then Next.
- Set the import destination, project contents, and build target to be imported, then click Finish.
- If you select a different build target than the one that you generated a build bat file for, then the import wizard will not let you to import the project.
The imported project will have a suitable compiler configuration preselected.
A Keil uVision project can also be imported in the command-line mode by using the following option:
-uv <.uv2 or .uvproj file location>
If you want to change the default import settings, you can specify new ones in a plain text options file. This is described in Local Settings (Options) Files.
Importing Keil uVision 4.0 Projects
To test code that compiles with the Keil 7.0 for C166 compiler, you must your Keil uVision 4.0 project
- Navigate to the project directory and run the following command:
[path to]\cpptesttrace.exe --cpptesttraceProjectName=[project name] --cpptesttraceOutputFile=[project name].bdf --cpptesttraceQuoteCmdLineMode=sq "[path to]\Uv4.EXE" -r [project file]
- .Uv2 and .uvproj extensions are supported--the GUI will automatically convert .Uv2 projects
- cpptesttrace.exe is located within [INSTALL]\engine\bin\cpptesttrace.exe
- Default location of Keil Uv4.EXE gui is: "C:\Keil\UV4\Uv4.EXE"
- [project name] is a unique identifier for this project when it's imported to C++test
- Import the newly created .bdf using the C++test GUI
Fixing File Extensions or Keil C166 IDE-generated Source Files
The file extension case may change for some source files generated with the Keil C166 IDE. This will cause source file to be skipped during analysis.
- In C++test, right-click on your project and choose Properties> C/C++ General> File Types
- Enable the "Use project setting" option
- Click New and enter *.C. in the Pattern
- Choose C Source File from the Type drop-down menu and click OK
- Click New and enter *.CPP in the Pattern and choose C++ Source File from the Type drop-down menu
- Click OK