做wince5.0 s3c2410 BSP时, 把原系统lcd驱动移到BSP的Drivers下,驱动无法正常加载,打印输出如下:
驱动未移动(原系统)显示正常:
Windows CE Kernel for ARM (Thumb Enabled) Built on Jun 24 2004 at 18:25:00
ProcessorType=0920 Revision=0
sp_abt=ffff5000 sp_irq=ffff2800 sp_undef=ffffc800 OEMAddressTable = 8c205c04
INFO:OALLogSetZones: g_oalLogMask: 0xb
。。。
INFO: PwrButton: Mapped Irq 0x2 to SysIntr 0x16.
INFO: s3c2410x_lcd: InitializeLCDRegisters in PublicCSPs3c2410xLCD.
OEMIoControl: Unsupported Code 0x10100fc - device 0x0101 func 63
Lyg.p: Layout Manager successfully initialized to 2
MSIM: IM_ReadRegistry read KB 5
Explorer(V2.0) taskbar thread started.
驱动移动后显示异常:
Windows CE Kernel for ARM (Thumb Enabled) Built on Jun 24 2004 at 18:25:00
ProcessorType=0920 Revision=0
sp_abt=ffff5000 sp_irq=ffff2800 sp_undef=ffffc800 OEMAddressTable = 8c205c04
INFO:OALLogSetZones: g_oalLogMask: 0xb
。。。
INFO: PwrButton: Mapped Irq 0x2 to SysIntr 0x16.
Data Abort: Thread=8fe1e6b0 Proc=8e026370 'gwes.exe'
AKY=00000009 PC=0004c3e8(gwes.exe+0x0003c3e8) RA=00053318(gwes.exe+0x00043318) BVA=08000008 FSR=00000007
红色是打印输出不同的部分。
驱动移动到BSP的Drivers修改了三个文件分别是SOURCES、platform.bib、platform.reg
SOURCES修改为:
!if "$(BSP_NODISPLAY)" == "1"
SKIPBUILD=1
!endif
TARGETNAME=s3c2410xlcd
TARGETTYPE=DYNLINK
RELEASETYPE=PLATFORM
TARGETDEFNAME=s3c2410xlcd
DEFFILE=s3c2410xlcd.def
!IFDEF CLEARTYPE
CDEFINES=$(CDEFINES) -DDDI -DCLEARTYPE
!ELSE
CDEFINES=$(CDEFINES) -DDDI
!ENDIF
INCLUDES=$(INCLUDES);$(_WINCEROOT)\public\common\ddk\inc;
PRECOMPILED_INCLUDE=precomp.h
PRECOMPILED_PCH=precomp.pch
PRECOMPILED_CXX=1
TARGETLIBS= \
$(_COMMONOAKROOT)\lib\$(_CPUINDPATH)\ceddk.lib \
$(_COMMONSDKROOT)\lib\$(_CPUINDPATH)\coredll.lib \
!IFDEF ROTATE
$(_COMMONOAKROOT)\lib\$(_CPUINDPATH)\emulrotate.lib \
$(_COMMONOAKROOT)\lib\$(_CPUINDPATH)\gperotate.lib
!ELSE
$(_COMMONOAKROOT)\lib\$(_CPUINDPATH)\emul.lib \
$(_COMMONOAKROOT)\lib\$(_CPUINDPATH)\gpe.lib
!ENDIF
SOURCELIBS= \
!IFDEF CLEARTYPE
!IFDEF ROTATE
$(_COMMONOAKROOT)\lib\$(_CPUINDPATH)\rctblt.lib
!ELSE
$(_COMMONOAKROOT)\lib\$(_CPUINDPATH)\ctblt.lib
!ENDIF
!ENDIF
WINCEMAP=1
SOURCES=s3c2410xlcd.cpp
platform.bib修改红色部分:
; ; @CESYSGEN IF CE_MODULES_DISPLAY
; IF BSP_NODISPLAY !
; s3c2410x_lcd.dll $(_FLATRELEASEDIR)\s3c2410x_lcd.dll NK SH
; ENDIF BSP_NODISPLAY !
; ; @CESYSGEN ENDIF CE_MODULES_DISPLAY
; @CESYSGEN IF CE_MODULES_DISPLAY
IF BSP_NODISPLAY !
s3c2410xlcd.dll $(_FLATRELEASEDIR)\s3c2410xlcd.dll NK SH
ENDIF BSP_NODISPLAY !
; @CESYSGEN ENDIF CE_MODULES_DISPLAY
platform.reg修改红色部分:
; @CESYSGEN IF CE_MODULES_DISPLAY
IF BSP_NODISPLAY !
[HKEY_LOCAL_MACHINE\Drivers\Display\S3C2410xLCD\CONFIG]
"DisplayDll"="s3c2410xlcd.dll"
"LCDVirtualFrameBase"=dword:ac100000
"LCDPhysicalFrameBase"=dword:30100000
[HKEY_LOCAL_MACHINE\System\GDI\Drivers]
"Display"="s3c2410xlcd.dll"
; ; @CESYSGEN IF CE_MODULES_DISPLAY
; IF BSP_NODISPLAY !
; [HKEY_LOCAL_MACHINE\Drivers\Display\S3C2410\CONFIG]
; "DisplayDll"="s3c2410x_lcd.dll"
; "LCDVirtualFrameBase"=dword:ac100000
; "LCDPhysicalFrameBase"=dword:30100000
;
; [HKEY_LOCAL_MACHINE\System\GDI\Drivers]
; "Display"="s3c2410x_lcd.dll"
烦请高手指点帮助,谢谢!
[ 本帖最后由 djy0511 于 2012-11-22 08:47 编辑 ]