7.05.2010

clone public code

大概就是用 sysgen_capture 這個 tool 來作:

首先找到 sysgen 的 targetname。假設是 celogflush 好了
* 在 platform/yourbspname 下 create 一個 folder : celogflush
* 在 celogflush 下: sysgen_capture -p common celogflush
* copy public/common/sdk/samples/celog/flush/celogflush/flush.c 過來
* 因為 celogflush/sources 有列 include path : ..,所以把 ../*.h 也 copy 過來
* rename 剛剛 sysgen_capture 產生的 sources.celogflush 為 sources
* 修改 sources,把 source = 加上 flush.c
* copy Makefile 過來
這樣就可以下 build,產生 celogflush.exe 了

主要大概是用 sysgen_caputre 產生 target 的 source 檔,這樣才知道 target 用的 library 有哪些。

把 source file copy 過來,修改 sources。
雖然 library 中會有同樣的 sample,但是大蓋會以 source = 列出的優先(吧?)

2 則留言:

Non-human 提到...

>>雖然 library 中會有同樣的 sample,但是大蓋會以 source = 列出的優先(吧?)

記憶中是 override write 的關係
Build system 會先把public 的 file sysgen
然後才是 BSP sysgen
同檔名的就 蓋過去了

checko 提到...

喔~原來是這樣。所以可以放心的用囉。

所以sysgen 後要記得重 build 一次 bsp..