flash image header format Topic is solved

Technical questions regarding the xTIMEcomposer, xSOFTip Explorer and Programming with XMOS.
malo
Active Member
Posts: 33
Joined: Fri Sep 16, 2016 9:03 pm

flash image header format

Postby malo » Wed Nov 30, 2016 10:55 am

Hello,

I would need to check the fw image uploaded to xmos device before flashing it (using xmodem).
Is there some doc reg image created by the xflash? - I could not find any...
I just need to get version and size - from looking into the image file seems like the info is there.

thanks in advance.

wbr
malo
View Solution
colin
Experienced Member
Posts: 74
Joined: Mon Dec 16, 2013 12:14 pm

Postby colin » Wed Nov 30, 2016 1:59 pm

Hi Malo,

The following table describes the image headers used in flash. You can find the offsets for the image size and version numbers here. Note there are two image size/length fields so take care to use the correct one for your purpose.
OffsetFieldDescription
0Image Tag0x1a551e5 for tools versions Tools12 and below; 0x0FF51DE for tools version Tools13 and above
1Page CRCCRC value for 256 bytes (64 words) from offset 3 of the Image Header Table
2Image CRCCRC value for the full image from offset 3 of the Image Header Table
3Image Features (TOOLS 13)See image features field below
4Image SizeSize value the user requested with option --factory or --upgrade (Otherwise same as Image length)
5Image VersionVersion as specified when using option --upgrade (0 for --factory image)
6Image LengthThe actual size of the image from offset 0 of the Image Header table to then end of the Application data (or Overlay data if used)
7Num Core ImagesThe number of core tables found within this image
8Boot Image Address (TOOLS 13)The address in RAM where the boot image address is to be stored (symbol __boot_image_address required in application)
9Overlay Address (TOOLS 13)The address in RAM where the overlay data is to be stored (-foverlay=flash / -foverlay=quadflash)
10Overlay offset (TOOLS 13)Offset in vytes from the start of the image of where the overlay data is located
11Switch Setup Header offset (NEW TOOLS 13.2)Offset in bytes from the start of the image of where the network setup table is located
12Core Entry Header offset (NEW TOOLS 13.2)Offset in bytes from the start of the image of where the first core application table is located
Best wishes
Colin

Who is online

Users browsing this forum: No registered users and 5 guests