Eric,

One of the reasons the trim tool is used is to support usage of C macros in ASL 
files
(ASL files may include C header files and are processed by a C preprocessor).
This is edk2 way of reusing the same constant definition across source files in 
different formats.

From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of 
erik.schma...@intel.com
Sent: Thursday, April 04, 2019 3:08 PM
To: devel@edk2.groups.io
Subject: [edk2-devel] ASL build tools - EDKII trim tool questions


Hello,

I work on the ACPICA project (iASL, acpidump, acpiexec, and etc). I’ve been 
looking at the EDKII repository and tools that relate to ACPI and ASL.

In particular, I’ve been looking at the trim tool 
https://github.com/tianocore/edk2/blob/master/BaseTools/Source/Python/Trim/Trim.py

According to the source code, the “--asl-file” option replaces #include and 
Include (a.k.a. the “ASL include”) with actual contents of the file.

I would prefer everyone to use iASL compiler to do this instead. The problem 
with trim is that it makes iASL compiler errors more difficult to understand 
because the original file has been preprocessed by trim and the line numbers 
from iASL remarks/warnings/errors do not make sense to the programmer... The 
iASL compiler handles ASL include statements as well as preprocessor #include 
statements. When compiling these files with include statements/directives, iASL 
displays the correct line number and file name of the included file. Therefore, 
I think it would be beneficial to developers to use only iASL rather than trim 
"--asl-files" and iASL to work on ASL files.

I've been talking to some people internally about this trim tool but I would 
like to ask this community if anyone has thoughts/opinions on deprecating 
trim's ASL option.

Thanks,

Erik




Please consider the environment before printing this email.

The information contained in this message may be confidential and proprietary 
to American Megatrends, Inc.  This communication is intended to be read only by 
the individual or entity to whom it is addressed or by their designee. If the 
reader of this message is not the intended recipient, you are on notice that 
any distribution of this message, in any form, is strictly prohibited.  Please 
promptly notify the sender by reply e-mail or by telephone at 770-246-8600, and 
then delete or destroy all copies of the transmission.

-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#4214): https://edk2.groups.io/g/devel/message/4214
Mute This Topic: https://groups.io/mt/30900146/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to