Back in the good old bad old days, backing up an embedded project was simple. You put the source files and makefile on a floppy disk. And for good measure, you could put a copy of the compiler, assembler, linker, and any other tools on the floppy too. The complete toolchain needed to recreate the shipped code, neatly wrapped up in its own little time capsule.
And that toolchain is an important detail. The source code on its own is not enough to recreate a build, you have to factor in the tools too. The output from a compiler can vary by a surprising amount between versions.
These days things are not so straightforward. The compiler, assembler, and linker still exist, but they generally lurk behind the comforting facade of a glossy integrated development environment (IDE). You don't need to figure out the arcane invocations needed to convince the command line tools to do your bidding, you just tick some checkboxes in an options dialog. And I for one don't have a problem with this, I'm perfectly happy for such details to be sorted out behind the scenes.
However this ease of use can be a double-edged sword. That sparkly shiny IDE is likely a significant chunk of code, and will be squirreling away information in all sorts of nooks and crannies on your PC - in the registry, in initialisation files, in configuration files, and down in the depths of your Documents and Settings folder.
Add in some vendor patch releases and user modifications, and suddenly keeping a snapshot of the state of your tools starts getting tricky. Not only do you need to know that the code was built with v1.2.3.4 of the Acme Super Awesome IDE, but also that at that point you'd applied three vendor patches, and hand-modified a chip configuration file that you'd found a bug in. You'd reported it to Acme MegaCorp technical support, but there hadn't been a bug fix release yet.
Now what do you do?
My current solution is to store a simple text file called 'build instructions.txt' or similar with each project. It lists the IDE version, any applied patches, and any funnies such as the aforementioned modified chip configuration file. This approach is not exactly high tech or complicated, but works fine.
I can't help thinking that there must be a better way though - this is still a bit handraulic and error-prone. I suggested to our IT guy that we could create a virtual machine (VM) image containing a bare bones XP install, plus the IDE, plus any 'non-standard' files (patches and the like). That way we could simply specify which VM image to use with the source and project files hauled out of version control. But that made him go a bit green and start shaking. He was mumbling about licensing issues with that many Windows images.
So - if anybody knows of a better way of doing this, do please let me know in the comments.