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

split out atmega328pb #108

Closed
fneddy opened this issue Dec 1, 2020 · 3 comments
Closed

split out atmega328pb #108

fneddy opened this issue Dec 1, 2020 · 3 comments

Comments

@fneddy
Copy link
Contributor

fneddy commented Dec 1, 2020

Hello,

I couldn't get the atmega328pb hal running. So i splinted it out in a separate sub-crate at chips/atmega328pb-hal. i think my problems came from setting the correct feature but then using them under a different name in the code. Nethertheless i think it is more clean to have a separate hal for each chip. If you think so to I can open a pull request, but if you want to keep it the way it is feel free to just close my issue :).

here are my changes: https://github.com/fneddy/avr-hal/commit/7e175153ce8a7607678df128d42a2eacb5d58963 it still need some polishing i think, but i could get a LED and UART working.

@Rahix
Copy link
Owner

Rahix commented Dec 2, 2020

Hmm, just doing this should do the trick:

[dependencies.atmega328p-hal]
git = "https://github.com/Rahix/avr-hal"
rev = "<insert latest git-commit hash here>"
features = ["atmega328pb"]

(you probably also want the "rt" feature as well)

There is a reason we made those two a single crate and actually I intend to merge the HAL crates even more. The current situation is becoming more and more unmaintainable as all changes need to be reflected across all crates. This huge amount of code-duplication is becoming a time-sink and preventing fast iteration on the APIs we expose. Other HAL crates in the embedded-rust ecosystem seem to be doing the same, so we want to follow that route. See #94 for some more info.

@jkristell
Copy link
Contributor

I have an example using the atmega328pb-hal here: https://github.com/jkristell/rustyremote

Been a couple of weeks since I worked on it, but it seems to still compile.

@fneddy
Copy link
Contributor Author

fneddy commented Dec 2, 2020

Thank you. I'll have a look. I close this issue through it is not needed. :)

@fneddy fneddy closed this as completed Dec 2, 2020
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

No branches or pull requests

3 participants