Bug in Xflash for upgrades?

Technical questions regarding the xTIMEcomposer, xSOFTip Explorer and Programming with XMOS.
kster59
XCore Addict
Posts: 162
Joined: Thu Dec 31, 2009 8:51 am

Bug in Xflash for upgrades?

Postby kster59 » Sun Jul 18, 2010 10:56 pm

According to the manual, if you specify -o with xflash then the device will generate an output binary.

so:
xflash --spi-div 2 --upgrade 1 maint.xe -o output.bin

should generate the output.bin file without writing anything to flash.

However, I found that the device itself must be connected to the programmer otherwise xflash doesn't make output.bin.

The simple workaround is just to connect the device whenever you want to generate the flash file but this is certainly not the intended behavior.

Please let me know if I am missing anything...
User avatar
segher
XCore Expert
Posts: 843
Joined: Sun Jul 11, 2010 1:31 am

Postby segher » Mon Jul 19, 2010 1:21 am

You might want the --dump-image option? Works fine here without device connected.
The output is bit-reversed (per byte) of course.


Segher
kster59
XCore Addict
Posts: 162
Joined: Thu Dec 31, 2009 8:51 am

Postby kster59 » Mon Jul 19, 2010 1:44 am

--dumpimage is removed from 10.4

I think that only works with 9.9.2

So the bug is in 10.4 and not 9.9.2
m_y
Experienced Member
Posts: 69
Joined: Mon May 17, 2010 10:19 am

Postby m_y » Mon Jul 19, 2010 8:25 am

In order to produce exactly the same output to file as it would have written to a flash, xflash attempts to connect to a target in order to query the SPI device. You can suppress this with "--noinq" at the cost of xflash not being able to determine the sector layout. For a single upgrade image the sector size doesn't matter so you can ignore the warning.

IIRC "--noinq" is missing from the help message. This omission is a bug and the option will be listed in future releases.
kster59
XCore Addict
Posts: 162
Joined: Thu Dec 31, 2009 8:51 am

Postby kster59 » Mon Jul 19, 2010 8:47 am

Isn't the sector layout specific to the flash device which is in the .xn file?

I will just leave it as is connected to the device for now to ensure it is programmed correctly.

Also, is there an option to order XMOS chips preprogrammed? I've made my PCB with holes that fit an XTAG2 20pin .100" header and use a spring loaded pogo adapter to program without having to install the connector but as I move to higher volumes of 3k-10k it will become a pain.
m_y
Experienced Member
Posts: 69
Joined: Mon May 17, 2010 10:19 am

Postby m_y » Mon Jul 19, 2010 9:18 am

kster59 wrote:Isn't the sector layout specific to the flash device which is in the .xn file?
The XN file describes how the device is attached and how it should be used to boot but the field for type is just a textual note. It is libflash which identifies a flash and this needs to run in order to work.

Who is online

Users browsing this forum: No registered users and 0 guests