把FL2440 的调试串口改为普通串口的方法
来源:互联网 发布:网络抓包工具sniffer 编辑:程序博客网 时间:2024/04/29 02:52
把FL2440 的调试串口改为普通串口的方法
昨天,胡sir问我如何把FL2440 的调试串口改为普通串口,我答应他晚上回去看看,晕,昨晚忘记带笔记本电源回去了。所以现在立即补上——我没有在平台上试过,不过我看了一下BSP,我觉得应该是按照如下步骤改的
一、看F:/开发板光盘/FL24402010.01.28/FL2440/Wince/BSP源码包/SMDK2440A_091112/SMDK2440A/Src/Kernel/Oal 下的debug.c文件有:复制代码如上说明FL2440 采用了 uart0作为 debug 串口。
再看F:/开发板光盘/FL24402010.01.28/FL2440/Wince/BSP源码包/SMDK2440A_091112/SMDK2440A 下的SMDK2440A.bat文件有
@REM DEBUG SERIAL PORT
@REM You also need to change the macro definition in debug.c
REM set DEBUG_SERIAL=
set DEBUG_SERIAL=SERIAL_UART0
REM set DEBUG_SERIAL=SERIAL_UART1
呵呵,正好和debug.c对应。
再来看F:/开发板光盘/FL24402010.01.28/FL2440/Wince/BSP源码包/SMDK2440A_091112/SMDK2440A/Files 下的platform.reg复制代码从上面可以看出,Fl2440 已经有了三个串口作为普通串口驱动注册表信心,甚至红外也保留了。
现在来看最后一步,看看串口驱动的源码F:/开发板光盘/FL24402010.01.28/FL2440/Wince/BSP源码包/SMDK2440A_091112/SMDK2440A/Src/Drivers/Serial/ser_smdk2440.cpp复制代码这个说明FL2440 已经完全具备三串口驱动,所以大家放心,调试串口很容易修改的。下面是修改结论:
一、F:/开发板光盘/FL24402010.01.28/FL2440/Wince/BSP源码包/SMDK2440A_091112/SMDK2440A/Src/Kernel/Oal 下的debug.c
中的#define DEBUG_SERIAL_UART0 1 屏蔽(//#define DEBUG_SERIAL_UART0 1)
二、F:/开发板光盘/FL24402010.01.28/FL2440/Wince/BSP源码包/SMDK2440A_091112/SMDK2440A 下的SMDK2440A.bat文件 的
set DEBUG_SERIAL=SERIAL_UART0 屏蔽(@set DEBUG_SERIAL=SERIAL_UART0) 即可,重新编译整个BSP,打包,我想这样com1 就可以当普通串口用了。呵呵。
一、看F:/开发板光盘/FL24402010.01.28/FL2440/Wince/BSP源码包/SMDK2440A_091112/SMDK2440A/Src/Kernel/Oal 下的debug.c文件有:
- //------------------------------------------------------------------------------
- // Defines
- #define DEBUG_SERIAL_UART0 1
- //#define DEBUG_SERIAL_UART1 1
- #ifdef DEBUG_SERIAL_UART0
- #define FEILING_DEBUG 1
- #elif DEBUG_SERIAL_UART1
- #define FEILING_DEBUG 1
- #else
- #define FEILING_DEBUG 0
- #endif
- //------------------------------------------------------------------------------
再看F:/开发板光盘/FL24402010.01.28/FL2440/Wince/BSP源码包/SMDK2440A_091112/SMDK2440A 下的SMDK2440A.bat文件有
@REM DEBUG SERIAL PORT
@REM You also need to change the macro definition in debug.c
REM set DEBUG_SERIAL=
set DEBUG_SERIAL=SERIAL_UART0
REM set DEBUG_SERIAL=SERIAL_UART1
呵呵,正好和debug.c对应。
再来看F:/开发板光盘/FL24402010.01.28/FL2440/Wince/BSP源码包/SMDK2440A_091112/SMDK2440A/Files 下的platform.reg
- ; @CESYSGEN IF CE_MODULES_SERIAL
- IF BSP_NOSERIAL !
- IF BSP_NOUART0 !
- IF BSP_KITL != SERIAL_UART0
- IF DEBUG_SERIAL != SERIAL_UART0 ;这个宏定义造成uart0的驱动没有被加载成普通串口,呵呵,若要做普通串口,在SMDK2440A.bat把这个环境变量去掉
- ;=============== UART0 (physical COM1 connector P1) (Serial) ===============
- [HKEY_LOCAL_MACHINE/Drivers/BuiltIn/Serial]
- "DeviceArrayIndex"=dword:0
- "Irq"=dword:1c
- "MemBase"=dword:50000000
- "MemLen"=dword:2C
- "InterruptBitsShift"=dword:0 ; UART 0 Interrupt Sub Register shift bit.
- "ISTTimeouts"=dword:200 ; every 512 ticks checking Modem status.
- "Prefix"="COM"
- "Index"=dword:1
- "Dll"="serial_smdk2440.dll"
- "Order"=dword:4
- "Priority"=dword:0
- "Port"="COM1:"
- "DeviceType"=dword:0
- "FriendlyName"=LOC_DISPLAYNAME_COM1
- "Tsp"="unimodem.dll"
- "IClass"="{CC5195AC-BA49-48a0-BE17-DF6D1B0173DD}"
- "DevConfig"=hex: 10,00, 00,00, 05,00,00,00, 10,01,00,00, 00,4B,00,00, 00,00, 08, 00, 00, 00,00,00,00
- ENDIF
- ENDIF
- ENDIF
- IF BSP_NOUART1 !
- IF BSP_KITL != SERIAL_UART1
- IF DEBUG_SERIAL != SERIAL_UART1
- ;=============== UART1 (physical COM2 connector P2) (Serial) ===============
- [HKEY_LOCAL_MACHINE/Drivers/BuiltIn/Serial1]
- "DeviceArrayIndex"=dword:1
- "Irq"=dword:17
- "MemBase"=dword:50004000
- "MemLen"=dword:2C
- "InterruptBitsShift"=dword:3 ; UART 1 Interrupt Sub Register shift bit.
- "ISTTimeouts"=dword:200 ; every 512 ticks checking Modem status.
- "Prefix"="COM"
- "Index"=dword:2
- "Dll"="serial_smdk2440.dll"
- "Order"=dword:4
- "Priority"=dword:0
- "Port"="COM2:"
- "DeviceType"=dword:0
- "FriendlyName"=LOC_DISPLAYNAME_COM2
- "Tsp"="unimodem.dll"
- "IClass"="{CC5195AC-BA49-48a0-BE17-DF6D1B0173DD}"
- "DevConfig"=hex: 10,00, 00,00, 05,00,00,00, 10,01,00,00, 00,4B,00,00, 00,00, 08, 00, 00, 00,00,00,00
- ENDIF
- ENDIF
- ENDIF
- IF BSP_NOUART2 !
- IF BSP_KITL != SERIAL_UART2
- ;=============== UART2 (physical COM3 connector P2) (Serial) ===============
- [HKEY_LOCAL_MACHINE/Drivers/BuiltIn/Serial2]
- "DeviceArrayIndex"=dword:1
- "Irq"=dword:f
- "MemBase"=dword:50008000
- "MemLen"=dword:2C
- "InterruptBitsShift"=dword:6 ; UART 2 Interrupt Sub Register shift bit.
- "ISTTimeouts"=dword:200 ; every 512 ticks checking Modem status.
- "Prefix"="COM"
- "Index"=dword:3
- "Dll"="serial_smdk2440.dll"
- "Order"=dword:4
- "Priority"=dword:0
- "Port"="COM3:"
- "DeviceType"=dword:0
- "FriendlyName"="Serial Cable on COM3";LOC_DISPLAYNAME_COM3
- "Tsp"="unimodem.dll"
- "IClass"="{CC5195AC-BA49-48a0-BE17-DF6D1B0173DD}"
- "DevConfig"=hex: 10,00, 00,00, 05,00,00,00, 10,01,00,00, 00,4B,00,00, 00,00, 08, 00, 00, 00,00,00,00
- ENDIF
- ENDIF
- IF BSP_NOIRDA !
- ; S2440 IrDA(UART2)
- [HKEY_LOCAL_MACHINE/Drivers/BuiltIn/IRDA2440]
- "DeviceArrayIndex"=dword:2
- "Irq"=dword:f
- "MemBase"=dword:50008000
- "MemLen"=dword:2C
- "InterruptBitsShift"=dword:6 ; UART 2 Interrupt Sub Register shift bit.
- ;"ISTTimeouts"=dword:200 ; every 512 ticks checking Modem status.
- "Prefix"="COM"
- "Index"=dword:4
- "Dll"="serial_smdk2440.Dll"
- "Order"=dword:4
- "Priority"=dword:0
- "Port"="COM4:"
- "DeviceType"=dword:0 ; IRDA modem, 0 -> null modem
- "FriendlyName"=LOC_DISPLAYNAME_RAWIR
- "IClass"="{CC5195AC-BA49-48a0-BE17-DF6D1B0173DD}"
- "DevConfig"=hex: 10,00, 00,00, 05,00,00,00, 10,01,00,00, 00,4B,00,00, 00,00, 08, 00, 00, 00,00,00,00
- ENDIF
- [HKEY_LOCAL_MACHINE/Comm/Irsir1/Parms]
- "Port"=dword:4
- ; 0 = Use external dongle, 1 = Use internal IR
- "IntIR"=dword:1
- ; 0 - internal transceiver, 1 - Extended Systems JetEye dongle.
- "TransceiverType"=dword:0
- ENDIF BSP_NOSERIAL !
- ;=========== End of UART(Serial) ===============
- ; @CESYSGEN ENDIF CE_MODULES_SERIAL
现在来看最后一步,看看串口驱动的源码F:/开发板光盘/FL24402010.01.28/FL2440/Wince/BSP源码包/SMDK2440A_091112/SMDK2440A/Src/Drivers/Serial/ser_smdk2440.cpp
- CSerialPDD * CreateSerialObject(LPTSTR lpActivePath, PVOID pMdd,PHWOBJ pHwObj, DWORD DeviceArrayIndex)
- {
- CSerialPDD * pSerialPDD = NULL;
- switch (DeviceArrayIndex) {
- case 0:
- pSerialPDD = new CPdd2440Serial1(lpActivePath,pMdd, pHwObj);
- break;
- case 1:
- pSerialPDD = new CPdd2440Serial2(lpActivePath,pMdd, pHwObj);
- break;
- case 2:
- pSerialPDD = new CPdd2440Serial3(lpActivePath,pMdd, pHwObj);
- break;
- }
- if (pSerialPDD && !pSerialPDD->Init()) {
- delete pSerialPDD;
- pSerialPDD = NULL;
- }
- return pSerialPDD;
- }
一、F:/开发板光盘/FL24402010.01.28/FL2440/Wince/BSP源码包/SMDK2440A_091112/SMDK2440A/Src/Kernel/Oal 下的debug.c
中的#define DEBUG_SERIAL_UART0 1 屏蔽(//#define DEBUG_SERIAL_UART0 1)
二、F:/开发板光盘/FL24402010.01.28/FL2440/Wince/BSP源码包/SMDK2440A_091112/SMDK2440A 下的SMDK2440A.bat文件 的
set DEBUG_SERIAL=SERIAL_UART0 屏蔽(@set DEBUG_SERIAL=SERIAL_UART0) 即可,重新编译整个BSP,打包,我想这样com1 就可以当普通串口用了。呵呵。
- 把FL2440 的调试串口改为普通串口的方法
- 把FL2440 的调试串口改为普通串口的方法
- wince 6.0 如何把调试串口改为普通串口
- imx280调试串口转换成普通串口的方法
- linux2.6.32.2内核把mini2440的UART2改为普通的串口驱动
- linux2.6.32.2内核把mini2440的UART2改为普通的串口驱动
- 如何把wince Sate210 的调试串口(com3-uart2)改成普通串口
- wince去掉串口0的DEBUG模式,改为普通模式
- WINCE6.0 把调试串口改为通用串口
- 基于fl2440的串口通信
- wince的调试串口作为普通串口使用
- 修改SMDK6410的调试串口为普通串口(wince系统)
- 修改SMDK6410的调试串口为普通串口(wince系统)
- 修改SMDK6410的调试串口为普通串口(wince系统)
- 修改SMDK6410的调试串口为普通串口(wince系统)
- wince的调试串口作为普通串口使用
- 修改SMDK6410的调试串口为普通串口(wince系统)
- wince的调试串口作为普通串口使用
- Linux命令study
- 一起来学周易(8)——六冲
- 分页 - sql server 2005
- 玩转内接多边形(六):任意凸多边形内均存在内接正方形
- 玩转内接多边形(五):任意多边形内均存在内接菱形
- 把FL2440 的调试串口改为普通串口的方法
- (转)C++中extern “C”含义深层探索
- VMWARE安装LINUX
- 学习驱动开发需要看的几本书籍!制定个学习计划,给自已以动力!
- 用ProxyFactoryBean创建AOP代理
- 一起来学周易(9)——三合局
- stringstream 使用
- 第二篇drupal文章
- 用perl统计一个六种类型的数据