gooogleman

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

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

// 作者:wogoyixikexie@gliet

//论坛账号:gooogleman (经常在CSDN出没)

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

// 平台:wince5.0 2440 5.0 BSP

// 发布日期:2009年6月18日 9:49:38

// 最后修改:

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

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

作者:wogoyixikexie@gliet(注意转载请标明原创作者)
flash 盘符出来了,就到SD卡驱动了。哈哈,有了ztg0021牛人打开了石山,现在我就方便多了
sdiocontrollerbase.cpp修改
  1):找到下面两句注释掉,他们是成对出现的,共有四处共八句
  SD_SET_PROC_PERMISSIONS_FROM_REQUEST( pRequest ) {     
  } SD_RESTORE_PROC_PERMISSIONS();
编译有错
错误 14 BUILD: [01:0000000096:ERRORE] NMAKE :  U1073: don't know how to make

'H:\WINCE600\OSDesigns\Try2440CE6\Try2440CE6\Wince600

\QxCE6BSP_ARMV4I\cesysgen\oak\lib\ARMV4I\retail\sdcardlib.lib' 
哦,估计是我没有选上SD卡组件编译的原因。我看看这个sdcardlib.lib在wince6.0中的哪里,看看是否需要修

改sources。

发现PXA270 用了它,那wince6.0有这玩意。

注册表我采用以前的,现在不用改了。
至于挂载什么文件系统,在platform.reg没有找到,估计要改动要自己增加才行。现在暂时默认的先。
在platform.bib中加入
; @CESYSGEN IF CE_MODULES_SDBUS
IF BSP_SDHC_SC2440
   sdhc_sc2440.dll    $(_FLATRELEASEDIR)\sdhc_sc2440.dll        NK  SHK
ENDIF BSP_SDHC_SC2440
; @CESYSGEN ENDIF CE_MODULES_SDBUS
就可以了,不过我找CE_MODULES_SDBUS这个环境变量找不到在哪里定义的。我看wince6.0自带的BSP都有,所以

我就直接加上去了。

对了还有BSP_SDHC_SC2440要设置一下。在QxCE6BSP.bat中set BSP_SDHC_SC2440=1
点击重新生成工程,哈哈,希望一炮通过!

编译是通过了,可是非常雷人。
NK也打包进去了。可是SD卡盘符没有出现。
先打开debug信息看看先。
晕,修改代码后编译,会这样?
错误 4 Error: Could not open 'H:\WINCE600\OSDesigns\Try2440CE6\Try2440CE6

\RelDir\QxCE6BSP_ARMV4I_Debug\NK.bin' for writing 

哦,是这样啊,原来我打开了nk.bin没有关闭。哈哈,雷人!

还是不能识别卡啊,老是说CMD5 超时
SDHCD:SetClockRate() - Clock rate set to 260190 Hz
SDHCD: Clock started...
SDHCDSlotOptionHandler starts
SDHCDSlotOptionHandler option=SDHCDSetSlotInterface
SDHCD: Clock stopped...
SDHCD:SetClockRate() - Clock rate set to 260190 Hz
SDHCD: Clock started...
SDHCDSlotOptionHandler ends
BusRequestHandler starts (CMD:5)
SDHCD: Clock started...
SendCommand (0xd0416180, 0x0005, 0x00000000, 0x0005, 0x0) starts
sendSDICommand short response required
SDHCD:BusRequestHandler ends
GetCommandResponse started
GetCommandResponse returned SD_API_STATUS_RESPONSE_TIMEOUT (COMMAND_TIMED_OUT)
SDHCD:SDHCDBusRequestHandler() - Error getting response for command:0x05
SDHCD: Clock stopped...
BusRequestHandler starts (CMD:5)
SDHCD: Clock started...
SendCommand (0xd0416180, 0x0005, 0x00000000, 0x0005, 0x0) starts
sendSDICommand short response required
SDHCD:BusRequestHandler ends
GetCommandResponse started
GetCommandResponse returned SD_API_STATUS_RESPONSE_TIMEOUT (COMMAND_TIMED_OUT)
SDHCD:SDHCDBusRequestHandler() - Error getting response for command:0x05
SDHCD: Clock stopped...
BusRequestHandler starts (CMD:5)
SDHCD: Clock started...
SendCommand (0xd0416180, 0x0005, 0x00000000, 0x0005, 0x0) starts
sendSDICommand short response required
SDHCD:BusRequestHandler ends
GetCommandResponse started
GetCommandResponse returned SD_API_STATUS_RESPONSE_TIMEOUT (COMMAND_TIMED_OUT)
SDHCD:SDHCDBusRequestHandler() - Error getting response for command:0x05
SDHCD: Clock stopped...
BusRequestHandler starts (CMD:5)
SDHCD: Clock started...
SendCommand (0xd0416180, 0x0005, 0x00000000, 0x0005, 0x0) starts
sendSDICommand short response required
SDHCD:BusRequestHandler ends
GetCommandResponse started
GetCommandResponse returned SD_API_STATUS_RESPONSE_TIMEOUT (COMMAND_TIMED_OUT)
SDHCD:SDHCDBusRequestHandler() - Error getting response for command:0x05
SDHCD: Clock stopped...
BusRequestHandler starts (CMD:0)
SDHCD: Clock started...
SendCommand (0xd0416180, 0x0000, 0x00000000, 0x0000, 0x0) starts
SendCommand no response required
SDHCD:BusRequestHandler ends
SDHCD: Clock stopped...
BusRequestHandler starts (CMD:8)
SDHCD: Clock started...
SendCommand (0xd0416180, 0x0008, 0x0000015a, 0x0008, 0x0) starts
sendSDICommand short response required
SDHCD:BusRequestHandler ends
GetCommandResponse started
GetCommandResponse returned SD_API_STATUS_SUCCESS
SDHCD: Clock stopped...
BusRequestHandler starts (CMD:1)
SDHCD: Clock started...
SendCommand (0xd0416180, 0x0001, 0x00300000, 0x0004, 0x0) starts
sendSDICommand short response required
SDHCD:BusRequestHandler ends
GetCommandResponse started
GetCommandResponse returned SD_API_STATUS_RESPONSE_TIMEOUT (COMMAND_TIMED_OUT)
SDHCD:SDHCDBusRequestHandler() - Error getting response for command:0x01
SDHCD: Clock stopped...
BusRequestHandler starts (CMD:1)
SDHCD: Clock started...
SendCommand (0xd0416180, 0x0001, 0x00300000, 0x0004, 0x0) starts
sendSDICommand short response required
SDHCD:BusRequestHandler ends
GetCommandResponse started
GetCommandResponse returned SD_API_STATUS_RESPONSE_TIMEOUT (COMMAND_TIMED_OUT)
SDHCD:SDHCDBusRequestHandler() - Error getting response for command:0x01
SDHCD: Clock stopped...
BusRequestHandler starts (CMD:1)
SDHCD: Clock started...
SendCommand (0xd0416180, 0x0001, 0x00300000, 0x0004, 0x0) starts
sendSDICommand short response required
SDHCD:BusRequestHandler ends
GetCommandResponse started
GetCommandResponse returned SD_API_STATUS_RESPONSE_TIMEOUT (COMMAND_TIMED_OUT)
SDHCD:SDHCDBusRequestHandler() - Error getting response for command:0x01
SDHCD: Clock stopped...
BusRequestHandler starts (CMD:1)
SDHCD: Clock started...
SendCommand (0xd0416180, 0x0001, 0x00300000, 0x0004, 0x0) starts
sendSDICommand short response required
SDHCD:BusRequestHandler ends
GetCommandResponse started
GetCommandResponse returned SD_API_STATUS_RESPONSE_TIMEOUT (COMMAND_TIMED_OUT)
SDHCD:SDHCDBusRequestHandler() - Error getting response for command:0x01
SDHCD: Clock stopped...
BusRequestHandler starts (CMD:55)
SDHCD: Clock started...
SendCommand (0xd0416180, 0x0037, 0x00000000, 0x0001, 0x0) starts
sendSDICommand short response required
SDHCD:BusRequestHandler ends
GetCommandResponse started
GetCommandResponse returned SD_API_STATUS_SUCCESS
SDHCD: Clock stopped...
BusRequestHandler starts (CMD:41)
SDHCD: Clock started...
SendCommand (0xd0416180, 0x0029, 0x40300000, 0x0004, 0x0) starts
sendSDICommand short response required
SDHCD:BusRequestHandler ends
GetCommandResponse started
GetCommandResponse returned SD_API_STATUS_SUCCESS
SDHCD: Clock stopped...
SDHCDSlotOptionHandler starts
SDHCDSlotOptionHandler option=SDHCDSetSlotPower
SDHCDSlotOptionHandler ends
BusRequestHandler starts (CMD:0)
SDHCD: Clock started...
SendCommand (0xd0416180, 0x0000, 0x00000000, 0x0000, 0x0) starts
SendCommand no response required
SDHCD:BusRequestHandler ends
SDHCD: Clock stopped...
BusRequestHandler starts (CMD:8)
SDHCD: Clock started...
SendCommand (0xd0416180, 0x0008, 0x0000015a, 0x0008, 0x0) starts
sendSDICommand short response required
SDHCD:BusRequestHandler ends
GetCommandResponse started
GetCommandResponse returned SD_API_STATUS_SUCCESS
SDHCD: Clock stopped...
BusRequestHandler starts (CMD:55)
SDHCD: Clock started...
SendCommand (0xd0416180, 0x0037, 0x00000000, 0x0001, 0x0) starts
sendSDICommand short response required
SDHCD:BusRequestHandler ends
GetCommandResponse started
GetCommandResponse returned SD_API_STATUS_SUCCESS
SDHCD: Clock stopped...
BusRequestHandler starts (CMD:41)
SDHCD: Clock started...
SendCommand (0xd0416180, 0x0029, 0x40100000, 0x0004, 0x0) starts
sendSDICommand short response required
SDHCD:BusRequestHandler ends
GetCommandResponse started
GetCommandResponse returned SD_API_STATUS_SUCCESS
SDHCD: Clock stopped...
BusRequestHandler starts (CMD:55)
SDHCD: Clock started...
SendCommand (0xd0416180, 0x0037, 0x00000000, 0x0001, 0x0) starts
sendSDICommand short response required
SDHCD:BusRequestHandler ends
GetCommandResponse started
GetCommandResponse returned SD_API_STATUS_SUCCESS
SDHCD: Clock stopped...
BusRequestHandler starts (CMD:41)
SDHCD: Clock started...
SendCommand (0xd0416180, 0x0029, 0x40100000, 0x0004, 0x0) starts
sendSDICommand short response required
SDHCD:BusRequestHandler ends
GetCommandResponse started
GetCommandResponse returned SD_API_STATUS_SUCCESS
SDHCD: Clock stopped...
BusRequestHandler starts (CMD:2)
SDHCD: Clock started...
SendCommand (0xd0416180, 0x0002, 0x00000000, 0x0003, 0x0) starts
sendSDICommand long response required
SDHCD:BusRequestHandler ends
GetCommandResponse started
GetCommandResponse returned SD_API_STATUS_SUCCESS
SDHCD: Clock stopped...
BusRequestHandler starts (CMD:3)
SDHCD: Clock started...
SendCommand (0xd0416180, 0x0003, 0x00000000, 0x0007, 0x0) starts
sendSDICommand short response required
SDHCD:BusRequestHandler ends
GetCommandResponse started
GetCommandResponse returned SD_API_STATUS_SUCCESS
SDHCD: Clock stopped...
BusRequestHandler starts (CMD:9)
SDHCD: Clock started...
SendCommand (0xd0416180, 0x0009, 0x12340000, 0x0003, 0x0) starts
sendSDICommand long response required
SDHCD:BusRequestHandler ends
GetCommandResponse started
GetCommandResponse returned SD_API_STATUS_SUCCESS
SDHCD: Clock stopped...
BusRequestHandler starts (CMD:13)
SDHCD: Clock started...
SendCommand (0xd0416180, 0x000d, 0x12340000, 0x0001, 0x0) starts
sendSDICommand short response required
SDHCD:BusRequestHandler ends
GetCommandResponse started
GetCommandResponse returned SD_API_STATUS_SUCCESS
SDHCD: Clock stopped...
BusRequestHandler starts (CMD:7)
SDHCD: Clock started...
SendCommand (0xd0416180, 0x0007, 0x12340000, 0x0002, 0x0) starts
sendSDICommand short response required
SDHCD:BusRequestHandler ends
GetCommandResponse started
GetCommandResponse returned SD_API_STATUS_SUCCESS
SDHCD: Clock stopped...
BusRequestHandler starts (CMD:55)
SDHCD: Clock started...
SendCommand (0xd0416180, 0x0037, 0x12340000, 0x0001, 0x0) starts
sendSDICommand short response required
SDHCD:BusRequestHandler ends
GetCommandResponse started
GetCommandResponse returned SD_API_STATUS_SUCCESS
SDHCD: Clock stopped...
BusRequestHandler starts (CMD:51)
SDHCD: Clock started...
SendCommand (0xd0416180, 0x0033, 0x00000000, 0x0001, 0x1) starts
sendSDICommand short response required
SDHCD:BusRequestHandler ends
GetCommandResponse started
GetCommandResponse returned SD_API_STATUS_SUCCESS
SDHCD: Clock stopped...
BusRequestHandler starts (CMD:55)
SDHCD: Clock started...
SendCommand (0xd0416180, 0x0037, 0x12340000, 0x0001, 0x0) starts
sendSDICommand short response required
SDHCD:BusRequestHandler ends
GetCommandResponse started
GetCommandResponse returned SD_API_STATUS_SUCCESS
SDHCD: Clock stopped...
BusRequestHandler starts (CMD:42)
SDHCD: Clock started...
SendCommand (0xd0416180, 0x002a, 0x00000000, 0x0001, 0x0) starts
sendSDICommand short response required
SDHCD:BusRequestHandler ends
GetCommandResponse started
GetCommandResponse returned SD_API_STATUS_SUCCESS
SDHCD: Clock stopped...
SDHCDSlotOptionHandler starts
SDHCDSlotOptionHandler option=SDHCDGetWriteProtectStatus
SDHCDSlotOptionHandler ends
BusRequestHandler starts (CMD:55)
SDHCD: Clock started...
SendCommand (0xd0416180, 0x0037, 0x12340000, 0x0001, 0x0) starts
sendSDICommand short response required
SDHCD:BusRequestHandler ends
GetCommandResponse started
GetCommandResponse returned SD_API_STATUS_SUCCESS
SDHCD: Clock stopped...
BusRequestHandler starts (CMD:6)
SDHCD: Clock started...
SendCommand (0xd0416180, 0x0006, 0x00000000, 0x0001, 0x0) starts
sendSDICommand short response required
SDHCD:BusRequestHandler ends
GetCommandResponse started
GetCommandResponse returned SD_API_STATUS_SUCCESS
SDHCD: Clock stopped...
SDHCDSlotOptionHandler starts
SDHCDSlotOptionHandler option=SDHCDSetSlotInterface
SDHCD:SetClockRate() - Clock rate set to 22202880 Hz
SDHCDSlotOptionHandler ends
BusRequestHandler starts (CMD:16)
SDHCD: Clock started...
SendCommand (0xd0416180, 0x0010, 0x00000200, 0x0001, 0x0) starts
sendSDICommand short response required
SDHCD:BusRequestHandler ends
GetCommandResponse started
GetCommandResponse returned SD_API_STATUS_SUCCESS
SDHCD: Clock stopped...
BusRequestHandler starts (CMD:17)
SDHCD: Clock started...
SendCommand (0xd0416180, 0x0011, 0x00000000, 0x0001, 0x1) starts
sendSDICommand short response required
SDHCD:BusRequestHandler ends
GetCommandResponse started
GetCommandResponse returned SD_API_STATUS_SUCCESS
SDHCD: Clock stopped...
BusRequestHandler starts (CMD:17)
SDHCD: Clock started...
SendCommand (0xd0416180, 0x0011, 0x00000000, 0x0001, 0x1) starts
sendSDICommand short response required
SDHCD:BusRequestHandler ends
GetCommandResponse started
GetCommandResponse returned SD_API_STATUS_SUCCESS
SDHCD: Clock stopped...
BusRequestHandler starts (CMD:7)
SDHCD: Clock started...
SendCommand (0xd0416180, 0x0007, 0x00000000, 0x0000, 0x0) starts
SendCommand no response required
SDHCD:BusRequestHandler ends
SDHCD: Clock stopped...
BusRequestHandler starts (CMD:13)
SDHCD: Clock started...
SendCommand (0xd0416180, 0x000d, 0x12340000, 0x0001, 0x0) starts
sendSDICommand short response required
SDHCD:BusRequestHandler ends
GetCommandResponse started
GetCommandResponse returned SD_API_STATUS_SUCCESS
SDHCD: Clock stopped...

汗,我把SD_SET_PROC_PERMISSIONS_FROM_REQUEST( pRequest ) {     
  } SD_RESTORE_PROC_PERMISSIONS();
大括号内的
fNoException = SDPerformSafeCopy( m_pDMABuffer, pRequest->pBlockBuffer, m_dwNumBytesToTransfer );
都删除了,朋友说不能删除的。晕,恢复回来..........果然可以了。

 


 

posted on 2009-06-18 10:03  gooogleman.烟雨漓江  阅读(1425)  评论(2编辑  收藏  举报