hmm I specified this target in the .config/.cargo and I wrote this for bindgen let bindings = bindgen::Builder::default() .header(headers.join("acc_config.h").to_str().unwrap()) .header(headers.join("acc_definitions_a121.h").to_str().unwrap()) .clang_arg("--target=arm-none-eabi") .clang_arg(format!("-I{}", armpath.join("arm-none-eabi/include").display())) .generate();