Skip to content

Add L0x0 processor family #505

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

Merged
merged 21 commits into from
Mar 14, 2021
Merged

Add L0x0 processor family #505

merged 21 commits into from
Mar 14, 2021

Conversation

jglauche
Copy link
Contributor

I used the L0x1 definitions and patches as starting point and migrated it to work with L0x0.

I received the SVD file directly from ST with the license specified as Apache 2.0 (I put the SVD and license text here: https://github.com/jglauche/STM32L0x0 )

Copy link
Member

@adamgreig adamgreig left a comment

Choose a reason for hiding this comment

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

Thank you for this PR! On the whole it looks good, but I noticed a number of the changes from the L0x1 that aren't required for this L0x0 SVD file, because it already contains those fixes, so there's a bunch of suggested deletions. It looks like a lot of comments but hopefully they are mostly easy deletions!

I'm not sure about the deletion of WRPROT1/2 since they seem to exist in the SVD just fine, maybe L0x1 didn't have them or they needed recreating or something? Probably the best thing to do is just remove the deletions from the L0x0 YAML.

Finally, it's really interesting that you were able to get an Apache 2.0 licensed SVD file from ST. Did you ask specifically for that licence? It would be great if ST would release more of their SVDs under open source licenses like that.

@adamgreig
Copy link
Member

By the way, don't worry about the mmaps job failure, that's expected when adding a new zip file; all the other jobs pass which is what matters.

jglauche and others added 15 commits February 28, 2021 19:08
Co-authored-by: Adam Greig <adam@adamgreig.com>
Co-authored-by: Adam Greig <adam@adamgreig.com>
Co-authored-by: Adam Greig <adam@adamgreig.com>
Co-authored-by: Adam Greig <adam@adamgreig.com>
Co-authored-by: Adam Greig <adam@adamgreig.com>
Co-authored-by: Adam Greig <adam@adamgreig.com>
Co-authored-by: Adam Greig <adam@adamgreig.com>
Co-authored-by: Adam Greig <adam@adamgreig.com>
Co-authored-by: Adam Greig <adam@adamgreig.com>
Co-authored-by: Adam Greig <adam@adamgreig.com>
Co-authored-by: Adam Greig <adam@adamgreig.com>
@jglauche
Copy link
Contributor Author

I'm not sure about the deletion of WRPROT1/2 since they seem to exist in the SVD just fine, maybe L0x1 didn't have them or they needed recreating or something? Probably the best thing to do is just remove the deletions from the L0x0 YAML.
Okay, looks like I let them in because I didn't see the patch that it adds them back in. I remove it.

Finally, it's really interesting that you were able to get an Apache 2.0 licensed SVD file from ST. Did you ask specifically for that licence? It would be great if ST would release more of their SVDs under open source licenses like that.
Yes!
So I asked them for an SVD file, they sent it to me. I then asked about the license that I can use to publish on github, they came back after quite a long while telling me that I can use it under the terms of the Apache 2.0 license.

@jglauche
Copy link
Contributor Author

jglauche commented Feb 28, 2021

Regarding I2C; it looks like that this line from the HAL crate crashes (and reboots) my firmware.
self.i2c.icr.write(|w| w.nackcf().set_bit());
I'm currently quite lost in what exactly happens here and why.

edit: only happens with one of my boards. I got an I2C(ArbitrationLost) error on my other one, unfortunately my debug setup via stlink-clones is crashy with all boards at the moment [and I have no idea what the heck is going on].

@jglauche
Copy link
Contributor Author

I still haven't figured out my I2C issues, but I believe this is an issue with the L0 HAL crate. I double-checked all the I2C registers from the reference manual and as far as I can tell it matches the SVD.

Is there anything blocking merging the PR at the current state? Github tells me that there's a change requested but then shows all requests resolved.

@adamgreig
Copy link
Member

Thanks! No outstanding requests at the moment, I just need to make some time to review the recent changes and hit merge, hopefully within the next day or two.

@adamgreig
Copy link
Member

Looks good, thanks again for this PR!

bors merge

@bors bors bot merged commit 7473e81 into stm32-rs:master Mar 14, 2021
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.

2 participants