Windows CE Binary Image Data Format (.bin)

The binary image (.bin) file format organizes data by sections. Each section contains a section header that specifies the starting address, length, and checksum for that section.

Romimage.exe writes data organized by logical sections, such as an application's text or .data region, to the .bin file.

The image terminates with an image record header with the physical address and checksum set to zero.

A configuration file formatted as a .bin file is small and fast. A .bin file is about half the size of an .sre file. This smaller size allows a .bin file to download faster than an .sre file when you are using the Windows CE Console Debug Shell tool (Cesh.exe).

The following table shows the .bin file format.

Field Length (bytes) Description
Sync bytes (optional) 7 Byte 0 is B,indicating a .bin file format.

Bytes 1-6 are reserved and set to 0, 0, 0, F, F, \n.

Image header, consisting of the following:    
Image address
4 Physical starting address of the image.
Image length
4 Physical length, in bytes, of the image.
One or more records, consisting of the following:    
Record address
4 Physical starting address of data record.

If this value is zero, the record address is the end of the file, and record length contains the starting address of the image.

Record length
4 Length of record data, in bytes.
Record checksum
4 Signed 32-bit sum of record data bytes.
Record data
Record length Record data.

The following code example shows a .bin file format definition.

IMAGE HEADER 15 Bytes:
4230303046460A - 7 byte sync record
000000A0 - 4 byte starting physical address of image
00004000 - 4 byte physical length of image

IMAGE RECORD HEADER 12 Bytes:
4 byte physical address of record
4 byte length of record
4 byte checksum of record
Image Record Data - Length specified in length of record

 Last updated on Friday, October 08, 2004

© 1992-2003 Microsoft Corporation. All rights reserved.