cancel
Showing results for 
Search instead for 
Did you mean: 

Is it possible in STM32CubeIDE to set a compiler dependency on ALL sources?

Jim Seymour
Senior

I am using the latest STM32CubeIDE on a Windows platform - developing code for a STM32G0B1.

I have a version.c file in my project that uses the __DATE__ and __TIME__ macros to create strings that I use in other modules.

To ensure this file gets compiled on every build, I have a custom Pre-Build step that "touches" that file.  This all works fine.

However, if I use the IDE to load the code into my hardware, it always does a build beforehand.  Because of this "touch", I get a new date string every time I run a debug session.

Is it possible to replace the "touch" step with some kind of dependency on "all source files"?  In other words, can I make it so my version.c gets recompiled ONLY if some other source file has been updated?

I know that I can turn off the "Build (if required) before launching" option.  But I'd rather keep that option as is, unless  changing it is the only way to do what I want.

Thanks.

 

 

0 REPLIES 0