3146|3

65

帖子

0

TA的资源

一粒金砂(初级)

楼主
 

MmMapIoSpace使用时候出现连接错误 [复制链接]

在写一个驱动程序的时候用到ceddk.lib一个函数MmMapIoSpace(),编译后连接出现错误:
GIO.obj : error LNK2019: unresolved external symbol _MmMapIoSpace referenced in function "unsigned long __cdecl GIO_Init(unsigned short const *,void const *)" (?GIO_Init@@YAKPBGPBX@Z)
GIO.obj : error LNK2019: unresolved external symbol _MmUnmapIoSpace referenced in function "int __cdecl GIO_Deinit(unsigned long)" (?GIO_Deinit@@YAHK@Z)

分析原因是没有连接ceddk.lib,但是把源文件开始处加上#pragma comment(lib, "ceddk.lib"),或者project->settings的link中输入ceddk.lib,然后在tools   -》options中添加ceddm.lib所在的目录,都解决不了问题。

最新回复

大哥,你的问题解决了吗?能否说说你的解决办法?  详情 回复 发表于 2008-9-17 16:52
点赞 关注

回复
举报

69

帖子

0

TA的资源

一粒金砂(初级)

沙发
 
你应用程序是针对哪一个CE的平台写的?
 
 

回复

86

帖子

0

TA的资源

一粒金砂(初级)

板凳
 
转贴:
This procedure is fairly straightforward, and allows easy access to the hardware registers of many types of CPUs and peripherals in a Windows CE system.  Usually this is accomplished via one of two mechanisms:

1)      VirtualAlloc() + VirtualCopy() / VirtualFree()

a.       A range of virtual address space is allocated that can map the physical space needed.

b.      The virtual to physical mapping is set up for those pages

c.       When necessary, the range of virtual pages is released and the mapping destroyed.

-OR-

2)      MmMapIoSpace() / MmUnmapIoSpace()

a.       This effectively does both of the (a) and (b) steps above in one function call, with fixups on the address if it is not page-aligned.

The functions in (1) are exported to all drivers and applications.  The functions in (2) are implemented as part of the CEDDK (CE Driver Development Kit), and are customizable for any particular platform.
 
 
 

回复

67

帖子

0

TA的资源

一粒金砂(初级)

4
 
大哥,你的问题解决了吗?能否说说你的解决办法?
 
 
 

回复
您需要登录后才可以回帖 登录 | 注册

随便看看
查找数据手册?

EEWorld Datasheet 技术支持

相关文章 更多>>
关闭
站长推荐上一条 1/10 下一条

 
EEWorld订阅号

 
EEWorld服务号

 
汽车开发圈

About Us 关于我们 客户服务 联系方式 器件索引 网站地图 最新更新 手机版

站点相关: 国产芯 安防电子 汽车电子 手机便携 工业控制 家用电子 医疗电子 测试测量 网络通信 物联网

北京市海淀区中关村大街18号B座15层1530室 电话:(010)82350740 邮编:100190

电子工程世界版权所有 京B2-20211791 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号 Copyright © 2005-2025 EEWORLD.com.cn, Inc. All rights reserved
快速回复 返回顶部 返回列表