Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Hvendor and Hname as attributes of <accept>, <require> and <deny> elements #182

Closed
silviooliva opened this issue Dec 19, 2022 · 6 comments · Fixed by #228
Closed

Add Hvendor and Hname as attributes of <accept>, <require> and <deny> elements #182

silviooliva opened this issue Dec 19, 2022 · 6 comments · Fixed by #228
Assignees
Labels
enhancement New feature or request

Comments

@silviooliva
Copy link
Contributor

In the standard, through the /package/conditions/condition element and in particular its child elements <accept>, <require> and <deny>, it is possible to describe dependencies on device, processor, board, software components and compilers.
At the moment, however, there is no way to specify a dependency on a hardware part (/package/parts/part).
To cover this lack, the attributes Hvendor and Hname, defined as in the picture below, should be added to the attribute list of the <accept>, <require> and <deny> elements.

image

image

@jkrech
Copy link
Member

jkrech commented Jan 17, 2023

What is the expectations for tools without support for descriptions if there is conditions associated with components that require a .
Is it safe to assume that conditions resolved "correctly" when the part condition uses "unknown" attributes e.g. Hvendor and Hname?

@edriouk
Copy link

edriouk commented Jan 19, 2023

Current implementation in CMSIS tools and Eclipse will report an error for an unknown attribute in expression.
We cannot change that in already available tools.
For future enhancements we correct that behavior:

  • treat any unknown attribute as a filtering one and pass for evaluations since the algorithm does not change: it is in most cases a wildcard match.
  • reserve some characters for filtering, e.g. 'F' (Feature) and other for dependency, e.g. 'S' (Software)
    However a warning should be issued telling that evaluation might be not fully correct if an attribute is not known .

@edriouk
Copy link

edriouk commented Jan 19, 2023

There is another problem with filtering on selected parts.
A filtering condition expression can contain any attribute only once. It matches the values against supplied collection, that also contains only unique names.
Thus it is currently not possible to set multiple selected parts having different Hvendor::Hname values.
The evaluation algorithm must be extended to match Hname values against a collection of all selected parts (similar as it is done for components dependencies).

silviooliva added a commit to silviooliva/Open-CMSIS-Pack-Spec that referenced this issue Apr 12, 2023
Commit related to issue Open-CMSIS-Pack#182:
Open-CMSIS-Pack#182
This allows part specific filtering.

Signed-off-by: Silvio Lucio Oliva <silvio.oliva@st.com>
@jkrech
Copy link
Member

jkrech commented Apr 12, 2023

@edriouk, at this point we are not planning to add support for 'accept', 'require' and 'deny' in csolution, however we need a way to ignore such condition statements with the result that we are displaying more components than intended by the author of the condition.
Is that easily doable?

@edriouk
Copy link

edriouk commented Apr 12, 2023

@jkrech, such provisions for hardware expressions are already reserved in the condition evaluator.
Such expressions are ignored, allowing components to pass the filter.

@jkrech
Copy link
Member

jkrech commented Apr 12, 2023

@edriouk thanks for confirming. When were these updates made? Prior to CMSIS-Toolbox 1.5.0?

jkrech pushed a commit that referenced this issue Apr 12, 2023
…eny` elements (#228)

Commit related to issue #182. This allows part specific filtering.

---------

Signed-off-by: Silvio Lucio Oliva <silvio.oliva@st.com>
@jkrech jkrech removed the In Discussion Discussion for this issue is open and ongoing label Apr 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
3 participants