AdaCore / AdaCore/svd2ada

Incorrect parsing of peripheral names when it contains `%s`

Open
#102 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Ada
Stars
71
Forks
41
PR merge metrics
No merged PRs in 30d

Description

svd2ada incorrectly parses names which contain an array identifier %s. It seems this identifier was added in version 1.3.1

Here is the SVD specification https://www.keil.com/pack/doc/CMSIS/SVD/html/elem_registers.html

Newer .svds are starting to make use of such feature. Here is one such example https://github.com/espressif/svd/issues/31#issue-1973168680

Could svd2ada be improved to correctly parse %s?

Thank you,
Fer

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by examining how svd2ada parses peripheral names and reproduce the issue with an SVD using the %s array identifier, using the linked CMSIS SVD specification and Espressif example as references. Done means newer SVD files containing %s parse correctly without breaking existing peripheral-name handling.

Written by the indexing model from the issue text.

Assessment

Domain
embedded-iot, tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.