-
Notifications
You must be signed in to change notification settings - Fork 156
Fail to compile for LPC176x5x_v0.2.svd #112
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
Comments
Hi! (Most of?) the other errors seem due to errors in the input SVD file. It looks like they generated the enum names using a tool that cuts off long names, which causes some of them to be identical. e.g. on line 5476-5488 of the SVD file:
These issues can only be fixed in the SVD file (or by finding a file for your device that doesn't have these issues.) It would be good if svd2rust checked for this, though, instead of passing the names through verbatim. |
Ah, thanks for taking the time to answer, that helps a lot! Do you know if there's a workaround for the MR problem at the moment? I imagine I can at least complete all of the enum names to fix that part. I'll go ahead and close this since all of the problems here seem to be represented by other issues or are specific to my scenario and not svd2rust :) |
AIUI, it should be possible to bypass the issue with non-contiguous arrays by writing a separate definition for each register instead of using the SVD array functionality. In other words, instead of the two |
That worked, thanks a bunch! Now the only thing I have to do is figure out what's causing those duplicate function definitions and I should be set! |
For posterity, the way I got rid of the errors with duplicate
Since one of those enumerations was named exactly
|
@nicholastmosher can you share the SVD file you got working? |
@simonvandel of course! I probably should have done that in my last post. I've gone ahead and made a repository with the svd2rust generated crate, it has the |
@nicholastmosher Thanks! |
Hi, I'm trying to create a crate for the LPC1768 using the LPC176x5x_v0.2.svd file. The output
lib
file seems to have a lot of errors involving duplicate definitions. Runningsvd2rust
as in the usage works just fine, but when I try to compile the crate, I get the following errors:I apologize if this isn't the right place to report this. Do you have any suggestions on how to fix this*, or do you know of any existing support crate for the LPC1768? Any help would be greatly appreciated!
*I wondered about simply deleting the duplicate code, but I'm worried that may cause other problems that might be harder to detect, plus that would be more of a band-aid solution.
The text was updated successfully, but these errors were encountered: