Storing data from xmos into pc files

Technical discussions around xCORE processors (e.g. General Purpose (L/G), xCORE-USB, xCORE-Analog, xCORE-XA).
User avatar
asid61
Active Member
Posts: 36
Joined: Sat May 31, 2014 6:39 am

Storing data from xmos into pc files

Postby asid61 » Sun Aug 03, 2014 12:04 am

I need to store the data coming in from xmos into some kind of file so I can do post-processing on the pc. Is there an easy or simple way to do this?
User avatar
Bianco
XCore Expert
Posts: 754
Joined: Thu Dec 10, 2009 6:56 pm

Postby Bianco » Sun Aug 03, 2014 12:23 am

With xSCOPE you can save it to an XML file.

Try xrun --xscope --xscope-file yourfile.xml yourapp.xe

or find the equivalent in xTIME Composer.
User avatar
infiniteimprobability
XCore Legend
Posts: 1124
Joined: Thu May 27, 2010 10:08 am

Postby infiniteimprobability » Mon Aug 04, 2014 8:56 am

xscope will be faster, or if you have enough local memory for buffering you could always write to a file to the host machine using stdio fopen..

Code: Select all

    outfile = fopen("output.bin","wb");	
Be aware that this uses system calls (over JTAG) so will likely break realtime stuff - hence the reason why you would need to buffer first.
User avatar
asid61
Active Member
Posts: 36
Joined: Sat May 31, 2014 6:39 am

Postby asid61 » Sun Aug 10, 2014 7:59 am

I got it working. It turns out I had to disable the xscope initiators, even if I'm running on JTAG.
Storing it into .txt files takes way too long unfortunately. 200ms just to open and close a file, and I need an 8ms response time or less.

Who is online

Users browsing this forum: No registered users and 8 guests