2 * Miscellaneous instructions for building and using the iASL compiler.
5 Last update: 24 October 2012
8 1) Generating iASL from source
9 ------------------------------
11 Generation of the ASL compiler from source code requires these items:
13 1) The ACPICA source code tree.
14 2) An ANSI C compiler.
15 3) The Flex (or Lex) lexical analyzer generator.
16 4) The Bison (or Yacc) parser generator.
18 There are three major ACPICA source code components that are required to
19 generate the compiler (Basically, the entire ACPICA source tree should
22 1) The ASL compiler source.
23 2) The ACPICA Core Subsystem source. In particular, the Namespace
24 Manager component is used to create an internal ACPI namespace
25 and symbol table, and the AML Interpreter is used to evaluate
27 3) The "common" source directory that is used for all ACPI components.
30 1a) Notes for Linux/Unix generation
31 -----------------------------------
33 On Linux/Unix systems, the following commands will build the compiler:
35 cd acpica (or cd acpica/generate/unix)
39 iASL has been generated with these versions of Flex/Bison:
45 1b) Notes for Windows generation
46 --------------------------------
48 On Windows, the Visual Studio 2008 project file appears in this directory:
50 generate/msvc9/AcpiComponents.sln
52 The Windows versions of GNU Flex/Bison must be installed, and they must
53 be installed in a directory that contains no embedded spaces in the
54 pathname. They cannot be installed in the default "c:\Program Files"
55 directory. This is a bug in Bison. The default Windows project file for
56 iASL assumes that these tools are installed at this location:
60 Once the tools are installed, ensure that this path is added to the
61 default system $PATH environment variable:
65 At this point, you will need to reboot Windows to make system aware of
68 iASL has been generated with these versions of Flex/Bison for Windows:
70 Flex for Windows: V2.5.4a
71 Bison for Windows: V2.4.1
73 Flex is available at: http://gnuwin32.sourceforge.net/packages/flex.htm
74 Bison is available at: http://gnuwin32.sourceforge.net/packages/bison.htm
78 2) Integration as a custom tool for Visual Studio
79 -------------------------------------------------
81 This procedure adds the iASL compiler as a custom tool that can be used
82 to compile ASL source files. The output is sent to the VC output
85 a) Select Tools->Customize.
87 b) Select the "Tools" tab.
89 c) Scroll down to the bottom of the "Menu Contents" window. There you
90 will see an empty rectangle. Click in the rectangle to enter a
93 d) Type "iASL Compiler" in the box and hit enter. You can now edit
94 the other fields for this new custom tool.
96 e) Enter the following into the fields:
98 Command: C:\Acpi\iasl.exe
99 Arguments: -vi "$(FilePath)"
100 Initial Directory "$(FileDir)"
101 Use Output Window <Check this option>
103 "Command" must be the path to wherever you copied the compiler.
104 "-vi" instructs the compiler to produce messages appropriate for VC.
105 Quotes around FilePath and FileDir enable spaces in filenames.
109 These steps will add the compiler to the tools menu as a custom tool.
110 By enabling "Use Output Window", you can click on error messages in
111 the output window and the source file and source line will be
112 automatically displayed by VC. Also, you can use F4 to step through
113 the messages and the corresponding source line(s).
117 3) Integrating iASL into a Visual Studio ASL project build
118 ----------------------------------------------------------
120 This procedure creates a project that compiles ASL files to AML.
122 a) Create a new, empty project and add your .ASL files to the project
124 b) For all ASL files in the project, specify a custom build (under
125 Project/Settings/CustomBuild with the following settings (or similar):
128 c:\acpi\libraries\iasl.exe -vs -vi "$(InputPath)"
131 $(InputDir)\$(InputPath).aml