pyocd / pyocd/pyOCD

Reponse to 'start' in extended-remote mode

Open
#975 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug gdbserver
Dominant language
Python
Stars
1.5k
Forks
560
Avg merge
1h 41m
Merged PRs (30d)
3

Description

Hi, apologies if this is already dealt with, or if the question should be asked elsewhere.
I am connecting to pyocd (0.28.1dev) via target extended-remote localhost:3333 and after loading an application would like to start it with the start command. At the pyocd end I receive the following packets;

b'$vKill;a410#33'
b'$k#6b'
b'$?#3f'

and at the gdb end (8.3.0.20190709-git from GNU Tools for Arm Embedded Processors 9-2019-q4-major) I get the following interaction;

(gdb) start
The program being debugged has been started already.
Start it from the beginning? (y or n) y
Sending packet: $vKill;a410#33...Packet received: 
Packet vKill (kill) is NOT supported
Sending packet: $k#6b...Sending packet: $?#3f...Packet received: 
Sending packet: $Hg0#df...Temporary breakpoint 1 at 0x8007900: main. (2 locations)
Starting program: ofiles/firmware.elf 
Segmentation fault (core dumped)

Obviously something isn't quite behaving properly, but I don't exactly know what. I should point out that I'm developing a new cmsis-dap interface so it could be a problem on my end (it works OK in non-extended mode). If you could find the time, could you please let me know if pyocd supports extended-remote and, if so, what the expected protocol flow would be for this case? That will greatly help me chase down this problem.
Thanks in advance
DAVE

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing pyOCD's handling of the GDB target extended-remote and start flow, using the reported vKill, k, and ? packets as the reproduction. Compare that behavior with non-extended mode and establish the expected protocol flow and whether extended-remote should be supported.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
devtools, embedded-iot
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.