0% found this document useful (0 votes)
36 views7 pages

Flash Block Structure

The document describes the structure of software binary files used for flash storage. It is composed of blocks like bootloader, code, and databases linked by headers. Each block has an ID, length, offset, and other metadata. A blocks script specifies these values to build the binary file.

Uploaded by

gongjinjun10
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
36 views7 pages

Flash Block Structure

The document describes the structure of software binary files used for flash storage. It is composed of blocks like bootloader, code, and databases linked by headers. Each block has an ID, length, offset, and other metadata. A blocks script specifies these values to build the binary file.

Uploaded by

gongjinjun10
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 7

Flash Block Structure

1.0

2007-4-23

THIS DOCUMENT CONTAINS PROPRIETARY TECHNICAL INFORMATION WHICH IS THE PROPERTY


OF ALI CORPORATION AND SHALL NOT BE DISCLOSED TO OTHERS IN WHOLE OR IN PART,
REPRODUCED, COPIED, OR USED AS THE BASIS FOR DESIGN, MANUFACTURING, OR SALE OF
APPARATUS WITHOUT WRITTEN PERMISSION OF ALI CORPORATION

Flash Block Structure


Change History

Revision Issue Date Comments


1.0 2007-04-23 First release

Flash Block Structure


Contents
1. Software binary file structure....................................................................................................................................1
1.1 Overview..........................................................................................................................................................1
1.2 Header structure.............................................................................................................................................1
2. Blocks script................................................................................................................................................................3
2.1 Terms...............................................................................................................................................................3
2.2 Time separators.............................................................................................................................................3
2.3 Example...........................................................................................................................................................3

Flash Block Structure


1. Software binary file structure

Overview
The software binary file is composed of several parts. Such as: bootloader, main code, menu logo,
radio back, and factory db, user db, and so on. You can add/del/replace some blocks if needed to fit
new requirement. But two chunks are special: bootloader—always locate at the first chunk; user db—
always locate the last chunk

Header structure
These chunks are linked by some information at the header of each chunk. The information occupies
128 bytes. Its format is illustrated in the following figure.

Flash Block Structure 1


 ID filed identifies the data block.(except bootloader)

 Type X1X2
Regulation: X1=^X2
Currently some ids have been assigned:
0x00FF -OTA loader
0x01FE -main code
0x02FD -logo
0x03FC -default database
0x04FB -user database
0x06F9 -beep
0x08F7 keydata
Others reserved
 Index
0x01—0xFE
0x00, 0xFF reserved
 Attr
Reserved
 Length field denote the part length of header (0x70) and the actual data length in byte of the data
block.
 Offset field denote the relative address of the next data block from the start of this header. If this
block is the last block, then the offset value is zero.
 CRC field is compute len bytes data after CRC field(that is name field). Some chunks need not
CRC, such as bootloader and userdb. Fill CRC field with 0x4E435243(“NCRC”).
 Name field
 Version field
 Time field

Flash Block Structure 2


2. Blocks script
Blocks script is case insensitive.

Terms
 Mark
[File]
[OutFile]
 expression
Id for chunk header id field, except bootloader.
Len for chunk header offset field. “Len” is default if “file” defined, which according to the
length of input file and 0x70 bytes header. But “len” of the last chunk, user db, indicate the max length
which can be used by userdb, including 0x70 bytes header.
Offset for chunk header offset field.
NCRC indicate no crc for the chunk.
File chunk file path.
Name for chunk header name field.
Ver for chunk header version field.
Time for chunk header time field.
Out out file path
 comment
;

Time separators
.- / \\ _
The setting of time field is according to PC system time.

Example
[File]
id=0
offset=0x10000
file=bloader2.abs
name="bootloader"
ver="XXXX----0.1.0"
time=2007.2.12

[File]
id=0x01FE0100
offset=0x90000
file=app_code.bin
name="maincode"
ver="XXX_070329"

[File]
id=0x02FD0100
offset=0x10000
file=logo_1.m2v
name="videoback"
ver="1.0.0"
time=2005-8-1

Flash Block Structure 3


[File]
id=0x02FD0200
offset=0x10000
file=logo_2.m2v
name="radioback"
ver="1.0.0"
time=2005-8-1

[File]
id=0x02FD0300
offset=0x10000
file=logo_menu.m2v
name="userback"
ver="1.0.0"
time=2005-8-1

[File]
id=0x03FC0100
offset=0x2ff80
file=factory_data.bin
name="defaultdb"
ver="1.1.0"

[File]
id=0x04FB0100
len=0x100070
;file=userdb.bin
name="userdb"
ver="1.0.0"
;time=2004.1/4

[OutFile]
out=product_XXX.abs

Flash Block Structure 4

You might also like