2 posts / 0 new
Last post
uta_lc
Offline
Last seen:9 months 2 weeks ago
Joined:2016-05-03 07:39
product header

Dear Dialogue Support,

I'm trying to figure out how to configure product header using Smart snippets / mkimage.

In UM-B-012 page 26, it says, "The application specific “Configuration Offset” is initialized from off4. If off4 is not provided then the “Configuration Offset” field shall be set to 0xFFFFFFFF." What is the "configuration offset" mentioned here? I cannot find info anywhere regarding this. What is the value to be specified for creating the product header if I only care about BD address?

For example, in the following command to specify BD_adress to generate a bin file, what value shall I use for config offset?
./mkimage.exe multi spi fw_3.img 0x8000 fw_2.img 0x13000 0x1F000 out_file.bin cfg 0x???????,80:EA:CA:01:02:03

What puzzles me is that when reading the mkimage.c source code, the
/* product header */
struct product_header {
uint8_t signature[2];
uint8_t版本[2];
uint8_t offset1[4];
uint8_t offset2[4];
uint8_t bd_address[6]; <-------starts from offset 12 instead of 32
uint8_t pad[2];
uint8_t cfg_offset[4];
};
while in the manual AN-B-01 page 10, it says bd_address starts from offset 32 (12-31) are reserved.

Which one is correct?

Thanks,
uta_lc

Device:
Gongyu_Dialog
Offline
Last seen:2 days 21 hours ago
Joined:2016-04-27 07:07
You can check the source code

You can check the source code of the "Mkimage" project in utilities directory.
you are right for the format. ex . the format is "cfg off4,112233445566".
the value off4 will be put with calling " store32(p_hdr.cfg_offset, cfg_off);"
address will be put calling "memcpy(p_hdr.bd_address, bd_addr, sizeof(p_hdr.bd_address));"

And in my opinion, what An-B-01 mentions about the address allocation is not consistent with SDK code's.

Regarding the default secondary bootloader code, it doesn't check the address part.
You may follow the SDK code. and check the secondary bootloader code for its usages.

you can modify the code based on your design.