How does the Uv4.exe determine in what order source files are built? I have a project that I build on my local PC, and the same project being built on a build machine. The source files get compiled in a different order on the two machines, and the .hex file we end up with is different between the two machines. They are using the same version of uVision, compiling the same project files, and running the same command-line arguments.
We need to be able to reliably reproduce the .hex file generated on the build machine. I can build twice on my machine and get the same result, but what gets built on the build machine differs from my own. How can I force the project to be more consistent in how it builds the file?
I've always been under the impression that the build order is directly based upon the order source files appear in the project tree.
Like you, I needed to be able to produce 100% identical images from PC to PC or build to build, but have never had problems - so long as I leave the project tree alone.
One gotcha for me (and maybe you) is that I use the 'feedback' feature that eliminates unused functions from the final code image. I use the term 'feedback' here unsure of the exact phrase, because I don't have access to a PC.
With this feature, it is necessary to carry out at least three builds to ensure all unused functions. Prior builds might contain unused code and would therefore have a different image.
There's the "Use Cross-Module Optimization" setting, which I currently don't have checked. Is that what you mean by 'feedback'?
I've built three times consecutively on my own PC just now and it compiled some files in a different order each time. I wonder if there are multi-threaded processes and race conditions that are causing the order to change.
No. It's not cross module optimisation that I enable. For the one I mean, you must specify a -feedback parameter (I think) in both the compile and link.
But since your rebuilding 3 times, I suspect it's not that.
What your describing is not something I see. Maybe someone else can suggest something.
View all questions in Keil forum