Skip to content

Conversation

supersimple33
Copy link
Contributor

Summary

I added the async dmac example from the metro m4.

Checklist

  • All new or modified code is well documented, especially public items
  • No new warnings or clippy suggestions have been introduced - CI will deny clippy warnings by default! You may #[allow] certain lints where reasonable, but ideally justify those with a short comment.

@ianrrees
Copy link
Contributor

Thanks @supersimple33 ! In #830 we're currently discussing some options to make it a bit easier for us to maintain the BSPs and examples (currently one of the bigger challenges of maintaining this project) - it strikes me that this PR might make a good test case for a new scheme we're considering. Would you be up for trying the proposed approach? I think this would look like:

  1. Add my fork as a remote of your local atsamd-rs repo and checkout the manage branch - LMK if you'd like the Git incantations to do that.
  2. Change the filename of /examples/metro_m4-async_dmac.rs to /examples/generic-async_dmac.rs.
  3. Edit examples/examples.toml to make a new section for the async_dmac example, specifying it's used by both metro_m4 and grand_central_m4.
  4. cd in to /manage and do cargo run -- example distribute ../examples ../boards
  5. Edit the /boards/grand_central_m4/Cargo.toml just like you've done here (I'd do this via git checkout AsyncDMAC -- boards/grand_central_m4/Cargo.toml)
  6. Open a PR against my fork.

Since this is all work-in-progress, there's not much documentation yet and things might be a little rough around the edges. Just curious to get some feedback on what the process looks like (noting that some of this is more involved as the work is in a different fork), and see what snags we encounter.

Also, apologies that this is a bit of a comment-and-run as I'm going to be AFK for a couple days starting shortly.

@supersimple33
Copy link
Contributor Author

Got it will do

@ianrrees
Copy link
Contributor

Sorry I've dropped the ball on this - we've decided to go with a different approach to deduplicating examples, and I started porting this work to the new scheme here but realised it also means introducing defmt to boards that don't currently use it.

The defmt stuff seems like a separate can of worms; a while back I opened #810 to make it an optional feature of BSPs, so I'm thinking to resolve that using metro_m4 as a test case (partly as I have a Metro M4 to test on), then finally we can use your work in porting the async_dmac examples to metro_m4 and grand_central_m4.

@ianrrees ianrrees reopened this Jul 12, 2025
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

Successfully merging this pull request may close these issues.

2 participants