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:

Don't want to miss any file that is required for a successful build

Don't want to add any file that is automatically generated by the build system

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:

Delete all obj folders from your BSP (eg C:\WINCE700\PLATFORM\Opal)

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.

Delete all build.* files from your BSP

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.

Delete all bldsys.* files from your BSP

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.

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.

Delete all build.* files from any SOC folder your BSP uses

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.

Delete all bldsys.* files from any SOC folder your BSP uses

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.

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.

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:

Make sure you have committed all your changes

Remove your BSP folder

Remove any SOC folder your BSP uses

Remove the OS Design

Now checkout all the files from source control into your WINC700 tree

Open the OS Design solution and immediately close Visual Studio again.

This action creates the RelDir folder and allows a command line build.

Right click the OSDesign pbxml (one folder higher), hover over Open Build Window and click on the build configuration you want to build

In the DOS box, type blddemo -q

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).