Skip to content

Commit

Permalink
Fix sdkconfig(.defaults) changes not applying
Browse files Browse the repository at this point in the history
Previously when changing sdkconfig or sdkconfig.defaults files
these changes were not applied without a `cargo clean`.

This is fixed by removing the generated `sdkconfig` file in the out
before the build of the esp-idf. Note though, that changing a
sdkconfig value will now recompile the whole esp-idf.
  • Loading branch information
N3xed committed May 11, 2022
1 parent 60c1eea commit 468b792
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion build/native.rs
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,11 @@ fn build_cargo_first() -> Result<EspIdfBuildOutput> {

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")),
Expand Down Expand Up @@ -378,7 +383,6 @@ fn build_cargo_first() -> Result<EspIdfBuildOutput> {
)?;

let mut cmake_config = cmake::Config::new(&out_dir);

cmake_config
.generator(cmake_generator.name())
.out_dir(&out_dir)
Expand Down

0 comments on commit 468b792

Please sign in to comment.