Platform Builder 5.0的Build OS菜单详解

//======================================================================== //TITLE: // Platform Builder 5.0的Build OS菜单详解 //AUTHOR: // norains //DATE: // Saturday 05-April-2008 //Environment: // PB 5.0 + DB1200 BSP //======================================================================== 很多新手对Platform Builder 5.0(以下简称PB 5.0)的Build OS菜单有所疑惑,不知道实际使用中应该如何选择,在此结合本人平时的经验,略作一番解释。 首先第一组是编译命令,一共有三个:

        1.Sysgen 根据当前的系统设计,生成一个系统映像。该操作不会更改之前编译(Build)完成的文件。这里所说的文件,指的是OS的文件,也就是位于WINCE500文件夹下面的各种lib库。 有三点是必须要注意的: 1).在上一次调用Sysgen之后,如果你已经增加或移除文件以及相关的Catalog,强烈建议选中“Clean Before Building",然后再开始新的一次Sysgen。因为这样会最大程度上减少出错的机会。 2).该命令也会编译包含于系统设计工作区(Workspace)的工程(Project)。 3).没有任何文件拷贝到目标(Release)文件夹。

        2. Build and Sysgen 其实这是两个命令的组合,先是编译(Build),然后再调用Sysgen。该命令不仅编译公开(Public)代码,甚至连私有(Private)代码也不放过,所以耗费的时间会非常久。只有当你更改了OS的源文件,才建议选择该命令。 该命令和之前的Sysgen相同,也会编译包含于系统设计工作区(Workspace)的工程(Project)以及不将文件拷贝到目标(Release)文件夹。 接下来三个是命令标签,用来部分控制命令运行时的行为。

        3.Build and Sysgen Current BSP 编译(Build)然后Sysgen当前的BSP包。和之前的两个命令一样,该命令也不会将文件拷贝到目标(Release)文件夹。 需要注意的一点是,根据实际的使用经验,因为命令的参数不同,有时候即使你能成功调用调用Sysgen生成系统,也有可能调用本命令编译BSP包失败。遇到此情况,只能根据具体情况做相应的处理。

        4.Clean Before Building 如果选中该标签,那么在执行命令之前都会清除上一次Sysgen创建的文件。

        5.Copy Files to Release Directory 如果选中该标签,则在编译完毕之后,会把生成的文件拷贝到目标(Release)文件夹中。通常这个目标(Release)文件夹是你的工程所在的目录。 该标签默认是选中的。

        6.Make Run-Time Image After Build 如果选中该标签,在编译完毕之后,将生成一个运行映像(run-time image)。最典型的的运行映像(run-time image)便是NK.BIN。 在你建立一个新的工程之后,该标签默认是选中的。 最后是一组辅助的命令。

        7.Copy Files to Release Directory 将生成的文件拷贝到目标(Release)文件夹。

        8.Make Run-Time Image 生成运行映像(Run-Time Image)。最常见的,也就是将所编译生成的文件组合成nk.bin。

        9.Batch Build 用来选择多种配置来生成运行映像(Run-Time Image)。

       10.Open Release Directory 打开命令行窗口,默认路径为目标(Release)文件夹。

       11.Set Active Configuration 从现有的配置选择一个作为当前可用的。

       12.Configurations 你可以通过该命令增添或删除配置 在PB的文档中也有关于这些命令的说明,具体位置你可以查看: Platform Builder User's Guide > Platform Builder IDE > Platform Builder User Interface > Menu Descriptions

 

 

Sysgen/Build and sysgen/Build and sysgen current BSP区别:
Sysgen: 更新Catalog后,生成NK.bin之前。不会更新之前Build完成的文件。(编译workspece中的Project)
Build and sysgen: 更新Public目录下代码后,打patch之后。编译Pubilc代码,Private代码。
Build and sysgen current BSP: 更新BSP部分代码后,编译后Sysgen当前BSP包。

下面的说明来自PB Help文档。

The Build OS menu provides a variety of options for your OS design, such as building run-time images. For information about the build process, see Build Phases.

This menu contains build commands and flags the modify these commands, resulting in more flexibility when determining the settings for a build.

This functionality is similar to the functionality available in a command-line prompt build window. The results of a build depend on the settings that you choose, and can vary widely.

You can customize the settings for a build according to your needs by selecting the build flags you want to set, then choosing a build command to begin the build.

The following build options are available on the Build OS menu.

CommandDescription
SysgenRuns the Sysgen tool on files related to the OS design. This assumes that the files have not changed from a previous build process.
Note   If you have added or removed files or Catalog items after a previous Sysgen, it is recommended that you select Clean Before Building before running a new build. This reduces the chances of a build error appearing.

Projects in the workspace are included in the build process.

No files are copied to the release directory.

Build and SysgenBuilds, and then runs the Sysgen tool on files in the OS design.

Select this command when you modify files in the OS design.

Projects in the workspace are included in the build process.

No files are copied to the release directory.

Build Current BSPBuilds and then runs the Sysgen tool on files in the directory for the current BSP.

No files are copied to the release directory.

The following flags are available on the Build OS menu.

CommandDescription
Clean Before BuildingSelect to remove intermediate and output files built during a previous Sysgen phase before running a build.
Copy Files to Release Directory After BuildSelect to use the Buildrel tool to copy output files to the release directory after the build completes.

By default, this menu option is selected when you create a new workspace.

Make Run-Time Image After BuildSelect to use the Makeimg tool to use files in the release directory to create the run-time image after the build completes.

By default, this menu option is selected when you create a new workspace.

The following other menu options are available on the Build OS menu.

CommandDescription
Copy Files to Release DirectoryUse to copy output files to the release directory after the build completes, using the Buildrel tool.
Make Run-Time ImageUse files in the release directory to create the run-time image, using the Makeimg tool.
Stop BuildUse to stop the build when the build system reaches the end of the current executing command or the next phase.

If you select Clean Before Building, it is recommended that you allow the build to complete.

Batch BuildUse to select multiple configurations to build run-time images from.
Open Release DirectoryUse to open a command prompt build window in the release directory for your OS design.
Set Active ConfigurationUse to select an active configuration for your OS design.
ConfigurationsUse to add or remove configurations for your OS design.

 

今天遇到一个很奇怪的问题,在使用命令Build and Sysgen Current BSP没有选中Clean Before Building 

 发现PLATFORM/smdk2440/DRIVERS下的文件并没有被编译,但是PLATFORM/smdk2440/KERNEL下的文件是被编译了的

 

用命令Build and Sysgen Current BSP没有选中Clean Before Building 后才编译PLATFORM/smdk2440/DRIVERS下的文件,但编译出的NK下载运行到OEMINT()就死了。

  • 0
    点赞
  • 7
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值