In Platform Builder 6.0: Creating a Catalog File I discuss creating a catalog file for a BSP. Someone asked me about adding a binary component to the catalog, so let’s look into that.
To start with, let’s assume that the binary is a DLL that is in the BSP Files folder, and that the BIB and REG file settings are in Platform.bib and Platform.reg.   The BIB and REG file settings look like this:
        MyBinaryDriver.dll $(_FLATRELEASEDIR)\MyBinaryDriver.dll                                   NK       K
[HKEY_LOCAL_MACHINE\Drivers\BuiltIn\ MyBinaryDriver]
    "Dll"=" MyBinaryDriver.dll"
The real significance of these is that the settings exist, and are wrapped by the environment variable BSP_MYBINARYDRIVER. So we need to add a component to the catalog that sets BSP_MYBINARYDRIVER and so that Platform Builder can test that things are good, we should tell the catalog that the binary is MyBinaryDriver.dll.
Steps to add this Binary Driver to the catalog file created in Platform Builder 6.0: Creating a Catalog File:
1.       Right Click on the Device Drivers folder and select Add Catalog Item in Sub Folder.
2.       Enter the name of the sub folder, in this case “Gadget”
3.       Edit the properties of the new component
a.       Set the Supported CPUs, after all this is a binary so no chance of anyone rebuilding it. If you haven’t noticed it already, once you click on the data field, a button with three dots (…) will be displayed. Click on it and a list of CPU families will be displayed, select the appropriate CPU family.
b.      Fill in the Size of the binary in the General\Size field. You should be able to use Windows Explorer to determine the size of the DLL.
c.       Set the Title to something that makes sense and looks good in the catalog, like “My Binary Driver”.
d.      Set the Unique ID to something unique. I find that a combination of my company name and the driver name works well, so I set it to “Item:My Company:MyBinaryDriver”
e.      Now the important Properties:
                                                               i.      Add a Variable, in this case BSP_ MYBINARYDRIVER, which will be set when the user selects this component from the catalog
                                                             ii.      Add the Module name, in this case MyBinaryDriver.dll. This allows Platform Builder to check that the module will actually be added to the OS.
Now save the file and refresh the catalog. The catalog should now show a Gadget\My Binary Driver under My BSP.
There are several properties not set, you can leave them at their default. If you have information to fill in, by all means fill it in.
Note that setting the Adding a Source code link isn’t necessary. The source code link is used to allow source code browsing within the Solution Explorer. Since this binary driver doesn’t have source code, no need for browsing the source code.
The articles listed in Summary of Platform Builder Catalog Posts to be of help.
Copyright © 2009 – Bruce Eitman
All Rights Reserved