Tuesday 19 May 2009

Windows Embedded CE: BSP development considerations

Hi Folks,

this post kind of fits to Damian’s post from yesterday.

You might have wondered why, upon installation of PlatformBuilder, the Windows Embedded CE source code ends up in C:\WINCE600 by default. Well there are several reasons:
  • The paths do get pretty long and we want to be able to resolve them

  • Windows Embedded CE does not support spaces in the source code path

This can sometimes be a problem in your day-to-day BSP development. Imagine the following scenario: You want to change a driver in a BSP that you are working on right now. But of course you want to keep the old version. So before you alter the existing code you make a copy and by default it will be called “Copy of my_driver”. Even though you are not compiling this just created folder you will get strange errors (such as your Solution Explorer in PlatformBuilder does not work properly anymore) due to the fact that you’ve got spaces in your path.

But even if you obey this restriction of not having any spaces in your Windows Embedded CE source code paths you are not in the clear, yet. Just imagine the following scenario: You get a new version of the BSP that you are working on but again you want to save your current version. Taking into account that you should not have any spaces in your Windows Embedded CE source code path you now rename your current version of the BSP to something like: my_bsp_old_version. By doing so and then adding the new version of your BSP you will get some problems with your Catalog as you have multiple versions of the same Catalog Item in your system; hence your unique ID is no longer unique (here is a link to my post regarding Catalog Items and unique IDs).
To resolve this Catalog Item issue, you can do one of the following:
  • Rename the Catalog folder of your my_bsp_old_version (don't forget the limitation of no spaces in the source code tree) or

  • Copy my_bsp_old_version to some folder outside the WINCE600 tree

Have fun!

No comments: