天天看點

[筆記分享] [SCons] Qualcomm SCons User Guide

From:

80-N3985-1_A_SCons_User_Guide.pdf

Images: 理論上可以有無限個images。 不同的images可以使用same code build。

Tag: 指lib和object file的collection。通過AddLibrary()或者other methods添加。Tag通過InitImageVars()被添加到image中。

API Types:

Public api: 在不同AUs之間使用。 在AU 的top目錄.api中publish。

Restricted api: 在AU下的不同SUs之間使用。 在SU的top目錄.api中publish.

Protected api: 在SU下不同的module之間使用,在.scons中publish。

Private api: 隻在module自己内部使用,是以它不需要去調用RequirePrivateApi, 系統會自動處理掉。 在module的.scons中publish.

External api: 不用publish, 自動作為變量存在系統中。如果需要添加可以加到externalpaths.py中,變量名字以_EXTERNAL作為字尾。

.api和.scons

AU下的*.api:

此檔案是為了加載next level的.api或者paths.sconscript。 使用的函數是:LoadAPIUnits().

AU下的*.scons

加載next level的*.scons或SConscript。使用的函數是:LoadSoftwareUnits().

SU下的*.api:

1. PubulishRestrictedApi()

2. Load next level *.api

SU下的*.scons

1. PublishProtectedApi()

2. Load next level *.scons.

Module下的*.scons

1. Import, clone, setup source path

2. Require include paths

3. Create list of component source files

4. Call Addlibrary() or other methods to add to system.

Image script:

定義build library的環境,link, post link, 以便最終生成image。通過load 不同的AU來獲得library, object files.

如: debug_image\core\bsp\dbi\dbi\build\ msm8x26.scons

繼續閱讀