Name
VfrCompile.exe – Compile the framework VFR and UEFI VFR file to UEFI IFR opcode table and binary.
Synopsis
VfrCompile [options] VfrFile
Description
VfrCompile is used to parse the preprocessed UEFI and Framework VFR file to generate UEFI IFR opcode table, Binary Data and IFR listing file. This tool bases on the antlr parser to implement VFR syntax parser. The generated UEFI IFR opcode table is stored in autogen VfrFileNameBin.c, the global data variable is named to VfrFileNameBin that cantains IFR opcode table. Driver source code always uses this global data to register HII form package and show this page. The generated UEFI IFR opcode binary file is VfrFileName.hpk, which can also be registered into HII Form package. The generated IFR listing file is VfrFileName.lst, which lists each IFR opcode for each VFR statement for debug purpose.  The generated file will be placed into the output directory specified by -o option. If output directory is not specified, the generate file will be placed in current directory.
This tool is not a standalone tool. It is used together with the compiler preprocessor, EDKII trim tool. When compiler VFR file, VFR file first is preprocessed by Compiler, then the preprocessed output file is processed by trim to remove the unused definition, last step the file will be compiled by VfrCompile tool to generate the expected UEFI IFR opcode.
Options
VfrFile
The input file is UEFI or Framework VFR file, which has been preprocessed by Compiler and Trim tool. The generated output file is VfrFileName.c.
-o DIR, --output-directory DIR
All generated files will be placed into output directory. If this option is not specified, the default output directory is current directory.
-b, --create-ifr-package
Create an UEFI IFR Binary HII pack file. The generated file name is VfrFileName.hpk.
-l  create an output IFR listing file
Create an output IFR listing file (VfrFileName.lst) to list each IFR opcode for each VFR     statement.
-n, --no-pre-processing
Do not preprocessing input vfr file. The input VFR file has been procoessed. If this option is not specified, the default behavior is same to set this option. 
-c, --compatible-framework
Recognize the input VFR file is the framework VFR syntax. If this option is not specified, the UEFI syntax is default vfr syntax.
-h, --help
Print version and usage of this program and exit.
Example
1. Parse the preprocessed UEFI VFR file (Vfr_Uefi.iii) to generate the UEFI IFR opcode table in autogen C file (Vfr_Uefi.c).  
VfrCompile -n Vfr_Uefi.iii
2. Parse the preprocessed UEFI VFR file (Vfr_Uefi.iii) to generate the UEFI IFR opcode table in autogen C file (Vfr_Uefi.c) and UEFI IFR Binary File (Vfr_Uefi.hpk)
VfrCompile -n -b Vfr_Uefi.iii
3. Parse the preprocessed UEFI VFR file (Vfr_Uefi.iii) to generate the UEFI IFR opcode table in autogen C file (Vfr_Uefi.c) and UEFI IFR Binary File (Vfr_Uefi.hpk) and IFR listing file (Vfr_Uefi.lst)
VfrCompile -n -b -l Vfr_Uefi.iii
4. Parse the preprocessed Framework VFR file (Vfr_Framework.iii) to generate the UEFI IFR opcode table in autogen C file (Vfr_Framework.c).  
VfrCompile -n -c Vfr_Framework.iii
Bugs
No known bugs.
Report bugs to issues@buildtools.tianocore.org
Files
None
See also
None
License
Copyright (c) 2007-2009 Intel Corporation. All rights reserved
This program and the accompanying materials are licensed and made available 
under the terms and conditions of the BSD License which accompanies this 
distribution.  The full text of the license may be found at
http://opensource.org/licenses/bsd-license.php

THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.