 | µVision4 User's Guide |  |
|
|
| Command LineµVision can be invoked from a command line to build a project, start the debugger, or download a program to Flash. The command applies to project and multiple-project files:
UV4 〚command〛 〚projectfile〛 〚options〛
Where | command | is one of the commands listed below. If no command is specified, µVision opens the project file in interactive Build Mode. | | projectfile | is the name of a project file. µVision project files have the extension .uvproj, multiple-project files the extension .uvmpw. If no project file is specified, µVision opens the project file used last. | | options | are additional parameters that specify the project target name or output file. |
The following commands are available: | Command | Description |
|---|
| -b | Builds the project and exits after the build process finished.
Examples: UV4 -b PROJECT1.uvproj | | -d | Starts µVision in Debugging Mode. Use this command together with a debug initialization file to execute automated test procedures. Exit the debugging session with the EXIT command.
Examples: UV4 -d PROJECT1.uvproj | | -r | Re-translates the project and exits after the build process finished.
Examples: UV4 -r PROJECT1.uvproj -t"Simulator" | | -f | Downloads the program to Flash and exits after the download process finished.
Examples: UV4 -f PROJECT1.uvproj -t"MCB2100 Board" |
The following options can be used: | Option | Description |
|---|
| -j0 | Hides the µVision GUI. Messages are suppressed. Use this option for batch testing. | | -i import_file.xml | Creates a new project or updates an existing project using the data provided by an XML file, which has to be compliant to the schema project_import.xsd available in the directory ..\UV4. The target name can be specified with the option -t. By default, the target name is set to the device name. The GUI is suppressed automatically when using this option.
Examples: UV4 MyProject.uvproj –i MyImport.xml | | -n device_name | Creates a new project with the specified device_name. The target name can be specified with the option -t. By default, the target name is set to the device name. The GUI is suppressed automatically when using this option.
Examples: UV4 MyProject.uvproj –n Device1234 UV4 MyProject.uvproj –i MyImport.xml –n Device5678 -t FlashDebug | | -t targetname | Sets targetname as the current target. If not specified, then the last known target is used.
Examples: UV4 -r PROJECT1.uvproj -t"MCB2100 Board" | | -o outputfile | Specifies the output log file.
Examples: UV4 -r PROJECT1.uvproj -o"listmake.prn" UV4 -r "C:\Keil\ARM\Example-mpw.uvmpw" -o "c:\temp\log.txt" | | -q | Re-builds the selected targets of a multiple-project. Ensure that each target has another object output folder. Use the menu Projects - Options for Target - Output - Select Folder for Objects.
Examples: UV4 -r "C:\Keil\ARM\Example-mpw.uvmpw" -q -o "c:\temp\log.txt" | | -z | Re-builds all targets of a project or multiple-project. Ensure that each target has another object output folder. Use the menu Projects - Options for Target - Output - Select Folder for Objects.
Examples: UV4 -b PROJECT1.uvproj -z -o "c:\temp\log.txt" UV4 -b "C:\Keil\ARM\Example-mpw.uvmpw" -q -z -o "c:\temp\log.txt" | | -x | Enables DDE mode and returns complete command output. This option can be used only with the command -d. | | -y | Enables DDE mode and returns only command confirmations. This option can be used only with the command -d. |
µVision sets the ERRORLEVEL after each build process to indicate the status. Refer to the Windows-help for information about ERRORLEVEL. The values are listed below: | ERRORLEVEL | Description |
|---|
| 0 | No Errors or Warnings | | 1 | Warnings Only | | 2 | Errors | | 3 | Fatal Errors | | 11 | Cannot open project file for writing | | 12 | Device with given name in not found in database | | 13 | Error writing project file | | 15 | Error reading import XML file |
Examples: Related Knowledgebase Articles |
|