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.
C files built through
build.rs
are not rebuilt when they are modified. The developer has to do something likecargo 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 throughcargo:rerun-if-changed
. The files built throughfreertos-cargo-build
should automatically have this applied if possible (at leastshim.c
but ideally also theFreeRTOS-Kernel
source). There may be other files built by the user'sbuild.rs
through the innercc
, which should be left alone so the user can decide what to do.