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

Mutually incompatible BSP features lead to testing difficulties #704

Open
ianrrees opened this issue Nov 22, 2023 · 0 comments
Open

Mutually incompatible BSP features lead to testing difficulties #704

ianrrees opened this issue Nov 22, 2023 · 0 comments

Comments

@ianrrees
Copy link
Contributor

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:

#[cfg(all(feature = "adalogger", not(feature = "rfm"), not(feature = "express")))]
PA21 {
    /// SD card detect
    name: sd_cd
    aliases: {
        PullUpInput: SdCd
    }
},

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 the SdCd 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:

  1. Separate the Feather M0 BSP in to separate BSPs for the variants
  2. Extend the CI approach to build the mutually-incompatible variants separately
  3. Instead of feature-gating pins, feature-gate aliases

Bonus points: extend CI to check that each example gets built

@ianrrees ianrrees changed the title BSP features that are mutually incompatible, leads to testing difficulties Mutually incompatible BSP features lead to testing difficulties Nov 22, 2023
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

No branches or pull requests

1 participant