xflash parameters

Technical questions regarding the XTC tools and programming with XMOS.
johnswenson1
Member++
Posts: 16
Joined: Sun Jul 14, 2013 5:14 am

xflash parameters

Post by johnswenson1 »

I have a custom board defined in a custom .xn file. I'm trying to use xflash to generate a binary image that can be flashed at manufacture of the board.

I specify the .xn file with --target-file, but I don't know what name to use for --target. No matter what name I use it says it can't find file for target. I have tried the name of the .xn file, the name of the TARGET variable in the makefile, the "NAME" section in the .xn file, I've tried upper case lower case, nothing seems to work.

BTW I can flash the board just fine from the gui.

Any clues?

Thanks,

John S.


User avatar
sethu_jangala
XCore Expert
Posts: 589
Joined: Wed Feb 29, 2012 10:03 am

Post by sethu_jangala »

I you want to specify a target based on list of targets which are available in XMOS tools, you need to specify as below:

xflash --target <target_file> <binary.xe>

you can get the list of installed targets from the following directory:
XMOS_xTIMEcomposer_Enterprise_13.2.0/targets/

But If you want to flash to custom board, you need to specify the target file as shown below:

xflash --target-file custom.xn <binary.xe>
johnswenson1
Member++
Posts: 16
Joined: Sun Jul 14, 2013 5:14 am

Post by johnswenson1 »

I have done
xflash --target-file C:\custom.xn C:\binary.xe

I get
Failed to load a target platform definition from archive C:\binary.xe

Do I have to have the files in the directory I'm in when running xflash and not use paths? Do they have to be in their official directory structure in the project?

Thanks,

John S.
User avatar
sethu_jangala
XCore Expert
Posts: 589
Joined: Wed Feb 29, 2012 10:03 am

Post by sethu_jangala »

johnswenson1 wrote: Do I have to have the files in the directory I'm in when running xflash and not use paths? Do they have to be in their official directory structure in the project?
The files can be anywhere as long as the path is correct.

Not sure what is causing issue in your case. Can you please give some more information about the following:
1. Tools version you are using.
2. Procedure on how you are flashing the device.
3. Development board you are using.
johnswenson1
Member++
Posts: 16
Joined: Sun Jul 14, 2013 5:14 am

Post by johnswenson1 »

I found the problem, the .xe was generated with 12.2 and xflash was coming from 13.1, when i used 12.2 xflash it worked fine.

Thanks,

John S.
User avatar
sethu_jangala
XCore Expert
Posts: 589
Joined: Wed Feb 29, 2012 10:03 am

Post by sethu_jangala »

johnswenson1 wrote:I found the problem, the .xe was generated with 12.2 and xflash was coming from 13.1, when i used 12.2 xflash it worked fine.

Thanks,

John S.
ah...yes, there are some changes in xflash between tools 12version and tools 13version.

If you want to generate upgradable image for device firmware upgrade for binary generated using older version of tools(12) from newer verso of tools(13), you can use the following command line argument:
--factory-version <12|13>

When making an upgrade image only, specify the tools version that built the factory image.