-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
ICE when type not specificed for static variable (Embassy) #127211
Comments
Can you share a bit more info about building the project? Cargo.toml file, environment variables you need to set, etc? |
Sorry, yeah here's the Cargo.toml contents and instructions for building at the bottom. Cargo.toml contents: [package] [dependencies] Command line to build: May be needed to compile successfully: |
Regarding this issue - the simple fix is to add the type to the static variable, and rustc is happy. Just wanted to give you the backtrace in case there's other issues. |
Compiler panics with just this use embassy_sync::blocking_mutex::raw::NoopRawMutex;
use embassy_sync::pubsub::PubSubChannel;
static temperature_channel: _ = PubSubChannel::<NoopRawMutex, f32, 1, 2, 2>::new(); Panic and stack trace looks similar to #124164, both reproducible in current nightly |
yeah, this is a duplicate of #124164. closing as such, thank you for the report anyways. |
Code
#![no_std]
#![no_main]
#![deny(missing_docs, unsafe_code)]
use embassy_sync::blocking_mutex::raw::NoopRawMutex;
use embassy_sync::pubsub::{PubSubChannel };
use {defmt_rtt as _, panic_probe as _};
use embassy_executor::Spawner;
static temperature_channel = PubSubChannel::<NoopRawMutex, f32, 1, 2, 2>::new();
#[embassy_executor::main]
async fn main(spawner: Spawner) {
let p = embassy_stm32::init(Default::default());
}
Meta
rustc --version --verbose
:Error output
Backtrace
The text was updated successfully, but these errors were encountered: