summaryrefslogtreecommitdiffstats
path: root/AppPkg
diff options
context:
space:
mode:
authorLee Leahy <leroy.p.leahy@intel.com>2013-11-19 02:37:37 +0000
committerlpleahy <lpleahy@6f19259b-4bc3-4df7-8a09-765794883524>2013-11-19 02:37:37 +0000
commit86e9f87ec895a0beb5de35fd82e504ac9347e999 (patch)
tree3c8a94182ce771fa764efb108b9e8b535eb96e59 /AppPkg
parent3aa8dc6cd37d9487e32d24e49e63267df9b9cccb (diff)
downloadedk2-86e9f87ec895a0beb5de35fd82e504ac9347e999.tar.gz
edk2-86e9f87ec895a0beb5de35fd82e504ac9347e999.tar.bz2
edk2-86e9f87ec895a0beb5de35fd82e504ac9347e999.zip
Enable the build command override the .DSC file contents to enable debug output and specify which debug messages are displayed. An example:
build -a IA32 -a X64 -t VS2008x86 -p AppPkg/AppPkg.dsc -b DEBUG -D DEBUG_ENABLE_OUTPUT=TRUE -D DEBUG_PROPERTY_MASK=0x27 -D DEBUG_PRINT_ERROR_LEVEL=0xFCF00040 Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Lee Leahy <leroy.p.leahy@intel.com> Reviewed-by: Daryl McDaniel <daryl.mcdaniel@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14859 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'AppPkg')
-rw-r--r--AppPkg/AppPkg.dsc23
1 files changed, 15 insertions, 8 deletions
diff --git a/AppPkg/AppPkg.dsc b/AppPkg/AppPkg.dsc
index 23ebf47733..d0aac2c509 100644
--- a/AppPkg/AppPkg.dsc
+++ b/AppPkg/AppPkg.dsc
@@ -27,11 +27,18 @@
BUILD_TARGETS = DEBUG|RELEASE
SKUID_IDENTIFIER = DEFAULT
+#
+# Debug output control
+#
+ DEFINE DEBUG_ENABLE_OUTPUT = FALSE # Set to TRUE to enable debug output
+ DEFINE DEBUG_PRINT_ERROR_LEVEL = 0x80000040 # Flags to control amount of debug output
+ DEFINE DEBUG_PROPERTY_MASK = 0
+
[PcdsFeatureFlag]
[PcdsFixedAtBuild]
- gEfiMdePkgTokenSpaceGuid.PcdDebugPropertyMask|0x00
- gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel|0x80000040
+ gEfiMdePkgTokenSpaceGuid.PcdDebugPropertyMask|$(DEBUG_PROPERTY_MASK)
+ gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel|$(DEBUG_PRINT_ERROR_LEVEL)
[PcdsFixedAtBuild.IPF]
@@ -53,12 +60,12 @@
MemoryAllocationLib|MdePkg/Library/UefiMemoryAllocationLib/UefiMemoryAllocationLib.inf
UefiBootServicesTableLib|MdePkg/Library/UefiBootServicesTableLib/UefiBootServicesTableLib.inf
UefiRuntimeServicesTableLib|MdePkg/Library/UefiRuntimeServicesTableLib/UefiRuntimeServicesTableLib.inf
- #
- # To enable debugging:
- # Enable ONE of the following DebugLib instances, as appropriate for your platform.
- #
- DebugLib|MdePkg/Library/BaseDebugLibNull/BaseDebugLibNull.inf
-# DebugLib|MdePkg/Library/UefiDebugLibConOut/UefiDebugLibConOut.inf
+ !if $(DEBUG_ENABLE_OUTPUT)
+ DebugLib|MdePkg/Library/UefiDebugLibConOut/UefiDebugLibConOut.inf
+ DebugPrintErrorLevelLib|MdePkg/Library/BaseDebugPrintErrorLevelLib/BaseDebugPrintErrorLevelLib.inf
+ !else ## DEBUG_ENABLE_OUTPUT
+ DebugLib|MdePkg/Library/BaseDebugLibNull/BaseDebugLibNull.inf
+ !endif ## DEBUG_ENABLE_OUTPUT
DevicePathLib|MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.inf
PeCoffGetEntryPointLib|MdePkg/Library/BasePeCoffGetEntryPointLib/BasePeCoffGetEntryPointLib.inf