Windows Embedded Compact 7 and source control

A question that keeps coming back on the forums and from our customers that just start out with Windows Embedded Compact is; what files need to be put in source control, and which don't?

To answer this recurring question once and for all; here's a breakdown of all the files and folders that need to be put under version control, specific for Windows EC 7.

When putting files under source control you:

  1. Don't want to miss any file that is required for a successful build
  2. Don't want to add any file that is automatically generated by the build system
  3. Don't want to add any file that changes automatically every time you build

The last two would cause a new revision every time you build the kernel, which is normally not what you want; a new revision should only indicate changes YOU made.

With those rules in mind, here are the steps:

Windows Embedded Compact 7

First, clean up your BSP folder:

  1. Delete all obj folders from your BSP (eg C:\WINCE700\PLATFORM\Opal)
  2. The easiest way to do this is to search for obj using the search option of the standard Windows File Explorer. Then sort the search results so all obj folders are at the top, select them all (only select the obj folders, do not select any files!) and press the delete key. Once all obj folders are deleted another search for obj should not return anything.

  3. Delete all build.* files from your BSP
  4. The easiest way to do this is to search for build.* using the search option of the standard Windows File Explorer. Select all build*.dat, build.log, build.err and build.wrn files and press the delete key. Once all build.* files are deleted another search for build.* should not return anything.

  5. Delete all bldsys.* files from your BSP
  6. The easiest way to do this is to search for bldsys.* using the search option of the standard Windows File Explorer. Select all bldsys.log, bldsys.out, bldsys.err and bldsys.wrn files and press the delete key. Once all bldsys.* files are deleted another search for bldsys.* should not return anything.

You can now add the entire BSP folder to source control.

The next thing to add is any SOC folders your BSP may need to build correctly. In case of the Opal, we use SOC folders COMMON_FSL_V3 and MX53_FSL_V3 located in \WINCE700\PLATFORM\COMMON\SRC\SOC.

First, clean up these folders:

  1. Delete all obj folders from any SOC folder your BSP uses (eg C:\WINCE700\PLATFORM\COMMON\SRC\SOC\COMMON_FSL_V3)
  2. The easiest way to do this is to search for obj using the search option of the standard Windows File Explorer. Then sort the search results so all obj folders are at the top, select them all (only select the obj folders, do not select any files!) and press the delete key. Once all obj folders are deleted another search for obj should not return anything.

  3. Delete all build.* files from any SOC folder your BSP uses
  4. The easiest way to do this is to search for build.* using the search option of the standard Windows File Explorer. Select all build.dat, build.log, build.err & build.wrn files and press the delete key. Once all build.* files are deleted another search for build.* should not return anything.

  5. Delete all bldsys.* files from any SOC folder your BSP uses
  6. The easiest way to do this is to search for bldsys.* using the search option of the standard Windows File Explorer. Select all bldsys.log, bldsys.out, bldsys.err and bldsys.wrn files and press the delete key. Once all bldsys.* files are deleted another search for bldsys.* should not return anything.

You can now add the SOC folders your BSP uses to source control.

Finally, you need to add your OS Design(s).

Again, first we clean up:

  1. Remove the .ncb and .suo files from your OS Design root folder (eg C:\WINCE700\OSDesigns\Opal)
  2. These files can be found in the root folder of your OSDesign (eg C:\WINCE700\OSDesigns\Opal\Opal.ncb). The .ncb and .suo files are generated by Visual Studio every time you open the OS Design.

  3. Remove the .pbxml.user file from your OS Design subfolder (eg C:\WINCE700\OSDesigns\Opal\Opal)
  4. This is a file (eg C:\WINCE700\OSDesigns\Opal\Opal\Opal.pbxml.user) generated by Visual Studio every time you open the solution.

  5. Remove the RelDir folder (eg C:\WINCE700\OSDesigns\Opal\RelDir)
  6. This is the folder that will hold all files generated when your build your OS Design build configurations. The entire folder and its subfolders needs to be deleted.

  7. Remove the folder Wince700 from your OS Design subfolder (eg C:\WINCE700\OSDesigns\Opal\Opal\Wince700
  8. This folder contains the sysgenned files that will be generated every time you sysgen your OS Design. The entire folder and its subfolders needs to be deleted.

  9. Delete all obj folders from your OS Design subfolder (eg C:\WINCE700\OSDesigns\Opal\Opal)
  10. The easiest way to do this is to search for obj using the search option of the standard Windows File Explorer. Then sort the search results so all obj folders are at the top, select them all (only select the obj folders, do not select any files!) and press the delete key. Once all obj folders are deleted another search for obj should not return anything.

  11. Delete all build.* files from your OS Design subfolder (eg C:\WINCE700\OSDesigns\Opal\Opal)
  12. The easiest way to do this is to search for build.* using the search option of the standard Windows File Explorer. Select all build.dat, build.log, build.err & build.wrn files and press the delete key. Once all build.* files are deleted another search for build.* should not return anything.

You can now add your OS Design to source control.

This concludes the steps required to successfully put all files required for a successful Windows Embedded Compact 7 build under source control.

To build a clean version out of source control perform the following steps:

  1. Make sure you have committed all your changes
  2. Remove your BSP folder
  3. Remove any SOC folder your BSP uses
  4. Remove the OS Design
  5. Now checkout all the files from source control into your WINC700 tree
  6. Open the OS Design solution and immediately close Visual Studio again.
  7. This action creates the RelDir folder and allows a command line build.

  8. Right click the OSDesign pbxml (one folder higher), hover over Open Build Window and click on the build configuration you want to build
  9. In the DOS box, type blddemo -q
  10. NEVER EVER forget -q (as that would be the demonic Build and Sysgen command)!!!
    You may want to set the DOS box windows properties to a bigger window and bigger buffer. I usually set the Layout to 150/9999 for buffer size and 150/50 for window size. I also enable QuickEdit mode (on the Options tab).