Keil Logo

Via file syntax rules

12.2 Via file syntax rules

Via files must conform to some syntax rules.

  • A via file is a text file containing a sequence of words. Each word in the text file is converted into an argument string and passed to the tool.
  • Words are separated by whitespace, or the end of a line, except in delimited strings, for example:
    --c90 --strict (two words)
    --c90--strict (one word)
  • The end of a line is treated as whitespace, for example:
    --c90
    --strict
    
    This is equivalent to:
    --c90 --strict
  • Strings enclosed in quotation marks ("), or apostrophes (') are treated as a single word. Within a quoted word, an apostrophe is treated as an ordinary character. Within an apostrophe delimited word, a quotation mark is treated as an ordinary character.
    Use quotation marks to delimit filenames or path names that contain spaces, for example:
    -I C:\My Project\includes (three words)
    -I "C:\My Project\includes" (two words)
    Use apostrophes to delimit words that contain quotes, for example:
    -DNAME='"ARM Compiler"' (one word)
  • Characters enclosed in parentheses are treated as a single word, for example:
    --option(x, y, z) (one word)
    --option (x, y, z) (two words)
  • Within quoted or apostrophe delimited strings, you can use a backslash (\) character to escape the quote, apostrophe, and backslash characters.
  • A word that occurs immediately next to a delimited word is treated as a single word, for example:
    -I"C:\Project\includes"
    This is treated as the single word:
    -IC:\Project\includes
  • Lines beginning with a semicolon (;) or a hash (#) character as the first nonwhitespace character are comment lines. A semicolon or hash character that appears anywhere else in a line is not treated as the start of a comment, for example:
    -o objectname.axf      ;this is not a comment
    A comment ends at the end of a line, or at the end of the file. There are no multi-line comments, and there are no part-line comments.
  • Lines that include the preprocessor option -Dsymbol="value" must be delimited with a single quote, either as '-Dsymbol="value"' or as -Dsymbol='"value"'. For example:
    -c -DFOO_VALUE='"FOO_VALUE"'
    
Related concepts
Related reference
Non-ConfidentialPDF file icon PDF versionARM DUI0375H
Copyright © 2007, 2008, 2011, 2012, 2014-2016 ARM. All rights reserved. 
  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.