Skip to content

Restore thread detection for older Zephyr firmware - #2088

Open
Solarboaters wants to merge 1 commit into
pyocd:developfrom
Solarboaters:fix/zephyr-legacy-thread-symbols
Open

Solarboaters wants to merge 1 commit into
pyocd:developfrom
Solarboaters:fix/zephyr-legacy-thread-symbols

Conversation

@Solarboaters

Copy link
Copy Markdown

Zephyr thread detection rejects firmware built with Zephyr 2.5 because pyOCD only looks for the symbol names introduced in Zephyr 2.6. Fall back to the legacy _kernel_openocd_* names when their modern equivalents are absent. Prefer modern names when both are present, and continue to reject incomplete metadata.

Closes #1470.

The Zephyr 2.5 table and 2.6 table/aliases confirm the shared layout. This retains the thread-name handling introduced in #1320.

Validation: six tests exercise the real provider, offset decoding and thread enumeration against simulated target memory. The legacy-name case fails on unchanged develop and passes with the fix, including thread name, priority and current-thread identity. Modern names, modern-name precedence and incomplete metadata are controls. Full unit suite: 1,113 passed, 41 skipped.

No physical Zephyr target or complete firmware build was tested; the memory fixture uses the documented table layout with explicit sample structure offsets.

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
There may be pipelines that require an authorized user to comment /azp run to run.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant