您的位置:首页 > 其它

Au1200 CoreBSP v1.51默认工程编译记录

2008-04-12 18:24 405 查看
//========================================================================
//TITLE:
// Au1200 CoreBSP v1.51默认工程编译记录
//AUTHOR:
// norains
//DATE:
// Saturday 12-April-2008
//Environment:
// PB 5.0 + AU1200 CORE BSP 1.5.1 + AU1200 MEDIA BSP 1.5.1
//========================================================================

本文是对Au1200 Core BSP和Au1200 Media BSP 的1.5.1版本的编译记录,对遇到的部分问题给出了解决方法,但有更多的则是撒手不管,因此参考作用有限,还欢迎各位朋友针对没有解决的问题提出方案,谢谢!

1.安装Cumulative Product Update Rollup Package (through 12/31/2007),下载地址:http://www.microsoft.com/downloads/details.aspx?FamilyID=a54779d5-f4a5-49f0-9e36-979d461f536c&DisplayLang=en


2.安装Windows CE 5.0 Platform Builder Monthly Update (January 2008),下载地址:http://www.microsoft.com/downloads/details.aspx?FamilyId=98F0906A-45C6-4792-91FE-47A0E073A998&displaylang=en


3.安装Windows CE 5.0 Platform Builder Monthly Update (February 2008),下载地址:http://www.microsoft.com/downloads/details.aspx?FamilyId=9AC7441F-3ADC-4E35-ABD1-FA4FBB90A132&displaylang=en


4.安装 AMD Core BSP 1.5.1


5.安装 AMD MEDIA BSP 1.5.1


6.打开BSP包中默认的PB工程。


7.选择“Release”版本,然后选择“Build and Sysgen BSP”
结果:编译出错。提示无法在硬盘上找到“MA31200.dll”


8.选择“Sysgen”
结果:编译出错。提示无法找到“Janus_wince.dll”。


9.将DRMConfig.bib关于包含“Janus_wince.dll”的选项注释掉,然后再选择“Sysgen”。
结果:编译出错。提示“devcerttemplate.dat”没有找到。


10.将DRMConfig.bib的所有选项都注释掉,然后再“Sysgen”。

结果:编译成功。
Janus_wince在BSP包中没有任何源代码,所以不能生成Janus_wince.dll文件,只能将它注释掉。


11.选择“Debug”版本,然后选择“Build and Sysgen BSP”。
结果:编译出错。提示"macro redefinition"。


12.上一步之所以编译不成功,是因为ZONE_ERROR,ZONE_FUNCTION和ZONE_STORE这三个宏定义重复定义的原因。因为这三个宏,已经在“../PLATFORM/Db1200/Drivers/Usb/Usbfn_clients/Mtp/Driver.h”中有定义,而在“../PLATFORM/Db1200/Drivers/Usb/Usbfn_clients/Mtp/MtpDevice.cpp”,“../PLATFORM/Db1200/Drivers/Usb/Usbfn_clients/Mtp/MtpHandler.cpp”和“../PLATFORM/Db1200/Drivers/Usb/Usbfn_clients/Mtp/MtpObject.cpp”又重新定义了一遍。解决方法是更改这三个cpp文件中定义宏的方式:

//norains 2008-4-5 02:34: If you don't undefine the macro, it would cause "macro redefinition" error
#ifdef ZONE_ERROR
#undef ZONE_ERROR
#endif
#ifdef ZONE_FUNCTION
#undef ZONE_FUNCTION
#endif
#ifdef ZONE_STORE
#undef ZONE_STORE
#endif

更改完毕之后,选择“Build and Sysgen BSP”。
结果:编译出错。出错信息为“Cannot open input file: .../nlscfg.inf”和“Don't know how to make ..../ddk_bus.lib”


13.选择“Sysgen”
结果:编译出错。错误提示为:"Error:dpCurSetting already defined in MtpDll.obj"


14.上一部之所以不成功,是因为“MtpDll.CPP”和“Mtp.cpp”这两个文件都有关于该变量的定义,而该变量又在别的文件声明为extern变量,所以编译器无法确知别的文件中引用的是哪个变量,所以编译出错。在这里是将“MtpDll.cpp”的dpCurSetting的定义注释掉。

选择“Sysgen”。
结果:编译出错。但PB中并没有显示究竟哪里出错,查看Build.log,发现有如下描述:“MoveFileEx failed。 GetLastError:5”


15.上一步不成功的原因可能是文件句柄占用,无法移动,在此重启计算机。

选择“Sysgen”
结果:编译出错。提示“Too much data space used by DLL's in MODULES section”,原因是文件太多,无法放进MODULES内存段。

PB的文档中有关于该错误的描述:
Debug images are larger than their retail counterparts, which may cause build errors because of two primary reasons:
The amount of space allotted to the overall OS image (config.bib's RAMIMAGE entry) is insufficient. The values used in config.bib are often limited by the amount of physical memory present on the target device and thus can only be increased to a hardware-imposed limit.

The modules (DLLs) within the OS image exceed the slot-based virtual address space that has been allotted. During the build process, Romimage configures the modules to fit one of two slot address spaces (slot 0 or slot 1), depending on build logic. If you run out of allotted space in these two slots, a build error similar to the following will occur:
Error: Too much data space used by DLL's in MODULES section

Current usage = 42752k, Maximum usage = 26624k.

Reduce DLL usage or move some DLL's into the FILES section.

Fatal error hit, exiting...

To avoid this, build retail images and include debug versions of only executables that you want to debug, or reduce the build configuration (SYSGEN/feature selections) to something smaller.
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: