embassy-rs/embassy · error
Pin has no IOMUXC definitions
Error message
Pin {} has no IOMUXC definitions What it means
During build-script codegen for pin peripherals, `generate_iomuxc` filters pins that should have IOMUXC mux definitions and then unwraps the `iomuxc` field of each matched pin. A pin reaching that closure without `iomuxc` data means the chip metadata and the filter are inconsistent — an internal invariant of the generated metadata — so the script panics naming the pin.
Solutions
- Update embassy-nxp and its metadata dependencies to matching, latest versions (`cargo update -p embassy-nxp`).
- Verify the enabled chip feature is one officially supported by this embassy-nxp release; try a different/older chip feature.
- If reproducible on a supported chip, file a bug with the chip name and pin from the panic message — this is a crate-side metadata bug.
Example fix
// Cargo.toml
// before
embassy-nxp = { git = "https://...", features = ["mimxrt1170"] } # metadata mismatch
// after
embassy-nxp = { version = "0.1", features = ["mimxrt1062"] } # supported chip, matching metadata Defensive patterns
Strategy: fallback
Try / catch
// Build-time panic; guard by pinning known-good versions.
// Cargo.toml
[dependencies]
embassy-nxp = { version = "=0.1.0", features = ["mimxrt1062"] } // exact pin, avoid metadata skew Prevention
- Pin embassy-nxp and its metadata crates to compatible, tested versions (no bare git deps).
- Only use chip features listed as supported in the release notes.
- Report build-script metadata panics upstream with chip name and pin from the message.
When it happens
Trigger: Building embassy-nxp against a chip whose metadata contains a pin where the filter accepted it (`iomuxc` with `mux.is_some()`) but `pin.iomuxc` is `None` at the unwrap point — i.e. a metadata/chip-definition inconsistency in the crate, not user input.
Common situations: Using a recently added or poorly supported chip feature where metadata tables are incomplete; mixing embassy-nxp versions where the `imxrt-ral`/metadata crate and embassy-nxp got out of sync; a bug in the crate's chip metadata generator.
Understand the failure class
Background: "This is a bug, please report it": internal invariant violations, unreachable panics, and SNH errors explained — this error's family across 47 libraries.
Related errors
- Invalid ADC channel side
- no SYSCTL peripheral
- AHB frequency is too low
- No mimxrt/lpc Cargo feature enabled
- Multiple mimxrt/lpc Cargo features enabled
AI-assisted analysis of embassy-rs/embassy@463a07b963 (2026-09-10).
Data as JSON: /api/errors/44dfe089dd1640d5.
Report an issue: GitHub.
Appendix: source
Thrown at embassy-nxp/build.rs:157
let channel_number = signal.name.strip_prefix("OUT").unwrap().parse::<u8>().unwrap();
let name = format!("SCT{instance}_OUT{channel_number}");
singletons.push(Singleton { name, cfg: None });
}
}
singletons
}
#[cfg(feature = "_rt1xxx")]
fn generate_iomuxc() -> TokenStream {
let iomuxc_pad_impls = metadata::METADATA
.pins
.iter()
.filter(|p| p.iomuxc.as_ref().filter(|i| i.mux.is_some()).is_some())
.map(|pin| {
let Some(ref iomuxc) = pin.iomuxc else {
panic!("Pin {} has no IOMUXC definitions", pin.name);
};
let name = Ident::new(pin.name, Span::call_site());
let mux = iomuxc.mux.unwrap();
let pad = iomuxc.pad;
quote! {
impl_iomuxc_pad!(#name, #pad, #mux);
}
});
let base_match_arms = metadata::METADATA
.peripherals
.iter()
.filter(|p| p.name.starts_with("GPIO"))
.map(|peripheral| {
peripheral.signals.iter().map(|signal| {
// All GPIO signals have a single pin.View on GitHub (pinned to 463a07b963)