Skip to content

ComponentViewer: added basic string support for var usage#906

Merged
thorstendb-ARM merged 13 commits into
mainfrom
variableAsString
Mar 24, 2026
Merged

ComponentViewer: added basic string support for var usage#906
thorstendb-ARM merged 13 commits into
mainfrom
variableAsString

Conversation

@thorstendb-ARM

Copy link
Copy Markdown
Collaborator

Changes

  • <var> now supports usage as string array, value="text" sets the default.
  • inside <calc> array manipulation is possible
      <var name="msg" type="uint8_t" size="128" value="&quot;Hello, World:&quot;"/>
...
        <item property="List count test">
          <list name="ListCountTest" start="0" limit="10">
          <calc>
            ListCount=ListCountTest+1;
            msg[ListCount &amp; 0x7F]='_';
          </calc>
          <item property="ListCountTest" value="%d[ListCountTest]"/>
          <item property="ListCount" value="%d[ListCount]"/>
          <item property="Name Test" value="%t[msg] %d[ListCount]"/>
          </list>
        </item>

Screenshots

image

Checklist

  • 🤖 This change is covered by unit tests (if applicable).
  • 🤹 Manual testing has been performed (if necessary).
  • 🛡️ Security impacts have been considered (if relevant).
  • 📖 Documentation updates are complete (if required).
  • 🧠 Third-party dependencies and TPIP updated (if required).

@qltysh

qltysh Bot commented Mar 17, 2026

Copy link
Copy Markdown

Qlty

Coverage Impact

⬇️ Merging this pull request will decrease total coverage on main by 0.06%.

Modified Files with Diff Coverage (7)

RatingFile% DiffUncovered Line #s
Coverage rating: A Coverage rating: A
src/views/component-viewer/model/scvd-var.ts100.0%
Coverage rating: A Coverage rating: A
src/views/component-viewer/data-host/memory-host.ts89.5%142-143
Coverage rating: A Coverage rating: A
src/views/component-viewer/scvd-eval-interface.ts100.0%
Coverage rating: A Coverage rating: A
src/views/component-viewer/statement-engine/statement-var.ts100.0%
Coverage rating: A Coverage rating: A
src/views/component-viewer/parser-evaluator/intrinsics.ts100.0%
New file Coverage rating: A
src/views/component-viewer/parser-evaluator/string-ops.ts100.0%
New file Coverage rating: A
src/views/component-viewer/data-host/byte-encoding.ts100.0%
Total98.9%
🤖 Increase coverage with AI coding...

In the `variableAsString` branch, add test coverage for this new code:

- `src/views/component-viewer/data-host/memory-host.ts` -- Line 142-143

🚦 See full report on Qlty Cloud »

🛟 Help
  • Diff Coverage: Coverage for added or modified lines of code (excludes deleted files). Learn more.

  • Total Coverage: Coverage for the whole repository, calculated as the sum of all File Coverage. Learn more.

  • File Coverage: Covered Lines divided by Covered Lines plus Missed Lines. (Excludes non-executable lines including blank lines and comments.)

    • Indirect Changes: Changes to File Coverage for files that were not modified in this PR. Learn more.

@thorstendb-ARM thorstendb-ARM marked this pull request as ready for review March 17, 2026 12:41
Comment thread src/views/component-viewer/data-host/byte-encoding.ts
Comment thread src/views/component-viewer/parser-evaluator/string-ops.ts Outdated
Comment thread src/views/component-viewer/data-host/byte-encoding.ts Outdated

Copilot AI commented Mar 18, 2026

Copy link
Copy Markdown

@jreineckearm I've opened a new pull request, #916, to work on those changes. Once the pull request is ready, I'll request review from you.

@jreineckearm

Copy link
Copy Markdown
Collaborator

Happy to merge once we at least have a ticket for the required spec updates here: https://github.com/ARM-software/CMSIS-View/issues and addressed the review feedback.

@jreineckearm

Copy link
Copy Markdown
Collaborator

Created ARM-software/CMSIS-View#160 to cover the known enhancements compared to existing spec.

Comment thread src/views/component-viewer/parser-evaluator/string-ops.ts Outdated
Comment thread src/views/component-viewer/test/unit/memory-host/byte-encoding.test.ts Outdated
Comment thread src/views/component-viewer/test/unit/parser-evaluator/string-ops.test.ts Outdated
soumeh01 and others added 4 commits March 23, 2026 21:17
Co-authored-by: Jens Reinecke <jens.reinecke@arm.com>
….test.ts

Co-authored-by: Jens Reinecke <jens.reinecke@arm.com>
…ps.test.ts

Co-authored-by: Jens Reinecke <jens.reinecke@arm.com>

@KeilChris KeilChris left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM

@thorstendb-ARM thorstendb-ARM merged commit 729184e into main Mar 24, 2026
20 checks passed
@thorstendb-ARM thorstendb-ARM deleted the variableAsString branch March 24, 2026 10:40
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.

5 participants