Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rtos: Add hint for zephyr’s Thread Info configuration #1690

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/workflows/basic_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ jobs:
- "3.9"
- "3.10"
- "3.11"
exclude:
- os: macos-latest
python-version: "3.7"

steps:
# Only check out HEAD. We don't need the full history.
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/basic_test_skipped.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,8 @@ jobs:
- "3.9"
- "3.10"
- "3.11"
exclude:
- os: macos-latest
python-version: "3.7"
steps:
- run: 'echo "Skipped due to path filter."'
7 changes: 4 additions & 3 deletions pyocd/rtos/provider.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,14 +53,15 @@ def __init__(self, target):
self._last_run_token = -1
self._read_from_target = False

def _lookup_symbols(self, symbolList, symbolProvider):
def _lookup_symbols(self, symbolList, symbolProvider, allowPartial = False):
syms = {}
for name in symbolList:
addr = symbolProvider.get_symbol_value(name)
LOG.debug("Value for symbol %s = %s", name, hex(addr) if addr is not None else "<none>")
if addr is None:
if addr is not None:
syms[name] = addr
elif not allowPartial:
return None
syms[name] = addr
return syms

def init(self, symbolProvider):
Expand Down
6 changes: 5 additions & 1 deletion pyocd/rtos/zephyr.py
Original file line number Diff line number Diff line change
Expand Up @@ -274,9 +274,13 @@ def __init__(self, target):

def init(self, symbolProvider):
# Lookup required symbols.
self._symbols = self._lookup_symbols(self.ZEPHYR_SYMBOLS, symbolProvider)
self._symbols = self._lookup_symbols(self.ZEPHYR_SYMBOLS, symbolProvider, True)
if self._symbols is None:
return False
if len(self._symbols) != len(self.ZEPHYR_SYMBOLS):
LOG.warning("Zephyr kernel detected. Build your Zephyr application with `CONFIG_DEBUG_THREAD_INFO=y` to " +
"enable thread awareness.")
return False

self._update()
self._target.session.subscribe(self.event_handler, Target.Event.POST_FLASH_PROGRAM)
Expand Down
Loading