原创 CE命令符编译

2011-4-13 23:01 2438 8 8 分类: MCU/ 嵌入式

今天也就纠结这个东西了,晕的很,还是要好好泡论坛,多看PB帮助啊,而且是要细看!!!

看了这个帖子我就明白我为什么错了:


--------------------------------------------------------------------------------------------------------------------------------

我的目的是想通过命令行方式编译安装时自带的SMDK2410中的BOOTLOADER.

my2410是我自建的基于SMDK2410的平台,并通过SYSGEN编译过,我在SMDK中的.LOG文件中看到编译的结果都是正确的.

下面是我通过PB的菜单编译后在SMDK2410中的Build.log输出的结果,只取了最后几行.

 

BUILD: [01:0000000786:INFO  ] Creating rom file C:\WINCE500\platform\smdk2410\target\ARMV4I\retail\EBOOT.nb0
BUILD: [01:0000000787:INFO  ] Done!
BUILD: [01:0000000788:INFO  ] Stop.
BUILD: [00:0000000789Stick out tongueROGC ] Done.
BUILD: [00:0000000790Stick out tongueROGC ]                      Files      Warnings      Errors
BUILD: [00:0000000791Stick out tongueROGC ] Midl                     0             0           0
BUILD: [00:0000000792Stick out tongueROGC ] Resource                 0             0           0
BUILD: [00:0000000793Stick out tongueROGC ] Message                  0             0           0
BUILD: [00:0000000794Stick out tongueROGC ] Precomp Header           0             0           0
BUILD: [00:0000000795Stick out tongueROGC ] C/Cpp/Cxx               28             0           0
BUILD: [00:0000000796Stick out tongueROGC ] Assembler                4             0           0
BUILD: [00:0000000797Stick out tongueROGC ] Static Libraries         6             0           0
BUILD: [00:0000000798Stick out tongueROGC ] Dll's                   16             0           0
BUILD: [00:0000000799Stick out tongueROGC ] Exe's                    4             0           0
BUILD: [00:0000000800Stick out tongueROGC ] Resx                     0             0           0
BUILD: [00:0000000801Stick out tongueROGC ] Csharp Targets           0             0           0
BUILD: [00:0000000802Stick out tongueROGC ] Other                    0             0           0
BUILD: [00:0000000803Stick out tongueROGC ]
BUILD: [00:0000000804Stick out tongueROGC ] Total                   58             0           0
BUILD: [00:0000000805Stick out tongueROGC ]
BUILD: [00:0000000806Stick out tongueROGC ] 0 Warnings,  0 Errors

 

为什么我单独用命令行的方式编译就报错呢?

下面是我用命令提示符窗口的操作过程:

Microsoft Windows XP [版本 5.1.2600]
(C) 版权所有 1985-2001 Microsoft Corp.

C:\WINCE500\PLATFORM\SMDK2410>set _WINCEROOT=C:\WINCE500

C:\WINCE500\PLATFORM\SMDK2410>cd %_WINCEROOT%\PUBLIC\COMMON\OAK\MISC

C:\WINCE500\PUBLIC\COMMON\OAK\MISC>wince.bat ARMV4I my2410 SMDK2410
_WINCEDRIVE=C:
_PROJPUBLICROOT=C:\WINCE500\PBWORKSPACES\my2410\WINCE500\PUBLIC
Wince ARMV4I my2410 SMDK2410 Development Environment for thhy
C:\WINCE500>cd %_WINCEROOT%\PLATFORM\SMDK2410

C:\WINCE500\PLATFORM\SMDK2410>build -c
Build for Windows CE (Release) (Built on Apr 22 2004 10:38:01)
File names: Build.log Build.wrn Build.err Build.dat
CEFILTER: Failed opening C:\WINCE500\public\my2410\cesysgen\sdk\inc\ceconfig.h
BUILD: [ThrdTongue Tiedequence:Type  ] Message
BUILD: [00:0000000000:ERRORI] Failed to initialize from CECONFIG.H.
BUILD: [00:0000000001Stick out tongueROGC ]                      Files      Warnings      Errors
BUILD: [00:0000000002Stick out tongueROGC ] Midl                     0             0           0
BUILD: [00:0000000003Stick out tongueROGC ] Resource                 0             0           0
BUILD: [00:0000000004Stick out tongueROGC ] Message                  0             0           0
BUILD: [00:0000000005Stick out tongueROGC ] Precomp Header           0             0           0
BUILD: [00:0000000006Stick out tongueROGC ] C/Cpp/Cxx                0             0           0
BUILD: [00:0000000007Stick out tongueROGC ] Assembler                0             0           0
BUILD: [00:0000000008Stick out tongueROGC ] Static Libraries         0             0           0
BUILD: [00:0000000009Stick out tongueROGC ] Dll's                    0             0           0
BUILD: [00:0000000010Stick out tongueROGC ] Exe's                    0             0           0
BUILD: [00:0000000011Stick out tongueROGC ] Resx                     0             0           0
BUILD: [00:0000000012Stick out tongueROGC ] Csharp Targets           0             0           0
BUILD: [00:0000000013Stick out tongueROGC ] Other                    0             0           1
BUILD: [00:0000000014Stick out tongueROGC ]
BUILD: [00:0000000015Stick out tongueROGC ] Total                    0             0           1
BUILD: [00:0000000016Stick out tongueROGC ]
BUILD: [00:0000000017Stick out tongueROGC ] 0 Warnings,  1 Errors

C:\WINCE500\PLATFORM\SMDK2410>

 

上面的结果中有一处错误,不明白是什么意思,还请知情人指点一二,在此谢过.

下面是回帖:

我建议你在PB5.0里面,在菜单里面选择“Open Release Directory...”来打开命令行窗口,然后退到你的bootloader所在的目录,然后输入“build -c”,这样应该可以。


*****************************************************************************************************

在论坛上一个好人给我的回复是这样:

是不是命令行下有些环境变量没有设好?

在CE6上我知道有问题,
尽量不要用 build and sysgen ,许多微软的原有lib会被覆盖掉,会造成有些lib库链接不过去!
所以 CE6 上clear sysgen 就可以了!

全部生成完毕后,如果要更改驱动,编译哪个自己写的驱动时,
跑到该目录命令行下,build 驱动!
拷贝到目标目录,然后make image就可以了!


*******************************************************************************************

CE命令符的作用体现在调试的时候很重要!!!

下面还有一篇GM的博文可以参考:http://www.cnblogs.com/jiegekaoyan/archive/2010/07/29/1788313.html

PARTNER CONTENT

文章评论0条评论)

登录后参与讨论
EE直播间
更多
我要评论
0
8
关闭 站长推荐上一条 /3 下一条