KEIL MDK 自定义工具时的命令行参数



在keil中启动VS2010时的设置

Command:C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\devenv.exe

Arguments:/EDIT $F%F


Run Independent中打钩



另外在VS2010加入keil中用到的目录

1.先打开任意一个VC项目,再打开VS2010的属性管理器(视图->其他窗口->属性管理器

2.双击任意“Microsoft.Cpp.Win32.user”,弹出属性页,在VC++里面增加目录。该设置对所有VC项目都有效。


Key Sequence for Tool Parameters

Use Key Sequences to pass arguments from µVision to external user programs. Key Sequences are combinations of a Key Code and a File Code. Key sequences can be used, for example, in the dialogs Tools, SVCS, Options for Target — User, or from the command line. The following rules apply:

  • Certain Key Codes have to be duplicated when used from the command line.
    To use the symbols $, #, %, @, ~, ^
    escape them with $$, ##, %%, @@, ~~, ^^.
  • Enclose Key Sequences within quotes (" ") when using folder names that might contain special characters (space, ~, or #).

Key Codes and File Codes are listed in the tables below:

Key Code Description
% File name with extension, but without path specification (PROJECT1.UVPROJ)
# File name with extention and complete path specification (C:\MYPROJECT\PROJECT1.UVPROJ)
@ File name without extension or path specification (PROJECT1)
$ Folder name of the file specified in the File Code (C:\MYPROJECT)
! File name with extention and relative path specification to the current folder (SRC\TEST.C)
~ 1 Line number of the current cursor position
^ 1 Column number of the current cursor position
File Code Description
$D Device name as selected from the Device Database.
E Editor file name currently in focus.
F Depending on the context, this File Code returns:
  • The file selected in the window Project.
  • The currently active editor file.
  • The file that is currently translated by a build process.
H Application HEX file name (PROJECT1.H86).
K Root folder of the development tool (C:\Keil).
L Linker output file. Typically the executable file used for debugging (PROJECT1).
$M CPU mask revision number.
P Current project file name (PROJECT1.UVPROJ).
$W Expands the path with the root folder of a multiple-project. Applies to
  • SmartCard multiple-projects.
  • *.ini files. Not usable in interactive mode.
LOAD $Wres/obj/um.abs INCREMENTAL ?
LOAD C:/multiproj/subproj/res/obj/um.abs INCREMENTAL
X For Key Code %, # @: µVision executable program file (C:\Keil\UV4\UV4.EXE).
$X For Key Code $: XTAL clock frequency in MHz as specified in Options for Target — Target — XTAL.
^X For Key Code ^: XTAL clock frequency in kHz as specified in Options for Target — Target — XTAL.
The following File Codes are valid when using a SVCS system
Q 2 Name of the temporary file that contains comments (Comment).
R 2 Revision number (Revision).
C 2 Check point string (Check Point).
I 2 Project identification string (Project Ident).
U 2 User name (User Name).
V 2 Database file name string (Database).
  • 1 only in combination with the File Code F.
  • 2 only in combination with the Key Code %.

你可能感兴趣的:(KEIL MDK 自定义工具时的命令行参数)