title: Container for firmware file: collection of binary data parts
body: <p>I need to generate firmware file for embedded device, and I'm wondering what are the best practices of the format of data structures like that.</p>
  
  <p>There should be several items in that file: firmware for MCU, some data parts to be written to the device flash memory.</p>
  
  <p>The obvious way is to implement that format "by hand": some header at the start of the file (header should contain version of data structure), then address table, and then data. That's the way I used in previous projects, and I'm really tired of maintaining this structure when I need to change something.</p>
  
  <p>Is there some existing container to store data collections in the binary file? There would be nice to have library for many platforms (at least, C++ and Java) that can handle this data collection. What comes to mind is SQLite database file with one or several tables, but it seems to be overhead for my needs.</p>
  
  <p>Is there some best practices to achieve what I need?</p>