Geeks With Blogs
Windows Embedded Annotations

Every BSP has a batch file with the same name of the BSP itself: this file is invoked for every workspace based on that BSP instructing the development environment (for example) to add some components which the developer thought should be included by default on every workspace usng that BSP. For example in a BSP .bat you can find something like:


which include in every workspace the support for the various flavours of USB host controllers.

Suppose that you want to create a workspace that does not include the EHCI support: if you try to remove the item from the workspace catalog you get a message like "if you want to remove this item you have to remove those other components, blah, blah, and you have to remove the environment variable 'BSP_USB_EHCI'".

You do not want to change the BSP .bat files since the change will involve all the workspaces based on that BSP.

How do you remove (or unset) an environment variable in Platform Builder?

The properties/settings GUI for your workspace allows you only to set an environment variable to a specific value but you cannot unset it. Setting a variable to 0 has no effet since the .bib and .reg files typically check if a variable is defined
or not.

Inspecting  %_WINCEROOT%\PUBLIC\COMMON\OAK\MISC\wince.bat file I found that after calling the BSP batch file, wince.bat calls (if it exists) a file called %_PROJECTROOT%\postWinCE.bat. Since this is a batch file you can use 'set BSP_USB_EHCI=' to unset the environment variable on a workspace by workspace base.

Posted on Thursday, June 25, 2009 10:07 AM Windows CE | Back to top

Comments on this post: Removing a default BSP component from a workspace

No comments posted yet.
Your comment:
 (will show your gravatar)

Copyright © Luca Calligaris | Powered by: