天天看点

[笔记分享] [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

继续阅读