cancel
Showing results for 
Search instead for 
Did you mean: 

Create a "hash" of all source files as a pre-build step?

Andrew Neil
Super User

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

Specifically, this post:

I guess you could do some sort of hash of all the source code?

This wouldn't stop the version.c file getting rebuilt every time, but it would let you see whether the rest of the code actually changed or not.

Or you could take it further: save the hash in a file somewhere, and only do the touch when the hash has changed?

Any suggestions on how to do this "hash" as a pre-build step? Is there anything included within the CubeIDE build stuff that would do this?

A complex system that works is invariably found to have evolved from a simple system that worked.
A complex system designed from scratch never works and cannot be patched up to make it work.
0 REPLIES 0