User`s guide

4 Debugging Your BSP
4.2 Basic Debugging Techniques
123
4
void sysPrintDebug(char *msg)
{
unsigned long msgIx;
int pollStatus;
for (msgIx = 0; msgIx < strlen(msg); msgIx++)
{
do
pollStatus = sioPollOutput (sysSerialChanGet(0), msg[msgIx]);
while ( pollStatus == EAGAIN );
}
}
To produce both carriage return and line feed, format your end lines with “\r\n”.
For example:
sysPrintDebug("Made it to sysHwInit2().\r\n");
4.2.4 Verifying the Image and OS Configuration
This section discusses how to confirm that your VxWorks is properly configured
and your image includes the proper VxWorks components.
Post-Processed Compiler Output
When building a VxWorks image, many compile-time macros are expanded, and
it is sometimes difficult to know what the actual numeric values of these macros
are and which branch of conditionally compiled code is being used. The bootrom
code, in particular, contains many conditional compilations. One way to find this
information is to retrieve the post-processed compiler output.
To retrieve the post-processor output for a given object module, use the following
command:
make ADDED_CFLAGS=-E file.o > file.i
Then, remove all of the lines starting with # and all blank lines.
Next, check the code to see what sections have been included and what values are
being used.
Operating System Components Built Into the Image
The first step in debugging is to make sure the executable image contains the
operating system components you desire.