{"record":{"id":"44dfe089dd1640d5","repo":"embassy-rs/embassy","slug":"pin-has-no-iomuxc-definitions","errorCode":null,"errorMessage":"Pin {} has no IOMUXC definitions","messagePattern":"Pin (.+?) has no IOMUXC definitions","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"embassy-nxp/build.rs","lineNumber":157,"sourceCode":"            let channel_number = signal.name.strip_prefix(\"OUT\").unwrap().parse::<u8>().unwrap();\n            let name = format!(\"SCT{instance}_OUT{channel_number}\");\n\n            singletons.push(Singleton { name, cfg: None });\n        }\n    }\n\n    singletons\n}\n\n#[cfg(feature = \"_rt1xxx\")]\nfn generate_iomuxc() -> TokenStream {\n    let iomuxc_pad_impls = metadata::METADATA\n        .pins\n        .iter()\n        .filter(|p| p.iomuxc.as_ref().filter(|i| i.mux.is_some()).is_some())\n        .map(|pin| {\n            let Some(ref iomuxc) = pin.iomuxc else {\n                panic!(\"Pin {} has no IOMUXC definitions\", pin.name);\n            };\n\n            let name = Ident::new(pin.name, Span::call_site());\n            let mux = iomuxc.mux.unwrap();\n            let pad = iomuxc.pad;\n\n            quote! {\n                impl_iomuxc_pad!(#name, #pad, #mux);\n            }\n        });\n\n    let base_match_arms = metadata::METADATA\n        .peripherals\n        .iter()\n        .filter(|p| p.name.starts_with(\"GPIO\"))\n        .map(|peripheral| {\n            peripheral.signals.iter().map(|signal| {\n                // All GPIO signals have a single pin.","sourceCodeStart":139,"sourceCodeEnd":175,"githubUrl":"https://github.com/embassy-rs/embassy/blob/463a07b963419a1bfe61d5d597c44acb810afb8b/embassy-nxp/build.rs#L139-L175","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","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."],"exampleFix":"// Cargo.toml\n// before\nembassy-nxp = { git = \"https://...\", features = [\"mimxrt1170\"] }  # metadata mismatch\n// after\nembassy-nxp = { version = \"0.1\", features = [\"mimxrt1062\"] }     # supported chip, matching metadata","handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":"// Build-time panic; guard by pinning known-good versions.\n// Cargo.toml\n[dependencies]\nembassy-nxp = { version = \"=0.1.0\", features = [\"mimxrt1062\"] } // exact pin, avoid metadata skew","preventionTips":["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."],"tags":["embedded","build-script","codegen","nxp","metadata","panic"],"backgroundTag":"internal-invariant-violation","analyzedSha":"463a07b963419a1bfe61d5d597c44acb810afb8b","analyzedAt":"2026-09-10T13:38:26.660Z","contentChangedAt":"2026-09-10T13:38:26.660Z","schemaVersion":2},"datasetVersion":"2026-09-16T04:17:20.429Z"}