2440/2416/6410/S5PV210之wince+android系统驱动开发者

等待新发生的事情

  博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::

如何使用EVC写寄存器读写软件(作者:wogoyixikexie@gliet)

//-----------------------------------------------------------------------------------------------------------

// 作者:wogoyixikexie@gliet

// 版权:桂林电子科技大学一系科协wogoyixikexie@gliet

// 平台:wince5.0 2440 5.0 BSP

// 发布日期:2009年5月15日 16:54:47

// 最后修改:

// 注意事项:未经作者同意,不得在转载的时候擅自修改、删除文章的任何部分

//-----------------------------------------------------------------------------------------------------------

     

      记得在sunrain_hjb的博客里面有wince寄存器读写软件介绍,这个小工具非常强悍,曾经帮我解决了好多问题。但是没有源码,今天正好有空,我来研究一下。本来想使用IDA看看sunrain_hjb使用了什么函数的,可是居然看不到,只能看到它用了CEDDK.dl,后来仔细想想,MmMapIoSpace正是在CEDDK.dl中的,于是我就开始行动起来。

   操作过程以及遇到的问题


--------------------Configuration: DlgDemo - Win32 (WCE ARMV4I) Release--------------------
Compiling...
DlgDemoDlg.cpp
C:\Documents and Settings\user\桌面\2.6 对话框控件\DlgDemoDlg.cpp(155) : error C2065:

'PHYSICAL_ADDRESS' : undeclared identifier
C:\Documents and Settings\user\桌面\2.6 对话框控件\DlgDemoDlg.cpp(155) : error C2146: syntax

error : missing ';' before identifier 'PortAddress'
C:\Documents and Settings\user\桌面\2.6 对话框控件\DlgDemoDlg.cpp(155) : error C2065:

'PortAddress' : undeclared identifier
C:\Documents and Settings\user\桌面\2.6 对话框控件\DlgDemoDlg.cpp(155) : error C2059: syntax

error : '{'
C:\Documents and Settings\user\桌面\2.6 对话框控件\DlgDemoDlg.cpp(155) : error C2143: syntax

error : missing ';' before '{'
C:\Documents and Settings\user\桌面\2.6 对话框控件\DlgDemoDlg.cpp(155) : error C2143: syntax

error : missing ';' before '}'
C:\Documents and Settings\user\桌面\2.6 对话框控件\DlgDemoDlg.cpp(156) : error C2065:

'MmMapIoSpace' : undeclared identifier
C:\Documents and Settings\user\桌面\2.6 对话框控件\DlgDemoDlg.cpp(174) : fatal error C1004:

unexpected end of file found
Error executing clarm.exe.

DlgDemoDlg.obj - 8 error(s), 0 warning(s)

加入#include <ceddk.h>
#pragma comment(lib,"ceddk.lib")

c:\program files\windows ce tools\wce500\armsys2440\include\armv4i\ceddk.h(1103) : fatal error

C1083: Cannot open include file: 'pkfuncs.h': No such file or directory


c:\program files\windows ce tools\wce500\armsys2440\include\armv4i\pkfuncs.h(33) : fatal error

C1083: Cannot open include file: 'toolhelp.h': No such file or directory
C:\Documents and Settings\user\桌面\2.6 对话框控件\DlgDemoDlg.cpp(178) : fatal error C1004:

——在PB下找到上述两个头文件,放到 c:\program files\windows ce tools\wce500\armsys2440\include\armv4i 就可以了
后来又有

unexpected end of file found

——晕,原来我在一个for 循环少了个括号。

LINK : fatal error LNK1104: cannot open file 'ceddk.lib'

在project-setting-link-object/library modules
C:\WINCE500\PBWorkspaces\ARMsys2440\WINCE500

\smdk2440a_ARMV4I\cesysgen\oak\lib\ARMV4I\retail\CEDDK.lib
重新编译即可。

    现在把源码贴上,虽然只是几行代码,但是真的非常强大。


 哈哈,就这样成功了。

 

补充说明:

一、据说稍作修改,也可以用在wince6.0上,这个等下个月我移植我的2440 BSP到wince6.0 再尝试了;

二、这个只是简单的例子,但是可以稍作修改就可以变成一些很有用的软件,做的可以很人性化。如果你做好更多的东西,请多指点。

posted on 2010-11-05 10:31  gooogleman  阅读(279)  评论(0编辑  收藏  举报