pyocd / pyocd/pyOCD

Cannot step over / into when using ThreadX RTOS support.

Open
#1,645 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Hopefully, the title describes the issue well.

For example, I'm currently at this break-point:

image

When I step-over or step-into, I'm always thrown into this __get_ipsr_value() method (I'm assuming this is called by the ThreadX timer code)

image

Trying to step-over or step-into again, brings me back to the original break-point, and the cycle continues. The only way to break-out of the cycle is removing the original breakpoint and placing a new one elsewhere. Pressing 'Continue' brings me to the new breakpoint.

Using rtos.enable: False in the pyocd.yaml file makes everything work as expected. I can correctly step into and out of methods. I have essentially configured ThreadX to time-slice all threads with basically no higher-priority threads if that might be causing the issue. I doubt though.

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

Reproduce the stepping loop with ThreadX support enabled, then compare it with rtos.enable: False in pyocd.yaml. Start by tracing the path involving __get_ipsr_value() during step-over and step-into operations. Done means stepping no longer cycles through that method and reaches the expected source locations while ThreadX support remains enabled.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
devtools, operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.