Rust AVR and AtMega 2560

Heya! I'we got myself Arduino AtMega 2560 DIY kit: https://www.chipoteka.hr/artikl/132086/basic-diy-kit-with-atmega2560-for-arduino-8090229168
And i would really like to program it with Rust, i am not new to coding, i am 4 months into Rust and long time Py/Js developer.
I need to admit i have hard time even starting with this project.
Could somebody lead me a bit?
Note: I am on Win10.

I guess i need these:


https://docs.rs/avrd/0.2.0/avrd/atmega2560/index.html

I wonder also why the code below this line is needed? https://github.com/avr-rust/blink/blob/fdecb9b2482fd05493ff00bd4db9b79e00882033/src/main.rs#L37
Seems kinda awkward ¯_(ツ)_/¯

I would advise you to use a Cortex M processor, f.e. the STM32F103 boards, also known as BluePill. The Cortex M architecture is natively supported by Rust, the AVR architecture not. If you really want to start with the AVR, then the links mentioned by you are the correct ones. Else take a look at the Rust Embedded book

1 Like

Should i use Xargo or Vanila? https://github.com/avr-rust/rust#usage in 2020?
Do you know maybe for some example (a bit larger) that i could see or try on my atmega?
I am not sure how to use the avrd crate :confused: and AVR-Rust and to be honest i am kinda worried for my board xD as this all seems really experimental.

This is really experimental, and I don't know if there are any example. You should really stick to a Cortex-M board. They are not that costly, look at the Nucleo of STM or the BluePill you can find at different China Sellers

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.