2 * Miscellaneous instructions for building and using the iASL compiler.
4 Last update 9 December 2013.
7 1) Generating iASL from source
8 ------------------------------
10 Generation of the ASL compiler from source code requires these items:
12 1) The ACPICA source code tree.
13 2) An ANSI C compiler.
14 3) The Flex (or Lex) lexical analyzer generator.
15 4) The Bison (or Yacc) parser generator.
17 There are three major ACPICA source code components that are required to
18 generate the compiler (Basically, the entire ACPICA source tree should
21 1) The ASL compiler source.
22 2) The ACPICA Core Subsystem source. In particular, the Namespace
23 Manager component is used to create an internal ACPI namespace
24 and symbol table, and the AML Interpreter is used to evaluate
26 3) The "common" source directory that is used for all ACPI components.
29 1a) Notes for Linux/Unix generation
30 -----------------------------------
32 iASL has been generated with these versions of Flex/Bison:
37 Other required packages:
41 m4 (macro processor required by bison)
43 On Linux/Unix systems, the following commands will build the compiler:
45 cd acpica (or cd acpica/generate/unix)
50 1b) Notes for Windows generation
51 --------------------------------
53 On Windows, the Visual Studio 2008 project file appears in this directory:
55 generate/msvc9/AcpiComponents.sln
57 The Windows versions of GNU Flex/Bison must be installed, and they must
58 be installed in a directory that contains no embedded spaces in the
59 pathname. They cannot be installed in the default "c:\Program Files"
60 directory. This is a bug in Bison. The default Windows project file for
61 iASL assumes that these tools are installed at this location:
65 Once the tools are installed, ensure that this path is added to the
66 default system $Path environment variable:
70 Goto: ControlPanel/System/AdvancedSystemSettings/EnvironmentVariables
72 Important: Now Windows must be rebooted to make the system aware of
73 the updated $Path. Otherwise, Bison will not be able to find the M4
74 interpreter library and will fail.
76 iASL has been generated with these versions of Flex/Bison for Windows:
78 Flex for Windows: V2.5.4a
79 Bison for Windows: V2.4.1
81 Flex is available at: http://gnuwin32.sourceforge.net/packages/flex.htm
82 Bison is available at: http://gnuwin32.sourceforge.net/packages/bison.htm
86 2) Integration as a custom tool for Visual Studio
87 -------------------------------------------------
89 This procedure adds the iASL compiler as a custom tool that can be used
90 to compile ASL source files. The output is sent to the VC output
93 a) Select Tools->Customize.
95 b) Select the "Tools" tab.
97 c) Scroll down to the bottom of the "Menu Contents" window. There you
98 will see an empty rectangle. Click in the rectangle to enter a
101 d) Type "iASL Compiler" in the box and hit enter. You can now edit
102 the other fields for this new custom tool.
104 e) Enter the following into the fields:
106 Command: C:\Acpi\iasl.exe
107 Arguments: -vi "$(FilePath)"
108 Initial Directory "$(FileDir)"
109 Use Output Window <Check this option>
111 "Command" must be the path to wherever you copied the compiler.
112 "-vi" instructs the compiler to produce messages appropriate for VC.
113 Quotes around FilePath and FileDir enable spaces in filenames.
117 These steps will add the compiler to the tools menu as a custom tool.
118 By enabling "Use Output Window", you can click on error messages in
119 the output window and the source file and source line will be
120 automatically displayed by VC. Also, you can use F4 to step through
121 the messages and the corresponding source line(s).
125 3) Integrating iASL into a Visual Studio ASL project build
126 ----------------------------------------------------------
128 This procedure creates a project that compiles ASL files to AML.
130 a) Create a new, empty project and add your .ASL files to the project
132 b) For all ASL files in the project, specify a custom build (under
133 Project/Settings/CustomBuild with the following settings (or similar):
136 c:\acpi\libraries\iasl.exe -vs -vi "$(InputPath)"
139 $(InputDir)\$(InputPath).aml