How to attach to running target w/o reset from Linux JLinkGDBServer

origin: http://forum.segger.com/index.php?page=Thread&threadID=1347
Hello,

I am trying to work through the process of gdb + JLinkGDBServer attaching to a running device without invoking a reset on the device.
Some environmental info:
Ubuntu 11.04 Linux,
arm-none-eabi-gdb V7.4.40,
JLinkGDBServer V4.58 (JTAG, not SWD)
target system is STM32L151 Cortex-M3

I have tried starting JLinkGDBServer with the -noreset option but it appears not to work, at least on ubuntu linux.
The target get a reset regardless of the -noreset option.

Note: I have tried this with OpenOCD built for JLink support and it works (e.g. no reset).
The significant difference is that OpenOCD, by default, does not do any resets at connect time, where as JLinkGDBServer (per docs) does a reset unless the -noreset option is specified.
Most of developers in our shop use JLinkGDBServer, so I would prefer staying with JLinkGDBServer rather that trying to get them switched to OpenOCD.

Can someone give detailed directions as to how (in particular from Linux) to attach to a running Cortex-M3 system?
It would be much appreciated.

Thanks

Hi,

I just checked it again:
The current GDBServer does not perform a reset of the target at startup by default.
The doc is a bit outdated there because old/very old versions of the GDBServer always performed a reset of the target at startup.

The only cases under which a reset of the target is performed:
1) "monitor reset" is executed
2) GDB sends a 'k', 'r' or 'R' packet which are packets that are used for (k)ill, (r)eset or (R)estart. These packets are used by some GDB based IDEs to provide a reset button etc. in the IDE.
3) If attaching to the target is not possible which can happen for example if the target is in a low-power mode which disables the debug interface etc.
If J-Link knows the device (if the device has been selected in GDBServer at startup via command line) and so can perform a special connect in such cases, it is possible that a reset is performed.


Best regards
Alex
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值