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

SAM device file inconsistency for MCAN peripheral #97

Open
rleh opened this issue Feb 10, 2023 · 6 comments
Open

SAM device file inconsistency for MCAN peripheral #97

rleh opened this issue Feb 10, 2023 · 6 comments
Assignees

Comments

@rleh
Copy link
Member

rleh commented Feb 10, 2023

The following lines do not describe disjoint device sets, because both match e.g. the same70q19b-an device, which causes errors in lbuild:

<instance device-series="e70|v70|v71" device-pin="n|q" device-flash="19|20" device-variant="b" value="1"/>
<instance device-series="e70|v71" device-pin="n|q" device-flash="19|20|21" device-variant="a|b" value="1"/>

@rleh
Copy link
Member Author

rleh commented Feb 10, 2023

I'll take a look at the device file generator...

@salkinium
Copy link
Member

There are bugs in the merging code, I already broke my brain before trying to understand it.

@salkinium
Copy link
Member

So there is a brute-force way to check the merge algorithm by adding the --check-merge flag to the generator.
So ./sam_generator.py same7 sams7 samv7 --check-merge saves each individual tree, then merges, then for every device unmerges the tree and compares it to the seperately saved tree.
Running that does not find any differences though.

@salkinium
Copy link
Member

So that brute-force check is useless, it's clearly wrong, cos the single tree for the same70q19b-an is correct:

    <driver name="mcan" type="sam">
      <instance value="0"/>
      <instance value="1"/>
    </driver>

@salkinium
Copy link
Member

I don't have a quick solution for this and we don't even have a functioning test for this to detect.
I would suggest splitting the offending device file using the groups as a workaround that doesn't involve manual patching.

@salkinium
Copy link
Member

Longer term, I would like to actually have a schema that validates such assumptions (no duplicate peripheral instances) so that we can actually test our data.
At the moment that is all implicit and therefore terrible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants