You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I realize there are probably hundreds of ways to do the same thing, but it would be nice to have an example of some best practices for writing code that targets different microcontrollers, using different pinouts, etc., perhaps using the embedded_hal feature (if that makes it easier, not sure). For example, I'm currently targeting a G4 microcontroller, but what if I want to create a different board with an additional sensors and firmware features on an H5 microcontroller, what would be the best way to write my code to ensure I can easily port existing functionality in the new target?
The text was updated successfully, but these errors were encountered:
Hey! This is a great question. Unfortunately, I don't have a good answer. I've only done this for one project, and maybe it can demonstrate a starting point: https://github.com/David-OConnor/corvus
It does something similar to what you are looking for (In this case, it's G4 and H&), but is clumsy: I have a build.rs config that changes out the memory.x based on the compile feature, but I have to manually change config.toml, and more annoyingly, the interrupt names. (Maybe that should be handled with a script). I use feature flags to adjust pins etc as required.
I realize there are probably hundreds of ways to do the same thing, but it would be nice to have an example of some best practices for writing code that targets different microcontrollers, using different pinouts, etc., perhaps using the embedded_hal feature (if that makes it easier, not sure). For example, I'm currently targeting a G4 microcontroller, but what if I want to create a different board with an additional sensors and firmware features on an H5 microcontroller, what would be the best way to write my code to ensure I can easily port existing functionality in the new target?
The text was updated successfully, but these errors were encountered: