lobaro / FreeRTOS-rust

Rust crate for FreeRTOS
MIT License
354 stars 56 forks source link

C files are not rebuit when modified #38

Closed schteve closed 1 year ago

schteve commented 1 year ago

C files built through build.rs are not rebuilt when they are modified. The developer has to do something like cargo clean and then build again. There's also no warning or message that the C files are newer and may need to be rebuilt. This all results in the developer potentially building / running with out of date code and can easily cause confusing issues.

By default, Cargo doesn't know about files that are managed by build.rs so this makes sense. But it can be told about these files through cargo:rerun-if-changed. The files built through freertos-cargo-build should automatically have this applied if possible (at least shim.c but ideally also the FreeRTOS-Kernel source). There may be other files built by the user's build.rs through the inner cc, which should be left alone so the user can decide what to do.

schteve commented 1 year ago

Closed by #39