定制loadcepc.exe

一.安装

安装MSVC152路径C:/MSVC;

安装MASM611可以自己指定E:/MASM611;

 

二.相关文件配置

 

修改setupen2.bat 如下:修改环境变量

:PATH_DONE

set PATH=%__MSVCDIR%/bin;%PATH%;%_WINCEROOT%/sdk/bin/i386;E:/MASM611/BIN;E:/MASM611/BINR

set MSDevDir=%__MSVCDIR%

set LIB=%__MSVCDIR%/lib

set INCLUDE=%__MSVCDIR%/include

goto DONE

 

这样执行会出现找不到“bootarg.h”文件。搜索后发现bootarg.h在C:/WINCE600/PLATFORM/COMMON/SRC/SOC/X86_MS_V1/INC下,为了方便将其直接拷贝到C:/WINCE600/PLATFORM/CEPC/SRC/BOOTLOADER/DOS/LOADCEPC文件夹下,

然后再编译,又会发现错误,这时将ethmain.c,video.c里面的#include<../../inc/bootarg.h>改成#include<bootarg.h>,及让其在当前目录找超找bootarg.h文件。

 

接下来就直接按照目录下Readme.txt中说明的步骤来编译生成自己的loadcepc.exe。特别需要注意的一点是:若先前已经编译好的Obj文件出现错误,在改变了环境之后,需执行

nmake /F loadcepc.mak clean来清除先前的二进制文件。在重新运行Readme.txt中的步骤即可。

 

三.相关命令

>CD C:/WINCE600/PLATFORM/CEPC/SRC/BOOTLOADER/DOS/LOADCEPC

>SET _WINCEROOT=C:/WINCE600

>SETUPENV    ///< 设置成16-bit Dev Mode,因为Loadcepc.exe需要在Dos16位环境下生成。

 

结果显示,即成功设置成16-bit Dev Mode。

*** 16-bit dev mode - type exit to return to normal ***

>PATH

PATH=C:/msvc/bin;e:/MWOS/DOS/BIN;C:/WINDOWS/system32;C:/WINDOWS;C:/WINDOWS/System32/Wbem;C:/Program Files/Microsoft SQL Server/80/Tools/BINN;C:/Program Files/Microsoft SQL Server/90/Tools/binn/;E:/PROGRA~1/Borland/Delphi6/Bin; E:/PROGRA~1/Borland/Delphi6/Projects/Bpl;C:/Program Files/StormII/Codec; C:/Program Files/StormII;C:/WINCE600/sdk/bin/i386;E:/MASM611/BIN

 

这里一定要存在PATH=C:/msvc/bin;E:/MASM611/BIN;C:/WINCE600/sdk/bin/i386;这个3个路径是编译LOADCEPC的关键。

 

*** 16-bit dev mode - type exit to return to normal ***

>nmake /F loadcepc.mak

显示结果

Microsoft (R) Program Maintenance Utility   Version 1.40

Copyright (c) Microsoft Corp 1988-93. All rights reserved.

 

        cl /I . /nologo /Gs /G2 /W4 /Z7 /Ox /D "NDEBUG" /D "_DOS" /D "CEDDK_USED

DKMACRO" /Fc /FR /I ../../INC  /c MAIN.C

main.c

main.c(1) : warning C4001: nonstandard extension 'single line comment' was used

main.c(1430) : warning C4135: conversion between different integral types

main.c(629) : warning C4704: 'usage' : in-line assembler precludes global optimi

zations

main.c(838) : warning C4704: 'LoadImage' : in-line assembler precludes global op

timizations

main.c(1146) : warning C4769: conversion of near pointer to long integer

main.c(1304) : warning C4704: 'GetPCIConfigMechanism' : in-line assembler preclu

des global optimizations

main.c(1456) : warning C4701: local variable 'ver_hi' may be used without having

 been initialized

main.c(1456) : warning C4701: local variable 'ver_lo' may be used without having

 been initialized

        cl /I . /nologo /Gs /G2 /W4 /Z7 /Ox /D "NDEBUG" /D "_DOS" /D "CEDDK_USED

DKMACRO" /Fc /FR /I ../../INC  /c XMSAPI.C

xmsapi.c

xmsapi.c(1) : warning C4001: nonstandard extension 'single line comment' was use

d

        cl /I . /nologo /Gs /G2 /W4 /Z7 /Ox /D "NDEBUG" /D "_DOS" /D "CEDDK_USED

DKMACRO" /Fc /FR /I ../../INC  /c VIDEO.C

video.c

video.c(1) : warning C4001: nonstandard extension 'single line comment' was used

 

video.c(47) : warning C4704: 'mode320x200x256' : in-line assembler precludes glo

bal optimizations

video.c(60) : warning C4704: 'isVesaSupported' : in-line assembler precludes glo

bal optimizations

video.c(81) : warning C4704: 'setVesaMode' : in-line assembler precludes global

optimizations

video.c(211) : warning C4704: 'FindClosestVESAMode' : in-line assembler preclude

s global optimizations

video.c(351) : warning C4704: 'FindVESAMode' : in-line assembler precludes globa

l optimizations

        cl /I . /nologo /Gs /G2 /W4 /Z7 /Ox /D "NDEBUG" /D "_DOS" /D "CEDDK_USED

DKMACRO" /Fc /FR /I ../../INC  /c MDPPFS.C

mdppfs.c

mdppfs.c(1) : warning C4001: nonstandard extension 'single line comment' was use

d

mdppfs.c(111) : warning C4135: conversion between different integral types

mdppfs.c(152) : warning C4135: conversion between different integral types

mdppfs.c(175) : warning C4135: conversion between different integral types

mdppfs.c(186) : warning C4135: conversion between different integral types

mdppfs.c(235) : warning C4135: conversion between different integral types

mdppfs.c(105) : warning C4701: local variable 'usStatus' may be used without hav

ing been initialized

        cl /I . /nologo /Gs /G2 /W4 /Z7 /Ox /D "NDEBUG" /D "_DOS" /D "CEDDK_USED

DKMACRO" /Fc /FR /I ../../INC  /c DEBUG.C

debug.c

debug.c(1) : warning C4001: nonstandard extension 'single line comment' was used

 

debug.c(34) : warning C4135: conversion between different integral types

debug.c(95) : warning C4135: conversion between different integral types

debug.c(103) : warning C4101: 'ucArgs' : unreferenced local variable

debug.c(137) : warning C4127: conditional expression is constant

debug.c(95) : warning C4761: integral size mismatch in argument; conversion supp

lied

        cl /I . /nologo /Gs /G2 /W4 /Z7 /Ox /D "NDEBUG" /D "_DOS" /D "CEDDK_USED

DKMACRO" /Fc /FR /I ../../INC  /c PPFS.C

ppfs.c

ppfs.c(1) : warning C4001: nonstandard extension 'single line comment' was used

ppfs.c(175) : warning C4057: 'argument' : indirection to slightly different base

 types

ppfs.c(221) : warning C4057: 'argument' : indirection to slightly different base

 types

ppfs.c(292) : warning C4057: 'argument' : indirection to slightly different base

 types

ppfs.c(307) : warning C4115: '_finddata_t' : named type definition in parenthese

s

ppfs.c(323) : warning C4057: 'argument' : indirection to slightly different base

 types

ppfs.c(376) : warning C4057: 'argument' : indirection to slightly different base

 types

ppfs.c(421) : warning C4057: 'argument' : indirection to slightly different base

 types

        cl /I . /nologo /Gs /G2 /W4 /Z7 /Ox /D "NDEBUG" /D "_DOS" /D "CEDDK_USED

DKMACRO" /Fc /FR /I ../../INC  /c PPFSTOOL.C

ppfstool.c

ppfstool.c(1) : warning C4001: nonstandard extension 'single line comment' was u

sed

ppfs.h(25) : warning C4115: '_finddata_t' : named type definition in parentheses

 

ppfstool.c(452) : warning C4210: nonstandard extension used : function given fil

e scope

ppfstool.c(467) : warning C4135: conversion between different integral types

ppfstool.c(540) : warning C4135: conversion between different integral types

ppfstool.c(215) : warning C4769: conversion of near pointer to long integer

        cl /I . /nologo /Gs /G2 /W4 /Z7 /Ox /D "NDEBUG" /D "_DOS" /D "CEDDK_USED

DKMACRO" /Fc /FR /I ../../INC  /c ETHMAIN.C

ethmain.c

ethmain.c(1) : warning C4001: nonstandard extension 'single line comment' was us

ed

ethmain.c(140) : warning C4057: '=' : indirection to slightly different base typ

es

ethmain.c(162) : warning C4057: 'argument' : indirection to slightly different b

ase types

ethmain.c(162) : warning C4057: 'argument' : indirection to slightly different b

ase types

ethmain.c(270) : warning C4769: conversion of near pointer to long integer

        ml /c TRANSFER.ASM

Microsoft (R) Macro Assembler Version 6.11

Copyright (C) Microsoft Corp 1981-1993.  All rights reserved.

 

 Assembling: TRANSFER.ASM

        echo >NUL @LOADCEPC.CRF

        link /NOLOGO /NOI /STACK:5120 /ONERROR:NOEXE /CO /MAP /LINE @LOADCEPC.CR

F

Object Modules [.obj]: /NOLOGO /NOI /STACK:5120 /ONERROR:NOEXE /CO /MAP /LINE MA

IN.OBJ +

Object Modules [.obj]: XMSAPI.OBJ +

Object Modules [.obj]: VIDEO.OBJ +

Object Modules [.obj]: MDPPFS.OBJ +

Object Modules [.obj]: PPFS.OBJ +

Object Modules [.obj]: PPFSTOOL.OBJ +

Object Modules [.obj]: ETHMAIN.OBJ +

Object Modules [.obj]: DEBUG.OBJ +

Object Modules [.obj]: TRANSFER.OBJ

Run File [MAIN.exe]: LOADCEPC.EXE

List File [c:LOADCEPC.map]: nul

Libraries [.lib]: slibce  oldnames

Definitions File [nul.def]: ;

        bscmake @C:/DOCUME~1/ADMINI~1/LOCALS~1/Temp/nm002092.

Microsoft Browser Database Maintenance Utility Version 2.51

Copyright (c) Microsoft Corp 1990-1993. All rights reserved.

 

本文来自CSDN博客,做了少量修改,多谢这位仁兄。http://blog.csdn.net/e01620230/archive/2008/11/18/3324056.aspx

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值