在Series 60设备上进行调试

文/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/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.dll gdbseng.dll 文件
在手机上启动 gdbstub.exe
PC DOS 提示符状态进入 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
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值