Keil™, An ARM® Company

Technical Support

µVISION1: APPLICATION MANAGER STRING SUBSTITUTIONS


Information in this article applies to:

  • µVision Version 1

QUESTION

I'm trying to setup an application program in µVision that will run Lint with a project specific option file. I can't figure out how to setup application programs that can navigate to the current project directory. Is there any kind of environment variable that contains this information?

ANSWER

Yes. In µVision, you can create substitution strings in the Application Manager. String substitution lets you pass the complete path specification, directory, or filename with or without the extension to applications you add to µVision.

You can pass the names for the current project, the current file, the current project's HEX file, the current project's absolute object file (output from the linker), and the directory from which µVision was invoked.

String substitution is performed by inserting a special key sequence in the command, directory, and argument input lines in the Application Manager dialog box. Key sequences are formatted as a Keycode and a Filecode.

The following keycodes may be used.

  • $ -- Directory (C:\C51\PROJ\)
  • # -- Full Pathspec (C:\C51\PROJ\HELLO.PRJ)
  • % -- Filename with extension (HELLO.PRJ)
  • @ -- Filename without extension (HELLO)

The following filecodes may be used.

  • P -- Project File (C:\C51\PROJ\HELLO.PRJ)
  • F -- Current in-focus file (C:\C51\PROJ\HELLO.C)
  • X -- µVision program file location (C:\C51\BIN\UVW51.EXE)
  • H -- Project HEX file (C:\C51\PROJ\HELLO.HEX)
  • L -- Linker absolute object file (C:\C51\PROJ\HELLO)

To use $,#,%, or @ in the command line, use $$, ##, %%, or @@. For example, #P yields the full pathspec of the project, $x yields the directory from which µVision was executed, @@ yields @.

Last Reviewed: Wednesday, June 16, 2004


Did this article provide the answer you needed?
 
Yes
No
Not Sure