SOLVED: Generating flash image for manufacturing

Technical questions regarding the XTC tools and programming with XMOS.
susnak
Member
Posts: 13
Joined: Fri Apr 12, 2019 1:01 pm

SOLVED: Generating flash image for manufacturing

Post by susnak »

Dear all,

I am struggling with creating a factory flash image for a custom board with xu208 + external QSPI flash. My goal is to generate the flash image (without having the xtag connected), which could be written directly to the external flash with a generic flash programmer.

Programming the flash through the xtag works, however, the content of the flash differs from the flash image generated directly with xflash ... -o fact.bin. Apart from few bits here and there which I assume are timestamps in headers, the size and content of the stage 2 loader seems to be different and the entire content following the loader is shifted. Obviously, fact.bin does not work when written directly to the flash with an external programmer.

Here are the commands I use (the latest xtime composer):

Just the image:
xflash --spi-spec myflash.txt --factory myxe.xe -o fact.bin --verbose --noinq

Programming the flash:
xflash --spi-spec myflash.txt --factory myxe.xe --verbose

The --verbose dumps are attached. The only difference I see is:

Just the image:
XFlash_Builder_Binary::BuildBinary
XFlash_Builder_Binary::CalculateBufferSize_Factory
XFlash_Builder_Binary::CalculateBufferSize_Factory : Adding s2l size word (4)4
XFlash_Builder_Binary::CalculateBufferSize_Factory : Adding s2l app (f5c) f60
XFlash_Builder_Binary::CalculateBufferSize_Factory : Adding s2l crc (4)f64
XFlash_Builder_Binary::CalculateBufferSize_Factory : Adding factory app (b4ec) c450
XFlash_Builder_Binary::CalculateBufferSize_Factory : Adding sector padding (b0) c500
XFlash_Builder_Binary::CalculateBufferSize_Factory : First User Sector offset = c500
XFlash_Builder_Binary::GetSearchLimitPadding : current size (c500) 12b00

Programming the flash:
XFlash_Builder_Binary::BuildBinary
XFlash_Builder_Binary::CalculateBufferSize_Factory
XFlash_Builder_Binary::CalculateBufferSize_Factory : Adding s2l size word (4)4
XFlash_Builder_Binary::CalculateBufferSize_Factory : Adding s2l app (f60) f64
XFlash_Builder_Binary::CalculateBufferSize_Factory : Adding s2l crc (4)f68
XFlash_Builder_Binary::CalculateBufferSize_Factory : Adding factory app (b4ec) c454
XFlash_Builder_Binary::CalculateBufferSize_Factory : Adding sector padding (bac) d000
XFlash_Builder_Binary::CalculateBufferSize_Factory : First User Sector offset = d000
XFlash_Builder_Binary::GetSearchLimitPadding : current size (d000) 12000

Thank you for your time.
Cheers,
Zdenek

UPDATE: It turns out that I forgot to check the QE bit in the generic programmer. Now it works.
You do not have the required permissions to view the files attached to this post.
Last edited by susnak on Thu Jun 27, 2019 12:28 pm, edited 2 times in total.


RicoS
New User
Posts: 2
Joined: Sun May 26, 2019 6:00 pm

Post by RicoS »

susnak wrote:Dear all,

I am struggling with creating a factory flash image for a custom board with xu208 + external QSPI flash. My goal is to generate the flash image (without having the xtag connected), which could be written directly to the external flash with a generic flash programmer.

Programming the flash through the xtag works, however, the content of the flash differs from the flash image generated directly with xflash ... -o fact.bin. Apart from few bits here and there which I assume are timestamps gimp freejobalert notepad++ in headers, the size and content of the stage 2 loader seems to be different and the entire content following the loader is shifted. Obviously, fact.bin does not work when written directly to the flash with an external programmer.

Here are the commands I use (the latest xtime composer):

Just the image:
xflash --spi-spec myflash.txt --factory myxe.xe -o fact.bin --verbose --noinq

Programming the flash:
xflash --spi-spec myflash.txt --factory myxe.xe --verbose

The --verbose dumps are attached. The only difference I see is:

Just the image:
XFlash_Builder_Binary::BuildBinary
XFlash_Builder_Binary::CalculateBufferSize_Factory
XFlash_Builder_Binary::CalculateBufferSize_Factory : Adding s2l size word (4)4
XFlash_Builder_Binary::CalculateBufferSize_Factory : Adding s2l app (f5c) f60
XFlash_Builder_Binary::CalculateBufferSize_Factory : Adding s2l crc (4)f64
XFlash_Builder_Binary::CalculateBufferSize_Factory : Adding factory app (b4ec) c450
XFlash_Builder_Binary::CalculateBufferSize_Factory : Adding sector padding (b0) c500
XFlash_Builder_Binary::CalculateBufferSize_Factory : First User Sector offset = c500
XFlash_Builder_Binary::GetSearchLimitPadding : current size (c500) 12b00

Programming the flash:
XFlash_Builder_Binary::BuildBinary
XFlash_Builder_Binary::CalculateBufferSize_Factory
XFlash_Builder_Binary::CalculateBufferSize_Factory : Adding s2l size word (4)4
XFlash_Builder_Binary::CalculateBufferSize_Factory : Adding s2l app (f60) f64
XFlash_Builder_Binary::CalculateBufferSize_Factory : Adding s2l crc (4)f68
XFlash_Builder_Binary::CalculateBufferSize_Factory : Adding factory app (b4ec) c454
XFlash_Builder_Binary::CalculateBufferSize_Factory : Adding sector padding (bac) d000
XFlash_Builder_Binary::CalculateBufferSize_Factory : First User Sector offset = d000
XFlash_Builder_Binary::GetSearchLimitPadding : current size (d000) 12000

Thank you for your time.
Cheers,
Zdenek
Struggling for the same. In need of help ASAP.

Thanks in advance,
Regards
Rico