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

Consider making a library from this #1

Open
Rahix opened this issue Oct 2, 2020 · 6 comments
Open

Consider making a library from this #1

Rahix opened this issue Oct 2, 2020 · 6 comments

Comments

@Rahix
Copy link

Rahix commented Oct 2, 2020

Hey!

I got curious and found this project after your comment in the avr-hal issue. This looks really cool!

As you know, the HAL currently does not have any USB support. So I've got to ask: Would you be interested in making a library from this codebase you have here? An atmega32u4-usb crate, using the existing C libraries via FFI, would be quite useful to substitute the missing HAL support for the time being ...

@mogenson
Copy link
Owner

mogenson commented Oct 2, 2020

I can pull this out into a crate if you think it would be useful to people. I didn't initially, because it's hacky and will hopefully be replaced by a pure Rust USB driver.

I added support to this project to use the Arduino method of triggering a reboot into the bootloader. If you have a board without a physical reset button, it makes flashing programs more convenient.

I'll put together something and ping you when there's an example to try out.

@Rahix
Copy link
Author

Rahix commented Oct 2, 2020

I do think this would be a very useful thing to have. Nobody knows when pure rust USB will be working so having something working in the meantime would be great ...

I added support to this project to use the Arduino method of triggering a reboot into the bootloader. If you have a board without a physical reset button, it makes flashing programs more convenient.

Nice! I've always missed that when working with leonardo boards ...

I'll put together something and ping you when there's an example to try out.

Many thanks! :) If I can help with anything, let me know!

@TerminatorNL
Copy link

Rahix is correct! I would also love to be able to use this. I have an Arduino Micro and windows/linux machine available if you need me to verify something for you.

@mogenson
Copy link
Owner

mogenson commented Oct 5, 2020

Try out this crate here: https://github.com/mogenson/atmega32u4-usb-serial

I'll end up removing this repo and making a new (better named) project for my specific USB to OLED display firmware application.

Open a new issue in the atmega-usb-serial project for any suggestions or future discussion.

@Rahix
Copy link
Author

Rahix commented Oct 6, 2020

Nice, I'll take a look as soon as I get a chance :)

@TerminatorNL
Copy link

TerminatorNL commented Oct 9, 2020

I can verify I got the echo example described in mogenson/atmega32u4-usb-serial to work. I have included a zip file for newcomers that contains everything required to set up your workspace. Make sure to use the nightly toolchain!

To access the serial monitor I used screen /dev/ttyACM0 <your-baud-rate-here>

Keep in mind that the preconfigured zip is NEVER as good as the latest documentation provided here and here!
Serial example - Preconfigured.zip

Thanks a bunch @mogenson ! I can now continue my work!

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