Question: I am looking for recommendations for a tool that will let me construct a binary image out of a series of smaller images.

I have an embedded system with a flash ROM that I program using a single image. That image consists of a series of smaller objects (data, compiled code, etc) placed at specific offsets. The build system I inherited uses a disturbing amalgam of old 16-bit DOS utilities to hack the image together. I was hoping to find a modern tool that would do the job in a less arcane (and less bug-prone) manner.

The tool needs to be able to run from a config file. That is, I specify that file A.bin needs to be placed at offset 4KB, file B.bin needs to be placed at offset 16KB, etc etc in a configuration file so that the tool does not require repeated manual command-line invocations. This is mainly because we have another system that will be auto-generating these config files.

The tool also needs to be open source (or at a minimum, cross-platform). We have developers using Windows and automated build systems using Linux and the tool would need to work on both.

I have debated hacking together my own utility in C, but before I went through all the trouble developing and debugging I wanted to ask and see if someone knew of a tool that was already out there that I missed.

**Edit:** Cygwin-related tools are unfortunately not an option for us. One of our critical build tools will crash if it is run on a system with Cygwin installed (I think it uses a specific, older cygwin DLL but that's an entirely different fiasco unto itself).

Answer: 
I usually write my own, but via Jack Ganssle's [Embedded Muse](http://www.ganssle.com/tem-back.htm) newsletter No. 184 I came across <http://srecord.sourceforge.net/> which will do just about anything with almost any type of binary image file (despite its name it handles far more formats than just Motorola S-Records, including raw binaries). It may save you some time.
[dd](http://www.gnu.org/software/coreutils/manual/html_node/dd-invocation.html) would be definitively your best friend.

Use cygwin for windows users.