]> git.proxmox.com Git - mirror_edk2.git/blame - BaseTools/UserManuals/Trim_Utility_Man_Page.rtf
Fix bug in DataHub where it would skip the first record in a set when a filter is...
[mirror_edk2.git] / BaseTools / UserManuals / Trim_Utility_Man_Page.rtf
CommitLineData
40d841f6
LG
1{\rtf1\ansi\ansicpg1252\deff0\deflang1033\deflangfe2052\deftab360{\fonttbl{\f0\fswiss\fprq2\fcharset0 Verdana;}{\f1\froman\fprq2\fcharset0 Times New Roman;}{\f2\fmodern\fprq1\fcharset0 Courier New;}{\f3\fswiss\fprq2\fcharset0 Arial;}}\r
2{\colortbl ;\red8\green96\blue168;\red0\green0\blue0;}\r
3{\stylesheet{ Normal;}{\s1 heading 1;}{\s2 heading 2;}}\r
4{\*\generator Msftedit 5.41.15.1515;}\viewkind4\uc1\pard\keep\keepn\nowidctlpar\s2\li-1440\sb400\sa60\sl-340\slmult0\cf1\b\f0\fs28 Name\par\r
5\pard\nowidctlpar\sb200\cf2\b0\fs18 Trim.exe or Trim.py \endash Convert the preprocessed source files by C compiler to the expected style file to be processed further by EDKII tool.\f1\par\r
6\pard\keep\keepn\nowidctlpar\s2\li-1440\sb400\sa60\sl-340\slmult0\tx1440\cf1\b\f0\fs28 Synopsis\par\r
7\pard\nowidctlpar\sb200\cf2\fs18 trim [-s|-r|-a|-8] [-c] [-v|-d <debug_level>|-q] [-o <output_file>] <input_file>\f1\par\r
8\pard\keep\keepn\nowidctlpar\s2\li-1440\sb400\sa60\sl-340\slmult0\cf1\f0\fs28 Description\par\r
9\pard\nowidctlpar\sb200\cf2\b0\fs18 Trim tool is used to process the preprocessed file by Compiler to remove the unused content to generate the file to be processed further by EDKII tools.\f1\par\r
10\f0 Trim tool can also be used to process the source file to generate the expected source file to work with EDKII build system and EDKII core code. \f1\par\r
11\f0 Trim tool is a usual tool to process the source file to generate the file that can be used in EDKII build system. It extends EDKII build system to support more source file type.\f1\par\r
12\pard\keep\keepn\nowidctlpar\s2\li-1440\sb400\sa60\sl-340\slmult0\cf1\b\f0\fs28 Options\par\r
13\pard\nowidctlpar\sb200\cf2\fs18 input_file\par\r
14\tab\b0 The input file may be the preprocessed source code, the preprocessed VFR file, ASL file or R8 framework source file.\f1\par\r
15\b\f0 -s, --source-code \par\r
16\pard\li360\b0 The input file is preprocessed source code, including C or assembly code. All generated codes from the include header files are remove all. Only content in source file is kept.\f1\par\r
17\pard\nowidctlpar\sb200\b\f0 -r, --vfr-file \par\r
18\pard\li360\b0 The input file is preprocessed VFR file. All generated codes from the include header files are remove except for the typedef structure.\f1\par\r
19\pard\nowidctlpar\sb200\b\f0 -a, --asl-file \par\r
20\pard\fi360\b0 The input file is ASL file. The asl source include style Include(*.asi) will be changed to C style #include *.asi. The preprocessed asl file can be preprocessed by C compiler. \f1\par\r
21\pard\nowidctlpar\sb200\b\f0 -8, --r8-source-code \par\r
22\pard\li360\b0 The input file is the EDK style source code to be trimmed for ECP platform. Some EDK framework source file will be modified to work with EDKII thunk and core drivers. A window script tool \ldblquote ImportTool.bat\rdblquote is created to process a group of EDK framework source files in the same file directory. \cf0\f2\fs20\par\r
23\pard\nowidctlpar\sb200\cf2\b\f0\fs18 -c, --convert-hex \par\r
24\pard\fi360\b0 Convert standard hex format (0xabcd) to MASM format (abcdh).\f1\par\r
25\pard\nowidctlpar\sb200\b\f0 -o OUTPUTFILE, --output=OUTPUTFILE\par\r
26\pard\fi360\b0 The output file is to store the trimmed content.\f1\par\r
27\pard\nowidctlpar\sb200\b\f0 -v, --verbose\f1\par\r
28\b0\f0 \tab Run with verbose information.\f1\par\r
29\b\f0 -d LOGLEVEL, --debug=LOGLEVEL [0-9]\f1\par\r
30\pard\nowidctlpar\fi360\sb200\b0\f0 Enable debug messages at specified level.\par\r
31\pard\nowidctlpar\sb200\b -q, --quiet\f1\par\r
32\pard\nowidctlpar\fi360\sb200\b0\f0 Run with little information in quiet mode.\f1\par\r
33\pard\nowidctlpar\sb200\b\f0 --version\f1\par\r
34\pard\nowidctlpar\fi360\sb200\b0\f0 Show program's version number and exit\par\r
35\pard\nowidctlpar\sb200\b -h, -?, --help\par\r
36\pard\nowidctlpar\li360\sb200\b0 Show this help message and exit\f1\par\r
37\pard\keep\keepn\nowidctlpar\s2\li-1440\sb400\sa60\sl-340\slmult0\cf1\b\f0\fs28 Example\par\r
38\pard\nowidctlpar\sb200\cf2\b0\fs18 1. Trim the preprocessed source file (test.i) by C compiler to remove all generated codes from the include header files by this source file (test.s) to the output file test.iii, which only contains the content in this source file (test.s).\f1\par\r
39\b\f0 Trim --source-code -o test.iii test.i\f1\par\r
40\b0\f0 2. Trim the preprocessed source file (test.i) by C compiler to remove all generated codes from the include header files by this source file (test.asm) and convert standard hex format (0xabcd) to MASM format (abcdh) to the output file test.iii, which only contains the content in this source file (test.s).\par\r
41\b Trim --source-code --convert-hex -o test.iii test.i\f1\par\r
42\b0\f0 3. Trim the preprocessed source file (test.i) by C compiler to remove all generated codes from the include header files by this source file (test.vfr) except for the typedef structures to the output file (test.iii).\f1\par\r
43\b\f0 Trim --vfr-file -o test.iii test.i\f1\par\r
44\b0\f0 4. Trim ASL source file (test.asl) to convert the ASL style Include(*.asi) to the C style #include *.asi. The update ASL will output to test.i.\f1\par\r
45\b\f0 Trim --asl-file -o test.i test.asl\f1\par\r
46\b0\f0 5. Modify an EDK style framework source file to work with EDKII thunk and core drivers.\f1\par\r
47\b\f0 Trim --r8-source-code -o test.c test.c\f1\par\r
48\b0\f0 5. Modify all EDK style framework source files (*.c and *.h) in current directory to work with EDKII thunk and core drivers by the script \ldblquote ImportTool.bat\rdblquote .\f1\par\r
49\b\f0 ImportTool *.c\f1\par\r
50\f0 ImportTool *.h\par\r
51\f1\par\r
52\pard\keep\keepn\nowidctlpar\s2\li-1440\sb400\sa60\sl-340\slmult0\cf1\f0\fs28 Bugs\par\r
53\pard\nowidctlpar\sb200\cf2\b0\fs18 No known bugs.\par\r
54Report bugs to edk2-buildtools-devel@lists.sourceforge.net\f1\par\r
55\pard\keep\keepn\nowidctlpar\s2\li-1440\sb400\sa60\sl-340\slmult0\cf1\b\f0\fs28 Files\par\r
56\pard\nowidctlpar\sb200\cf2\b0\fs18 None\par\r
57\pard\keep\keepn\nowidctlpar\s2\li-1440\sb400\sa60\sl-340\slmult0\cf1\b\fs28 See also\par\r
58\pard\nowidctlpar\sb200\cf2\b0\fs18 None\par\r
59\pard\keep\keepn\nowidctlpar\s2\li-1440\sb400\sa60\sl-340\slmult0\cf1\b\fs28 License\par\r
60\pard\nowidctlpar\cf2\b0\fs18 Copyright (c) 2007 - 2009, Intel Corporation. All rights reserved.\par\r
61This program and the accompanying materials are licensed and made available \par\r
62under the terms and conditions of the BSD License which accompanies this \par\r
63distribution. The full text of the license may be found at\par\r
64http://opensource.org/licenses/bsd-license.php\par\r
65\par\r
66THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\par\r
67\pard\nowidctlpar\sb200 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\par\r
68\cf0\f1\par\r
69\pard\nowidctlpar\f3\fs20\par\r
70}\r
71\0