XFlash --data Option / Individual Custom Device Programming

Technical questions regarding the xTIMEcomposer, xSOFTip Explorer and Programming with XMOS.
Experienced Member
Posts: 106
Joined: Tue Jan 17, 2017 9:25 pm

XFlash --data Option / Individual Custom Device Programming

Postby RitchRock » Fri Sep 14, 2018 7:08 pm


When programming my XU-216-512-TQ128 based design, I would like to have each unit programmed with individualized .h files containing FIR coefficients. Currently, I just update the data before compilation in the .h files in question, but it would be time consuming to compile code for each unit individually. Is it possible to do what I'm after using the --data flag? Does this flag support multiple files? How would I reference this file and read it on firmware boot? Maybe there is an easier way to accomplish what I'm after?
User avatar
XCore Legend
Posts: 1337
Joined: Thu Jun 10, 2010 11:43 am

Postby mon2 » Fri Sep 14, 2018 11:14 pm

Hi Colin. Sure to be many solutions but here are some ideas to consider:

(in a batch file)
1. Run an independent program (C or PowerBasic compiled) to read your .h file and convert to binary formatted file. Call if my_dat.bin, etc.

PowerBasic is great on Windows for this kind of stuff.

2) Run xflash with the --data my_dat.bin ; to program the current binary file from above

3) Loop till you are done
(end of batch file)


you could run a XC program to program the flash with your own routines as xflash is not open source but why bother if you are ok with using xflash and pleased with the speed. Believe you can speed up the programming cycles but then you will need to experiment with your own flash code routines. We recall this when testing with standard SPI and also QSPI commands.

just some random thoughts...

Who is online

Users browsing this forum: No registered users and 61 guests