首 页 | 新 闻 | Symbian | Android| Windows Mobile | J2ME | 下载中心 | 游戏策划招聘与求职 | 购书指南 | 视频教程
您现在的位置: 开发视界 >> Symbian >> Symbian入门 >> 正文
在Series 60设备上进行调试
作者:佚名    文章来源:本站原创    更新时间:2005-8-5 18:09:50

安装系统

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、用适当的内容来代替xxxyyy。将你的IrDA端口变成com2.你可能需要在电脑上装一个可以把IrDA映射为COM的软件(例如IrCOMM2k

编译

abld build armi udeb

如果连接失败是因为它找不到库(第一次通常都是这样),只要把epoc32/release/armi/urel下所有的内容复制到epoc32/release/armi/udebOK了。

打包并安装应用程序到手机上。

开始调试

gdb.exe -nw

启动FExplorer并运行c:\ system\programs\gdbstub.exe.IrDA(红外线)连接指示灯将开始闪烁。注意不不需要用connection/IrDA/activate来做这些事,因为gdbstub将会自动打开红外连接。把手机放在PC的红外范围之内,随后打开PCDOS窗口。进入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\.
2 创建gdbstub.ini

你应该在目标上创建一个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

注:用你的程序的名字来代替aaabbb

检查第三行的端口号并用合适的端口号来代替

com口编号只能在14之间

4 编译

应用程序应使用armi udeb进行调试:

abld build armi udeb

如果提示错误或警告,拷贝epoc32/release/armi/urel的所有内容到epoc32/release/armi/udeb中即可。

5 更新pkg文件

现在转向你的应用程序xxx.pkg文件并改变所有路径以便从armi\udeb目录获取编译后的代码。

6 开始调试
在手机上安装FExplorer软件(杂志附加工具包中已提供)。
通过FExplorer软件进入C:\system\programs\gdbstub.exe
检查在C:\system\libs\下的gdbseal.dllgdbseng.dll文件
在手机上启动gdbstub.exe
PCDOS提示符状态进入c:\bbb目录并运行下列命令

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
2 蓝牙/红外适配器
3 Symbian手机

II软件

PC

1 Symbian SDK
2 VC++6.0
3 蓝牙驱动
4 Gdb.ini

Symbian手机

1 gdbstub.sis
2 gdbstud.ini
3 fexplorer.sis

本文引用通告地址: http://blog.csdn.net/CSDN_document/services/trackbacks/226416.aspx
相关文章:
cpp命令
S60 3rd版下,如何运行控制台程序?
如何在进程间共享文件句柄
*.pkg文件的阐述及生成sis 文件的方法
Symbian OS Internals——EKA2的历史
实现手机中应用程序的开机自启动
S60 Python 编程指南——安装和相关资源
S60 3.0上的程序安装后启动运行和程序开机自动运行
 

站点地图 | 加入收藏 | 联系站长 | 广告服务 |
QQ:280529124  Tel:0592-8271361 辽ICP备05021703号