I have been struggling with several odd PB problems that turned out to all be
caused by the same thing. The problems were:
1) Sometimes a project change would create a non-booting nk.bin image
(failed soon out of OemInit), and backing out the change didn't work; the
project remained corrupted and required reload of WINCE500 folder tree.
2) Copying a working WINCE500 folder tree to another machine and Sysgening
produced a non-booting nk.bin image.
3) Putting PBWorkspaces and BSP source files under source control without
changing any files caused the next Sysgen to produce a non-booting nk.bin
image.
The problem turned out to be that at some time in the distant past,
something caused PB to add lines like this to xxxxx.pbxml:
<string>IMGLOADNETHIGH=1</string>
The IMGLOADNETHIGH parameter had not previously been turned on, as far as I
know, and the working build of nk.bin was created with the option off.
This addition of IMGLOADNETHIGH to the pbxml file should have caused the
next Sysgen to rebuild any files that referenced this symbol in #if etc. (In
particular, in my case with the Intel 465 BSP, the file
Src/Kernel/Hal/cfw_ixp425.c should have been out-of-date after that symbol
was added to the pbxml file). However, this did not happen. If it had,
those files would have recompiled, and the resulting nk.bin would have failed
during booting, and the programmer would have looked for something he just
did to cause it to fail.
Instead, what happens is that the next time you touch a file in the
dependency tree of any file that uses IMGLOADNETHIGH, it triggers recompile
of that file, and at that time, the nk.bin stops working, and you have no
idea why.
I do not know why turning on the IMGLOADNETHIGH option should fail; perhaps
it has never been fully implemented in my particular BSP.
There was no way to examine the value of IMGLOADNETHIGH from PB. It didn't
show it anywhere. To fix this problem, I had to manually edit the .pbxml
file, delete the IMGLOADNETHIGH lines (two of them), touch some files that
used the symbol in order to trigger recompile, and do a Sysgen. The nk.bin
then worked.
I have no idea what caused the symbol line to be added to the .pbxml in the
first place.