Removing a default BSP component from a workspace


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:

set BSP_USB_OHCI=1
set BSP_USB_UHCI=1
set BSP_USB_EHCI=1

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.

Advertisements
This entry was posted in Windows Embedded CE and tagged , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s