One of my engineers was working on a new system today and was having a problem setting up a NAND flash disk. The problem was that while he had made a change to the registry to set up the start address and size of the disk, the changes just were not visible in when the OS ran. We both have a lot of experience developing and building Windows CE systems, so we checked the obvious things:
1. He saved Platform.reg where he made the changes
2. He copied Platform.reg to the _FLATRELEASEDIR
3. When makeimg ran, the changes made it to reginit.ini
4. He actually loaded the changed OS on the board and it was running
Then he came up with an idea, load the nk.bin in Visual Studio with Platform Builder 6.0. I have to admit that I didn’t think this would yield any useful information that we didn’t already have, but I wasn’t going to stop him. The next thing I heard from his office was that he had solved the problem. At that moment I realized the importance of what he had done.
If you haven’t opened an nk.bin with Platform Builder 6.0, you should do so to see what it can show you. When it comes to the registry, it can show you what values are in the boot hive vs. the system hive. In this case, it showed that his changes were not in the boot hive when they were needed, but instead were in the system hive which isn’t loaded until after the flash disk is already mounted.
To open an nk.bin in Platform Builder 6.0, use the Files menu select Open\File and select the file type “Windows CE Run-Time Images (*.bin; *.dio)”, then select your nk.bin. You can use this on nk.bin files created with previous versions of Platform Builder. When the nk.bin file is opened you will see it displayed with a list of files included in the OS, the system hive and the boot hive.
Even if you are working with older version of Windows CE, you might find it valuable to have Platform Builder 6.0 on hand just for the ability to view the registry in a more effective way.
Copyright © 2008 – Bruce Eitman
All Rights Reserved