-
Notifications
You must be signed in to change notification settings - Fork 223
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
error: no matching package named avr-hal
found
#570
Comments
To reference the crate in a project, you must use the git(hub) repo link. In that case, adding the following line to your |
That worked. Then I had to use the json file from avr-specs, and use the nightly toolchain. Well, it seems to work... it builds. Thanks. At this point I've to figure out how to make cargo build the 3 different archs using 3 different toolchains; in docs they say the .cargo/config.toml files are ignored if the build process is tarted from the workspace's root directory. But this is not related to avr-hal. |
(Switched to my main account now, still me. however) My recommendation is you create an abstraction over |
ehm... the Hardware Abstraction Layer (HAL) is already there for any and all of the three archs. Here we are commenting the use of AVR one. In theory I should already have a common interface to any and all of the three MCUs thanks to embedded-hal traits and the work in avr-hal, and the other 2 HALs, using the embedded-hal traits. As an example I can see that all of the 3 HALs have hal:Peripherals and hal::pins. I can pass those 2 to my own structured code (ex: a scheduler) and it should be able to work on all of the three MCUs. What abstraction are you writing about? |
I’m writing about exactly what you’ve said you’ve done. That is, writing a common interface based on embedded-hal, and then implementing it for each arch. |
I haven't done it! avr-hal, rp2040-hal and the stm32-hal(s) are already there! There's no need to make another one! |
I have not said to make another one. That isn't how it would work. I'm saying, to achieve your goal, you'd need to create structs that use the trait objects provided by The abstraction I speak of is saying a struct that takes arguments of traits (of which are provided by e-h), and then, for each device it can be compiled for, construct the struct using the implementations from each hal. I.e. create a "driver" (your fw), and then use the implementations for each kind of device you wish to support. |
There's no crate named avr-hal, why?
I apologize for being naive but this is my very first Rust project and ... I'm kind of dazed. I am developing an embedded firmware that should be able to run on AVR, stm32 and RP2040. With stm32 and rp2040 I can just use their HALs crates, but there's no equivalent crate for AVR.
It seems like ravedude is the only dependency to be included but then I don't know what I have to "use" in code. It seems like I've started to dig into this setup when avr-hal is in some kind of migration (ex: to embedded-hal 1.0?). The examples in this repo use local paths: do I have to git clone this repo in my codebase?
Documentation popping out from google is kind of obsolete or confusing. And I ended up messing up my rust installation.
Any help would be greatly appreaciated.
Thanks
The text was updated successfully, but these errors were encountered: