在Series 60设备上进行调试

安装系统

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/.
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
 
注:用你的程序的名字来代替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目录获取编译后的代码。

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

 

1. 安装 gdbstub
在电话上安装 gdbstub.sis 。这个文件由 Nokia SDK 在默认下在以下路径中安装 C:/ Symbian/7.0s/Series60_v20/Epoc32/release/armi/urel/.
2. 创建 gdbstub.ini
你应该创建一个文件夹 C:/ gdbstub 。并且在这个文件中使用记事本,创建一个包含以下内容的文件 gdbstub.ini
 

General
Bluetooth
[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
在计算机中创建一个目录并且一定要在 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
 
用适当的名字替换所有的 bbb aaa
注意 : 请检查你正在使用通道数,在线路 3 中放入适当的 com 数到它中,不包括: infra=2,Bluetooth=3
注意 : com 数通常不大于 4 并且大于 1
4. 编辑
程序的调试将会使用 armi udeb:
abld 创建 armi udeb
如果有任何错误或警告,就把 epoc32/release/armi/urel 中的复制到 epoc32/release/armi/udeb
5. 更新 pkg 文件
现在找到程序的 xxx.pkg 文件然后改变所有的路径以便在目录 armi/ udeb 下编译。
然后创建 sis 文件并而安装
6. 启动调试器
1. 你应该有一个叫做 FExplorer 的程式,或者下载它并安装它。、
2. 通过这个程式到目录 : c:/ system/program/gdbstub.exe
3. 检查为 dll 文件在 c:/ system/lib/ : 下的 gdbseal.dll gdbseng.dll
4. 启动 gdbstub.exe
5. 在你的计算机 DOS , 在目录 c:/ bbb 下并且运行 gdb.exe-nw
(gdb.exe 将与 Symbian SDK 一起并且确定它在系统路径之中 )
以下信息将会出现:
 
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 <your source file that contains
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 <your source file that contains
NewApplication>
Breakpoint 1, NewApplication ()
  at file <your source file that contains NewApplication>
  <some sourcecode>
Current language:  auto; currently c++
注意 : gdb 指令中检查 Symbian SDK 文件从而得到更多的帮助。
 
清单
:
I 硬件 :
1. PC
2. 兼容的 Bluetooth / InfraRed
3. Symbian 电话
 
II 软件 :
PC :
1. Symbian SDK( 可以免费的从 Symbian/Nokia 站点得到 )
2. VC++6.0
3. Bluetooth 驱动程序 ( 可以在 CD Bluetooth 得到 )
4. gdb.ini
 
Symbian 电话 :
1. gdbstub.sis
2. gdbstub.ini
3. fexplorer.sis
 
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值