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

Cannot compile without rt feature #1

Open
rubdos opened this issue Dec 5, 2020 · 3 comments
Open

Cannot compile without rt feature #1

rubdos opened this issue Dec 5, 2020 · 3 comments

Comments

@rubdos
Copy link
Contributor

rubdos commented Dec 5, 2020

stm32wb-hal = { version = "0.1.2", default-features = false, features = ["xG-package", "rt"]}

compiles, but

stm32wb-hal = { version = "0.1.2", default-features = false, features = ["xG-package"]}

does not:

error[E0433]: failed to resolve: could not find `interrupt` in `stm32wb_pac`
  --> /home/rsmet/.cargo/registry/src/github.com-1ecc6299db9ec823/stm32wb-hal-0.1.2/src/ipcc.rs:60:61
   |
60 |             cortex_m::peripheral::NVIC::unmask(stm32wb_pac::interrupt::IPCC_C1_RX_IT);
   |                                                             ^^^^^^^^^ could not find `interrupt` in `stm32wb_pac`

error[E0433]: failed to resolve: could not find `interrupt` in `stm32wb_pac`
  --> /home/rsmet/.cargo/registry/src/github.com-1ecc6299db9ec823/stm32wb-hal-0.1.2/src/ipcc.rs:61:61
   |
61 |             cortex_m::peripheral::NVIC::unmask(stm32wb_pac::interrupt::IPCC_C1_TX_IT);
   |                                                             ^^^^^^^^^ could not find `interrupt` in `stm32wb_pac`

I'm not too acquainted yet with embedded systems, but it would be nice to get a warning what went wrong, especially because I just wanted to select the specific chip.

@eupn
Copy link
Owner

eupn commented Dec 5, 2020

Hello and thank you for noticing this. I never compiled this crate without the rt feature since I was always needed interrupts. I'll put behind a feature gate all parts of the code that uses stuff provided by PAC's rt feature.

@rubdos
Copy link
Contributor Author

rubdos commented Dec 8, 2020

I'd say you could note somewhere that rt is something that's quite needed, but apparently that's also the convention in the Rust embedded world.

Thanks for coming back to it quickly. I'll be filing a PR for SPI support soon™.

@eupn
Copy link
Owner

eupn commented Dec 8, 2020

Ok, I'll keep this open until it's documented that rt is needed for the parts of the HAL that use interrupts (like mbox).

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

2 participants