Keil Logo

Key Sequence for Tool Parameters

A key sequence may be used to pass arguments from the µVision3 environment to external user programs. Key sequences can be applied in the Tools menu, SVCS menu, and the Run User Program arguments in the Options for Target — Output dialog. A key sequence is a combination of a Key Code and a File Code. The available Key Codes and File Codes are listed in the tables below:

Key Code Specifies the path selected with the File Code
% filename with extension, but without path specification (PROJECT1.UV2)
# filename with complete path specification (C:\MYPROJECT\PROJECT1.UV2)
@ filename without extension and path specification (PROJECT1)
$ folder name of the file specified in the file code (C:\MYPROJECT)
! filename with relative path specification to the current folder (SRC\TEST.C)
~ † line number of current cursor position (only valid for file code F)
^ † column number of current cursor position (only valid for file code F)

† the key code ~ and ^ can be used only in combination with the file code F
To use $, #, %, @, ~ or ^ in the user program command line, use $$, ##, %%, @@, ~~ or ^^.
For example @@ gives a single @ in the user program command line.

File Code Specifies the file name or argument inserted in the user program line
$D the device name selected from the µVision3 Device Database.
E current in focus Editor File.
F depending on the context this file code returns:
  • the file selected in the Project WorkspaceFiles tab.
  • the current active editor file.
  • the file that is currently translated by a build process.
K Development Tools Root Folder (C:\Keil)
L linker output file, typical the executable file for debugging (PROJECT1)
H application HEX file (PROJECT1.H86)
P name of the current project file (PROJECT1.UV2)
X for Key Code %, # @: µVision3 executable program file (C:\Keil\UV3\UV3.EXE)
$X for Key Code $: XTAL clock frequency in MHz selected under Options for Target — Target — XTAL.
^X for Key Code ^: XTAL clock frequency in kHz selected under Options for Target — Target — XTAL.

The following file codes are used for SVCS systems:

Q † file name that holds comments for the SVCS system.
R † string that holds a revision number for the SVCS system.
C † string that holds a check point string for the SVCS system.
I † string that holds a the SVCS - Configure Version Control - Project Ident string for the SVCS system.
U † user name specified under SVCS — Configure Version Control — User Name
V † file name specified under SVCS — Configure Version Control — Database

† the file codes Q, R, C, U and V can be used only in combination with the key code %

  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.