I am experiencing a very bizarre problem with vxWorks and I am hoping that someone might be able to offer some suggestions on where to start looking to determine the root of the problem.
VxWorks is being used on a Synergy Microsystems VME SBC which is PPC based. The problem seems to arise at random times after rebuilding the OS image. For instance, by commenting out a single 'printf' statement such as "printf("Message Received\n"); in an application level piece of code that is not even invoked; and rebuilding the image, the image can hang while booting (early in the boot procedure). Uncomment this 'printf' statement, rebuild the image, and the OS will boot without error. Note that this routine is not called at any time during the boot procedure so the code containing that printf is never even executed.
This problem has been experienced by multiple developers on different modules. I am not sure if this is a hardware, or a software type of problem. Can anyone think of any reason why something as non-intrusive as commenting out a printf statement, in a function that is never even invoked, would cause the OS to hang during boot?
The printf statement is only adding a handful of bytes to the resultant image and larger images than the ones that fail have been booted successfully.
Similar hangs have been produced by changing array sizes in uncalled routines, etc., (i.e., add a few more bytes to an array in an uncalled function and the images hangs during boot, add a few more bytes and the image loads fine).