Add trace sinks into debug topology - #2577
Conversation
Emit serial wire and named trace buffers in generated debug topologies, with default sinks when device data is absent.
53af2a4 to
6755a3f
Compare
Test Results 2 files - 41 14 suites - 113 14m 58s ⏱️ - 1m 46s Results for commit 6755a3f. ± Comparison against base commit 91180e9. This pull request removes 634 tests.♻️ This comment has been updated with latest results. |
There was a problem hiding this comment.
Pull request overview
This PR extends the generated cbuild-run.yml debug topology to expose device trace sink capabilities (serial wire output and on-device trace buffers) derived from PDSC trace declarations, improving downstream debug tool integration.
Changes:
- Collect
serialwireandtracebuffersinks from devicetraceproperties (ignoring processor-specificPnametraces and unsupportedtraceport), and emit compatibility defaults when none are collected. - Emit
trace-sinksinto generatedcbuild-run.yml, update the JSON schema accordingly, and adjust tracebuffer identity handling to preserve distinct named buffers. - Update unit tests and reference/fixture data to validate warnings and new YAML output.
Reviewed changes
Copilot reviewed 15 out of 15 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| tools/projmgr/src/ProjMgrRunDebug.cpp | Collects trace sinks from PDSC and records warnings/defaults for debug topology generation. |
| tools/projmgr/src/ProjMgrCbuildRun.cpp | Emits trace-sinks into generated cbuild-run.yml YAML. |
| tools/projmgr/schemas/common.schema.json | Extends schema to validate the new trace-sinks structure in debug topology. |
| tools/projmgr/include/ProjMgrRunDebug.h | Adds TraceSinkType and stores collected trace sinks in DebugTopologyType. |
| tools/projmgr/include/ProjMgrYamlParser.h | Adds YAML key constants for trace-sinks and sink types. |
| libs/rtemodel/src/RteDevice.cpp | Incorporates tracebuffer name into constructed IDs to distinguish named buffers. |
| tools/projmgr/test/src/ProjMgrUnitTests.cpp | Captures and asserts expected warnings produced by duplicate/unnamed trace sink declarations. |
| test/packs/ARM/RteTest_DFP/0.2.0/ARM.RteTest_DFP.pdsc | Updates test pack PDSC to include trace sink declarations (including ignored processor-specific ones). |
| tools/projmgr/test/data/TestRunDebug/ref/run-debug+TestHW.cbuild-run.yml | Updates expected generated YAML to include trace-sinks with named/unnamed buffers. |
| tools/projmgr/test/data/TestRunDebug/ref/custom+TestHW.cbuild-run.yml | Updates expected generated YAML to include trace-sinks with named/unnamed buffers. |
| tools/projmgr/test/data/TestRunDebug/ref/run-debug+TestHW2.cbuild-run.yml | Updates expected generated YAML to include default trace-sinks. |
| tools/projmgr/test/data/TestRunDebug/ref/run-debug+TestHW3.cbuild-run.yml | Updates expected generated YAML to include default trace-sinks. |
| tools/projmgr/test/data/ImageOnly/ref/image-only+CM0.cbuild-run.yml | Updates expected generated YAML to include default trace-sinks. |
| tools/projmgr/test/data/ImageOnly/ref/image-only-multicore+CM0.cbuild-run.yml | Updates expected generated YAML to include default trace-sinks. |
| tools/projmgr/test/data/WestSupport/ref/solution+CM0.cbuild-run.yml | Updates expected generated YAML to include default trace-sinks. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2577 +/- ##
==========================================
+ Coverage 72.13% 72.16% +0.02%
==========================================
Files 185 185
Lines 30221 30253 +32
Branches 17824 17844 +20
==========================================
+ Hits 21800 21831 +31
Misses 6110 6110
- Partials 2311 2312 +1
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
Fixes
*.cbuild-run.ymlcmsis-toolbox#682Changes
trace-sinksserialwireand named/unnamedtracebufferto generatedcbuild-run.ymldebug topology.These changes expose device trace capabilities to debug tools.
Limitations
traceportremain unsupported and are ignored.Checklist