1 1.1.1.1.2.2 bouyer 2 1.1.1.1.2.2 bouyer Instructions for integrating iASL compiler into MS VC++ 6.0 environment. 3 1.1.1.1.2.2 bouyer 4 1.1.1.1.2.2 bouyer Part 1. Integration as a custom tool 5 1.1.1.1.2.2 bouyer 6 1.1.1.1.2.2 bouyer This procedure adds the iASL compiler as a custom tool that can be used 7 1.1.1.1.2.2 bouyer to compile ASL source files. The output is sent to the VC output 8 1.1.1.1.2.2 bouyer window. 9 1.1.1.1.2.2 bouyer 10 1.1.1.1.2.2 bouyer a) Select Tools->Customize. 11 1.1.1.1.2.2 bouyer 12 1.1.1.1.2.2 bouyer b) Select the "Tools" tab. 13 1.1.1.1.2.2 bouyer 14 1.1.1.1.2.2 bouyer c) Scroll down to the bottom of the "Menu Contents" window. There you 15 1.1.1.1.2.2 bouyer will see an empty rectangle. Click in the rectangle to enter a 16 1.1.1.1.2.2 bouyer name for this tool. 17 1.1.1.1.2.2 bouyer 18 1.1.1.1.2.2 bouyer d) Type "iASL Compiler" in the box and hit enter. You can now edit 19 1.1.1.1.2.2 bouyer the other fields for this new custom tool. 20 1.1.1.1.2.2 bouyer 21 1.1.1.1.2.2 bouyer e) Enter the following into the fields: 22 1.1.1.1.2.2 bouyer 23 1.1.1.1.2.2 bouyer Command: C:\Acpi\iasl.exe 24 1.1.1.1.2.2 bouyer Arguments: -e "$(FilePath)" 25 1.1.1.1.2.2 bouyer Initial Directory "$(FileDir)" 26 1.1.1.1.2.2 bouyer Use Output Window <Check this option> 27 1.1.1.1.2.2 bouyer 28 1.1.1.1.2.2 bouyer "Command" must be the path to wherever you copied the compiler. 29 1.1.1.1.2.2 bouyer "-e" instructs the compiler to produce messages appropriate for VC. 30 1.1.1.1.2.2 bouyer Quotes around FilePath and FileDir enable spaces in filenames. 31 1.1.1.1.2.2 bouyer 32 1.1.1.1.2.2 bouyer f) Select "Close". 33 1.1.1.1.2.2 bouyer 34 1.1.1.1.2.2 bouyer These steps will add the compiler to the tools menu as a custom tool. 35 1.1.1.1.2.2 bouyer By enabling "Use Output Window", you can click on error messages in 36 1.1.1.1.2.2 bouyer the output window and the source file and source line will be 37 1.1.1.1.2.2 bouyer automatically displayed by VC. Also, you can use F4 to step through 38 1.1.1.1.2.2 bouyer the messages and the corresponding source line(s). 39 1.1.1.1.2.2 bouyer 40 1.1.1.1.2.2 bouyer 41 1.1.1.1.2.2 bouyer Part 2. Integration into a project build 42 1.1.1.1.2.2 bouyer 43 1.1.1.1.2.2 bouyer This procedure creates a project that compiles ASL files to AML. 44 1.1.1.1.2.2 bouyer 45 1.1.1.1.2.2 bouyer a) Create a new, empty project and add your .ASL files to the project 46 1.1.1.1.2.2 bouyer 47 1.1.1.1.2.2 bouyer b) For all ASL files in the project, specify a custom build (under 48 1.1.1.1.2.2 bouyer Project/Settings/CustomBuild with the following settings (or similar): 49 1.1.1.1.2.2 bouyer 50 1.1.1.1.2.2 bouyer Commands: 51 1.1.1.1.2.2 bouyer c:\acpi\libraries\iasl.exe -vs -vi "$(InputPath)" 52 1.1.1.1.2.2 bouyer 53 1.1.1.1.2.2 bouyer Output: 54 1.1.1.1.2.2 bouyer $(InputDir)\$(InputPath).aml 55 1.1.1.1.2.2 bouyer 56 1.1.1.1.2.2 bouyer 57 1.1.1.1.2.2 bouyer 58 1.1.1.1.2.2 bouyer Compiler Generation From Source 59 1.1.1.1.2.2 bouyer 60 1.1.1.1.2.2 bouyer Generation of the ASL compiler from source code requires these items: 61 1.1.1.1.2.2 bouyer 62 1.1.1.1.2.2 bouyer 63 1.1.1.1.2.2 bouyer Required Tools 64 1.1.1.1.2.2 bouyer 1) The Flex (or Lex) lexical analyzer generator. 65 1.1.1.1.2.2 bouyer 2) The Bison (or Yacc) parser generator. 66 1.1.1.1.2.2 bouyer 3) An ANSI C compiler. 67 1.1.1.1.2.2 bouyer 68 1.1.1.1.2.2 bouyer 69 1.1.1.1.2.2 bouyer Required Source Code. 70 1.1.1.1.2.2 bouyer 71 1.1.1.1.2.2 bouyer There are three major source code components that are required to 72 1.1.1.1.2.2 bouyer generate the compiler: 73 1.1.1.1.2.2 bouyer 74 1.1.1.1.2.2 bouyer 1) The ASL compiler source. 75 1.1.1.1.2.2 bouyer 2) The ACPI CA Core Subsystem source. In particular, the Namespace Manager 76 1.1.1.1.2.2 bouyer component is used to create an internal ACPI namespace and symbol table, 77 1.1.1.1.2.2 bouyer and the AML Interpreter is used to evaluate constant expressions. 78 1.1.1.1.2.2 bouyer 3) The Common source for all ACPI components. 79 1.1.1.1.2.2 bouyer 80 1.1.1.1.2.2 bouyer 81 1.1.1.1.2.2 bouyer 82 1.1.1.1.2.2 bouyer 83 1.1.1.1.2.2 bouyer 84 1.1.1.1.2.2 bouyer 85 1.1.1.1.2.2 bouyer 86