Keil Logo

Command Line

You may invoke the µVision3 IDE from the command line. Various command-line arguments may be used to build a project file, start the debugger, and download programs to flash memory. The command line syntax is:

UV3 <[>command<]> <[>projectfile<]> <[>options<]>

Where

command is one of the commands listed below. If no command is specified µVision3 opens the project file in interactive Build Mode.
projectfile is the name of a project file. µVision3 project files have the extension .UV2. If no project file is specify, µVision3 opens the last project file used.
options are additional options that specify the project target name or output file of a build process.
Command Description
-b Build the project and exit after the build process is complete. For example:

Example: UV3 -b PROJECT1.UV2
-d Start µVision3 Debugging Mode. You can use this command together with a Debug Initialization File to execute automated test procedures. µVision will exit after debugging is completed with the EXIT command or stop debug session. For example:

UV3 -d PROJECT1.UV2
-r Re-translate the project and exit after the build process is complete. For example:

UV3 -r PROJECT1.UV2 -t"Simulator"
-f Use the Flash Download command for programming of the project and exit after the download process is complete. For example:

UV3 -f PROJECT1.UV2 -t"MCB2100 Board"

The Commands listed above may be combined with the following Options.

Option Description
-t targetname Open the project and set the specified target as current target. This option can be used in combination with other µVision commands The following example builds the target MCB2100 Board defined in the PROJECT1.UV2 file. For example

UV3 -b PROJECT1.UV2 -t"MCB2100 Board"

Note

  • If the -t command option is not specified µVision uses the target which was set as current target in the last project session.
-o outputfile Copy output of the Output Window — Build page to the specified file. For example:

UV3 -r PROJECT1.UV2 -o"listmake.prn"
-x Enable DDE mode and return complete command output.

Note

  • This option can be used only in combination with the -d command.
-y Enable DDE mode and return only command confirmations.

Note

  • This option can be used only in combination with the -d command.

After a build process µVision sets the ERRORLEVEL to indicate the status. Values are listed in the following table:

ERRORLEVEL Description
0 No Errors or Warnings
1 Warnings Only
2 Fatal Errors or Errors (and possibly Warnings)

You can access the ERRORLEVEL in batch files. Refer to the Windows command reference or to batch commands in the Windows on-line help for more information on ERRORLEVEL or batch files.

  Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.

Change Settings

Privacy Policy Update

Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.