Open ianrrees opened 1 year ago
Looking at this with a fresh set of eyes, I'm leaning toward approach 1 above. Cargo features just don't seem like a good way to express hardware variations, since they are purely additive. We've used the features like this to make it easier to support a wide variety of hardware, but even with this usage the current model is quite labour intensive.
So, rather than bending the CI process to support this use of features, I think that we'd be better off putting effort in to some other solution to make BSP maintenance easier.
Our Feather M0 BSP has features for some specific variants of the board, for instance the
rfm
feature for "RadioFruits",adalogger
if the SD card shield is added,express
for Feather M0 Express. These variants use the same ATSAMD21 microcontroller, but have different wiring.Currently, we gate some of the provided BSP pins like this:
In particular when updating the HAL, it can be helpful to build all the examples for BSPs by doing
cargo build --all-features --examples
, however this fails when one of the examples uses theSdCd
defined above. For most of our BSPs, this same approach is taken by CI, but currently we don't have an automated check that covers all the Feather M0 BSP examples.Possible approaches to address this:
Bonus points: extend CI to check that each example gets built