星期四, 10月 26, 2006

New Platform - why I have somthing I don't want ?

New Platform

問題:每次New Platform 一個新的platform ,結果出來的OSDesign View Item 好像都不一樣。

回答:

這是因為 Platform Builder很自動(多事?)的幫你加入一些item 的關係(即使你選了"custom"也一樣)。

在platform builder中使用New Platform Create一個platform 時,第一個動作: "BSP"。
在選定BSP後,Platform builder會參考該BSP下的bat檔 (platform\<your_platform>\<your_platform>.bat),執行他,所以該BAT檔中所有設定的環境變數,都會在接下來的操作中繼承。

舉例來說:在 <your_platform>.bat中設定了SYSGEN_BINFS=1,則接下來Platform Builder就會自動在New Platform 中加入 Binary File System 這一個component (將游標移掉Catalog item 上, platform builder會顯示出該item 對應的SYSGEN_VAR)。即使你在接下來的各item 選擇中都沒有加入該item (Custom ),最後那一個item 還是會被 加入。

New Platform 完成後,在Workspace的OSD View中就可以看到被自動加入的item,如果去delete他,會有warning dialog出現,請你刪除掉 " SYSGEN_XX" 環境變數。

反過來說,當自己create一個platform時,可以藉由定義SYSGEN_XXX的方式來強制使用該BSP的設計加入需要的item。

另外Platform Setting 中build option 也會影響到被加入的item,可以在New Platform 的最後一步 "modify building options without leaving the dialog" 按下這個link,將不要的build option 拿掉,這樣最後Create出來的platform 才會包含你需要的item (不會被自動加入其他的item )。

沒有留言:

網誌存檔