文/Peter Jiang(译自newlc.com)
安装系统
- 1、在你的手机上安装gdbsudb.sis。这个文件被NOKIA SDK放在这个默认目录里
|
C:/Symbian//6.1/Series60/Epoc32/Release/armi/urel/ |
- 2、关掉手机,启动FExplorer或你的文件管理程序来创建一个名为c:/gdbstub的目录。上传包含下列内容的gdbstud.ini文件到我们新建立的目录。
|
[COMMSERV] PDD=EUART%d LDD=ECOMM CSY=IRCOMM PORT=0 RATE=115200 |
- 3、在PC端创建C:/yyy并创建一个c:/yyy/gdb.ini文件,把下面的内容Ctrl+V进去:
|
symbol-file //c/symbian/6.1/series60/epoc32/release/armi/udeb/xxx.sym epoc-exec-file c:/system/apps/xxx/xxx.app target epoc com2 break NewApplication source //c/symbian/6.1/shared/epoc32/gcc/share/epoc-des.ini |
- 4、用适当的内容来代替xxx和yyy。将你的IrDA端口变成com2.你可能需要在电脑上装一个可以把IrDA映射为COM的软件(例如IrCOMM2k)
编译
|
abld build armi udeb |
如果连接失败是因为它找不到库(第一次通常都是这样),只要把epoc32/release/armi/urel下所有的内容复制到epoc32/release/armi/udeb就OK了。
打包并安装应用程序到手机上。
开始调试
|
gdb.exe -nw |
启动FExplorer并运行c:/ system/programs/gdbstub.exe.IrDA(红外线)连接指示灯将开始闪烁。注意不不需要用connection/IrDA/activate来做这些事,因为gdbstub将会自动打开红外连接。把手机放在PC的红外范围之内,随后打开PC的DOS窗口。进入C:/yyy并键入下列命令
将会出现下列信息:
|
GNU gdb 4.17-psion-98r2 Copyright 1998 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This version of GDB has been modified by Symbian Ltd. to add EPOC support. Type "show epoc-version" to see the EPOC-specific version number. This GDB was configured as "--host=i686-pc-cygwin32 --target=arm-epoc-pe". Breakpoint 1 at 0x(some adress): file NewApplication> (gdb) *prompt* |
点击”run”(gdb),将出现下列内容:
|
Starting program: warning: Application started but no document specified. The application may panic at some point if it is document based and if there is no existing default document. Breakpoint 1 0x(some adress): file NewApplication> Breakpoint 1, NewApplication () at file Current language: auto; currently c++ |
如果你的gdb显示出”Starting program”,但在接下来没有发生别的事,那么你失败了.我有时就会遇到这样的问题,只能通过重启手机(和PC)来解决.如果这样仍然没有解决的话,或许你的IrDA红外线设备有问题。
使用BlueTooth进行设备调试
文/Peter Jiang(译自newlc.com)
- 1、 安装gdbstud.sis到手机上。这个文件在NOKIA SDK中的默认路径为:C:/Symbian/7.0s/Series60_v20/Epoc32/Release/armi/urel/.
你应该在目标上创建一个C:/gdbstub.并在这个目录中使用记事本创建一个gdbstub.ini文件,文件中包含如下内容:
|
标准 |
蓝牙 |
|
[COMMSERV] |
[COMMSERV] |
|
PDD=EUART%d |
PDD=EUART1 |
|
LDD=ECOMM |
LDD=ECOMM |
|
CSY=IRCOMM |
CSY=BTCOMM |
|
PORT=0 |
PORT=0 |
|
RATE=115200 |
RATE=9600 |
- 3、 创建gdb.ini
在你的PC上创建一个目录C:/bbb并把gdb.ini文件放进去。以下是gdb.ini的内容。
|
symbol-file //c/symbian/7.0s/series60_v20/epoc32/release/armi/udeb/aaa.sym epoc-exec-file c:/system/apps/aaa/aaa.app target epoc com3 break NewApplication source //c/symbian/7.0s/shared/epoc32/gcc/share/epoc-des.ini |
注:用你的程序的名字来代替aaa和bbb
检查第三行的端口号并用合适的端口号来代替
com口编号只能在1到4之间
- 4、 编译
应用程序应使用armi udeb进行调试:
|
abld build armi udeb |
如果提示错误或警告,拷贝epoc32/release/armi/urel的所有内容到epoc32/release/armi/udeb中即可。
- 5、 更新pkg文件
现在转向你的应用程序xxx.pkg文件并改变所有路径以便从armi/udeb目录获取编译后的代码。
- ① 在手机上安装FExplorer软件(杂志附加工具包中已提供)。
|
gdb.exe -nw |
将会出现下列信息
|
GNU gdb 4.17-psion-98r2 Copyright 1998 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or Breakpoint 1 at 0x(some adress): file NewApplication> gdb> |
然后在gdb提示中,键入run,将会出现下列信息
|
Starting program: warning: Application started but no document specified. The application may panic at some point if it is document based and if there is no existing default document. Breakpoint 1 0x(some adress): file NewApplication> Breakpoint 1, NewApplication () at file
Current language: auto; currently c++ |
系统需求
I硬件
- 1、 PC
II软件
PC
- 1、 Symbian SDK
Symbian手机
- 1、 gdbstub.sis

本文介绍手机应用相关操作,包括安装系统、编译,若连接失败找不到库,可复制指定目录内容解决。还说明了打包安装应用到手机、开始调试的步骤,如启动FExplorer运行程序,用红外连接,若调试遇问题可重启设备,此外还提及使用蓝牙进行设备调试。
1211

被折叠的 条评论
为什么被折叠?



