Skip to content

Add default attribute to memory in cbuild-run.yml#2438

Merged
brondani merged 3 commits intoOpen-CMSIS-Pack:mainfrom
jthuangarm:defaultMemory
Apr 14, 2026
Merged

Add default attribute to memory in cbuild-run.yml#2438
brondani merged 3 commits intoOpen-CMSIS-Pack:mainfrom
jthuangarm:defaultMemory

Conversation

@jthuangarm
Copy link
Copy Markdown
Contributor

@jthuangarm jthuangarm commented Apr 14, 2026

To address #2424

This pull request introduces support for marking memory regions as default in the project manager tool. In cbuild-run.yml default is located right before the from-pack: property under memory.

  • Updated the JSON schema (common.schema.json) to define the new default property for memory objects.
  • Modified ProjMgrRunDebug.cpp to read the default attribute when collecting settings and to write it when generating YAML output.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds support for exposing the CMSIS-Pack default attribute on memory regions in generated .cbuild-run.yml output, enabling downstream tools (e.g., pyOCD RTT search) to identify “general-purpose” default memory.

Changes:

  • Extend the projmgr common JSON schema to allow a new boolean default property on system-resources: memory entries.
  • Collect the default attribute from pack memory definitions during run/debug settings collection.
  • Emit default: true into generated .cbuild-run.yml reference outputs for default memory regions.

Reviewed changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
tools/projmgr/include/ProjMgrRunDebug.h Adds an optional flag to represent whether a memory region is marked as default.
tools/projmgr/src/ProjMgrRunDebug.cpp Reads the pack memory default attribute into the collected run/debug model.
tools/projmgr/src/ProjMgrCbuildRun.cpp Writes the optional default flag into the generated YAML system-resources.memory nodes.
tools/projmgr/schemas/common.schema.json Defines default as a supported boolean property for system memory objects.
tools/projmgr/test/data//.cbuild-run.yml Updates expected YAML outputs to include default: true on default memory regions.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread tools/projmgr/include/ProjMgrRunDebug.h Outdated
Comment thread tools/projmgr/src/ProjMgrRunDebug.cpp Outdated
Comment thread tools/projmgr/src/ProjMgrCbuildRun.cpp Outdated
@jthuangarm jthuangarm marked this pull request as ready for review April 14, 2026 14:28
@jthuangarm jthuangarm requested a review from brondani April 14, 2026 14:29
@github-actions
Copy link
Copy Markdown

Test Results

    3 files     21 suites   15m 58s ⏱️
  456 tests   456 ✅ 0 💤 0 ❌
1 368 runs  1 368 ✅ 0 💤 0 ❌

Results for commit b79d0ed.

Copy link
Copy Markdown
Collaborator

@brondani brondani left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@brondani brondani merged commit a9fb6c9 into Open-CMSIS-Pack:main Apr 14, 2026
33 checks passed
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 14, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 64.75%. Comparing base (579301e) to head (b79d0ed).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2438   +/-   ##
=======================================
  Coverage   64.75%   64.75%           
=======================================
  Files         145      145           
  Lines       26157    26161    +4     
  Branches    15788    15792    +4     
=======================================
+ Hits        16937    16941    +4     
  Misses       7063     7063           
  Partials     2157     2157           
Flag Coverage Δ
projmgr-cov 87.79% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
tools/projmgr/include/ProjMgrRunDebug.h 100.00% <ø> (ø)
tools/projmgr/src/ProjMgrCbuildRun.cpp 95.41% <100.00%> (+0.03%) ⬆️
tools/projmgr/src/ProjMgrRunDebug.cpp 87.62% <100.00%> (+0.05%) ⬆️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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.

3 participants