diff --git a/build/native.rs b/build/native.rs index e53960416a1..094c73cf806 100644 --- a/build/native.rs +++ b/build/native.rs @@ -255,6 +255,11 @@ fn build_cargo_first() -> Result { env::set_var("PATH", &idf.exported_path); + // Remove the sdkconfig file generated by the esp-idf so that potential changes + // in the user provided sdkconfig and sdkconfig.defaults don't get ignored. + // Note: I'm really not sure why we have to do this. + let _ = fs::remove_file(path_buf![&out_dir, "sdkconfig"]); + // Create cmake project. copy_file_if_different( manifest_dir.join(path_buf!("resources", "cmake_project", "CMakeLists.txt")), @@ -378,7 +383,6 @@ fn build_cargo_first() -> Result { )?; let mut cmake_config = cmake::Config::new(&out_dir); - cmake_config .generator(cmake_generator.name()) .out_dir(&out_dir)