Skip to content

Target microcontroller directly instead of an arduino board #125

@derchr

Description

@derchr

Hello,
I'm new to avr-rust and Rust in general.
All examples I see in this repository seem to target a board (for example Arduino Uno). Is it possible or recommended to directly target a microcontroller such as atmega328p?
I found no example and had trouble while trying to do so.
I added those lines to the Cargo.toml:

[dependencies.atmega328p-hal]
git = "https://github.com/Rahix/avr-hal"
rev = "206ff87bdc38afcffd9db1c9326c0d4d9487cb14"
features = ["atmega328p"]

[dependencies.avr-hal-generic]
git = "https://github.com/Rahix/avr-hal.git"
rev = "206ff87bdc38afcffd9db1c9326c0d4d9487cb14"

Do I need to write something like #[avr_device::entry] instead of #[arduino_uno::entry] in the source file? Or how can I use the needed prelude?

Thank you in advance!

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions