Flash Block Structure
Flash Block Structure
1.0
2007-4-23
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.
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
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
[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