Page 1 of 1

Building to hex etc. file and flashing from that file without rebuilding

Posted: Wed Jul 05, 2017 9:23 am
by aclassifier
This probably has been shown before..

I have a startKIT I would like to reflash with different versions of the code without rebuilding.

I found the XFlash Options to output to file but I didn't get it to work...

What's the procedure for this and where do I find it described?

Re: Building to hex etc. file and flashing from that file without rebuilding

Posted: Wed Jul 05, 2017 9:58 am
by colin
Hi aclassifier

You can use xflash option -o to output your flash image to file, i.e: xflash my_prog.xe -o my_flash_prog.bin

You can then use xflash option --write-all to write your binary file to flash memory, i.e.: xflash --write-all my_flash_prog.bin --target=XCORE-200-EXPLORER

Best Wishes,
Colin

Re: Building to hex etc. file and flashing from that file without rebuilding

Posted: Wed Jul 05, 2017 2:29 pm
by aclassifier
Thanks! I did

Flash As | Flash Configurations and made a new config (based on the default) called "MyProject to-file". I then edited in XFlash Options with Other XFlash options: -o _Aquarium_1_x.bin as the other params should have been picked up. This generated _Aquarium_1_x.bin ok

Another new config called "MyProject from-file". Same as above but with the last set to --write-all _Aquarium_1_x.bin with or without --target=STARTKIT. Any way I got "Error: F03073 Mutually incompatible options specified."

I did find these params in "xTIMEcomposer User Guide, chapter 32XFLASH Command-Line Manual", but I didn't find out which params that clashed. I tried some of the params in the Main tab but no

Re: Building to hex etc. file and flashing from that file without rebuilding

Posted: Wed Jul 05, 2017 2:40 pm
by colin
Same as above but with the last set to --write-all _Aquarium_1_x.bin

When you say same as above, do you have --write-all and -o in the same xflash command set? If so then this is what would give you the mutually exclusive options error. You cannot output a file and write a file to flash memory at the same time. You must give target or target-file when using write-all as xflash cannot resolve the XN file from the *.bin file.

Colin.

Re: Building to hex etc. file and flashing from that file without rebuilding

Posted: Wed Jul 05, 2017 3:57 pm
by aclassifier
No, I didn't:-( The -o was in to-file config and the --write-all _Aquarium_1_x.bin with or without --target=STARTKIT was in from-file config

Re: Building to hex etc. file and flashing from that file without rebuilding

Posted: Thu Jul 06, 2017 7:01 pm
by aclassifier
I have tried "everything" but since I am not able to see the offending action when "Error: F03073 Mutually incompatible options specified" then I am completely stuck.

I have attached a jpg with the three configs (three rows) and the two tabs for each (columns).

The top config is default build and flash. The middle builds the bin file fine. It is the bottom config that causes the error.

Image

Re: Building to hex etc. file and flashing from that file without rebuilding

Posted: Fri Jul 07, 2017 8:50 am
by colin
Hi aclassifier,

I've done a little digging and it seems that you cannot use the GUI to perform --write-all, --read-all or --erase-all functions with xflash. The GUI xflash configuration automatically adds the xcore binary (*.xe) to the xflash command line. In doing so it forces you to either program the binary to flash or output the binary to a binary file (as in your first case). In your second case, adding --write-all to the command line options appends this with the automatically added xcore binary (*.xe) and so gives the mutually exclusive error. Therefore you are going to have to perform the --write-all option using the command line rather than through the GUI.

I will raise this as an issue internally for future releases.

Best Wishes
Colin.

Re: Building to hex etc. file and flashing from that file without rebuilding

Posted: Fri Jul 07, 2017 8:58 am
by aclassifier
Thanks! I had a feeling there was something inherent. I certainly agree that it should have been great to do it with the GUI.