Windows Embedded Compact 2013–Setting up debug information
Every Windows based program, DLL and Lib has an option to store the debug information either in the Object (OBJ) file, PDB file (Program Database) or produce no debug information. Following link explains the various options to store the debug information for application development using Visual Studio. We can change this option with the project properties as shown in the below link.
/Z7, /Zi, /ZI (Debug Information Format)
Setting Debug Information on Windows Embedded Compact 2013
Let me explain how to set the same for Windows Embedded Compact 2013 BSP development. There are two options to do that, one is from the platform builder UI on VS2012.
You can right click any driver/lib/application as shown below in the platform builder.
Click the properties ->C/C++ tab as shown below.
Option 2 is to modify the Sources file directly by playing with the C_DEBUG_INFO_FLAG option as shown below figures.
Fig c) Debug info embed in to Obj file
Fig d) Debug info stored in a separate PDB file
Fig e) No debug info stored
Let us see how this flags are getting effected. Sources file variables are processed by Makefile.def which is included in every build directory Makefile. This Makefile.def is available in \WINCE800\public\common\oak\misc directory. Following figure shows that how C_DEBUG_INFO_FLAG is handled.
Suppress Linker Warning LNK4099
Many situation we may ship only the binary drivers and we may miss the PDB files. We using these binaries in other projects. Building drivers may generate warning LNK4099 PDB ‘filename’ was not found. To avoid these warning, Driver/BSP vendor can set the C_DEBUG_INFO_FLAG=-Z7 to embed the debug info in to the binaries before release. Note, this may increase the binary size. Keep in mind and play with this where ever it is really require.