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

support for Ambiq MCUs #3660

Open
jerabaul29 opened this issue Dec 17, 2024 · 2 comments
Open

support for Ambiq MCUs #3660

jerabaul29 opened this issue Dec 17, 2024 · 2 comments
Labels
help wanted Extra attention is needed kind-feature New feature or request

Comments

@jerabaul29
Copy link

Being curious: is support for the Ambiq MCUs (Apollo3, Apollo4) something that would be reasonably doable with embassy, or would it be far too much work?

@lulf
Copy link
Member

lulf commented Dec 18, 2024

'Far too much work' is quite relative to how much time you have, but I will try to summarize what's needed:

  • From what I can tell, there are a few peripheral access crates for Ambiq: https://crates.io/search?q=Ambiq . Whether those are in good shape or not, or if it makes more sense to create a new one, I do not know.

  • Since Ambiq is cortex-m based (at least from quick googling, I'm not familiar with the MCU), a lot of the basics are covered, your main job would be to implement a few peripherals in an embassy-ambiq HAL

  • Once you have a PAC, the next step is to create a hardware abstraction layer (HAL) that usually spans all of the variants, i.e. embassy-ambiq. It may not be a lot of work, depending on which peripherals you need to support or how different it is from existing HALs that you can draw inspiration from.

  • I would recommend starting with implementing GPIOs, and perhaps a time driver so that embassy-time etc. works as expected. Critical sections and the executor should already be working on ambiq since they are generic for cortex-m.

  • A HAL can be created either within or outside the embassy repo, esp32 for instance is in the esp-rs org. So don't feel like it must be in embassy-rs for it to be embassy compatible.

@jerabaul29
Copy link
Author

Ok, thanks for the explanation! :) I will have a look, thought this is probably above my skill and available time. Maybe we keep this open in case I or someone else takes the leap and works on this? :)

@lulf lulf added kind-feature New feature or request help wanted Extra attention is needed labels Dec 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed kind-feature New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants