trying to backup XU216-512-TQ128-C20

Technical questions regarding the XTC tools and programming with XMOS.
tmavr
Junior Member
Posts: 5
Joined: Sat Jun 21, 2014 10:15 am

trying to backup XU216-512-TQ128-C20

Post by tmavr »

Hi all,

   long time ago I had some experience programming XS1-L1.

   I recentlly bought a new xmos to experiment XU216-512-TQ128-C20 from http://www.diyinhk.com/shop/audio-kits/ ... igh-qualit...

  I instaled the latest tools xTime Composer etc.

  I used my old xmos XTAG-2

  After disabling my antivirus (avast free latest) I was able to list the xtag and see the conectes xmos device

C:\Program Files (x86)\XMOS\xTIMEcomposer\Community_14.1.1\bin>..\SetEnv.bat
C:\Program Files (x86)\XMOS\xTIMEcomposer\Community_14.1.1\bin>xflash.exe -l

Available XMOS Devices
----------------------

  ID    Name                    Adapter ID      Devices
  --    ----                    ----------      -------
  0     XMOS XTAG-2             VhCDYkOE        None

....After conecteing the new xmos ...

C:\Program Files (x86)\XMOS\xTIMEcomposer\Community_14.1.1\bin>xrun -l

Available XMOS Devices
----------------------

  ID    Name                    Adapter ID      Devices
  --    ----                    ----------      -------
  0     XMOS XTAG-2             VhCDYkOE        O[0]

 

So I wanted to make a firmware backup before I start a new project ( I have already downloaded and started fiddling with the open source usb audio code)

But I am not sure how to do it

I tried some thing like:

C:\Program Files (x86)\XMOS\xTIMEcomposer\Community_14.1.1\bin>xflash -v --read-all -o .\back\back0 --target XU216-512-TQ128-C20
XFlash::DoXFlash
C:\Program Files (x86)\XMOS\xTIMEcomposer\Community_14.1.1\targets\XU216-512-TQ128-C20\XU216-512-TQ128-C20.xn:16 Warning: XN11135 Attribute SystemFrequency is ignored when Oscillator is not specified.
xflash: Error: F03040 Platform definition (XN) does not specify a boot SPI flash.

 

Can you please help me to get the backup?

 

 

 

Read




tmavr
Junior Member
Posts: 5
Joined: Sat Jun 21, 2014 10:15 am

Post by tmavr »

According to the board manufacturer:
5. This PCB is basically following the XMOS XCORE-200 Multichannel Audio Platform reference design, please refer to the document on the xmos website for all the detail.
So I guess, the hardware pinout and connections are as in the reference
https://www.xmos.com/download/private/x ... l(1.2).pdf
Still, I am not sure on how to proceed to get a backup.
henk
Respected Member
Posts: 347
Joined: Wed Jan 27, 2016 5:21 pm

Post by henk »

I think that the difference is between the chip which is on there, and the system

Code: Select all

--target XU216-512-TQ128-C20
Only specifies the XMOS chip - not the system around it (clock frequency, pins where the flash is, etc). You will need an XN file that describes the system.

I am not sure that I can point you to the right XN file, maybe somebody else can. As a guess, assuming that you have this board: <https://www.xmos.com/support/boards?product=18334>. You will find a link to a ZIP file with the source code on that page, which should have the relevant XN file in it. There are many XN files in that ZIP (because the software builds on a multitude of boards);

Code: Select all

--target-file sw_usb_audio/app_usb_aud_xk_216_mc/src/core/xk-audio-216-mc.xn
may well related to that particular board.
tmavr
Junior Member
Posts: 5
Joined: Sat Jun 21, 2014 10:15 am

Post by tmavr »

Henk, thank you very much for your reply.

That’s kind of what I was also thinking.

I tried it and got a backup file, 2048KB
Trouble is it is almost empty. In a hex editor after 0000b000 (45,056bytes) up to the end of file 001fffff it is all ffff
Sample code:

Code: Select all

C:\Program Files (x86)\XMOS\xTIMEcomposer\Community_14.1.1\bin>xflash -v --read-all -o .\back\back4 --target-file \Users\tmavr\workspace2\app_usb_aud_xuf_216_mc\src\core\xuf-audio-216-mc.xn
XFlash::DoXFlash
XFlash::DoReadWriteErase
XFlash_Programmer_Read::DoRead
XFlash_Programmer_Read::IssueCompileCommand
xcc -w -Xmapper --dontenablesodlinks  -x xn "\Users\tmavr\workspace2\app_usb_aud_xuf_216_mc\src\core\xuf-audio-216-mc.xn" -O2 -lquadflash -D xnPORT_SQI_CS0=PORT_SQI_CS -D xnPORT_SQI_SCLK0=PORT_SQI_SCLK -D xnPORT_SQI_SIO0=PORT_SQI_SIO -x xc "fr-134428bd" -o "fr-c1a33651"
XFlash_Utils::BuildRunCommand : xrun --io fr-c1a33651
Second idea was to create a new .xn based on xk-audio-216-mc.xn
Since my chip is marked as u11692c20 indicating XUF216-512-TQ128 (instead if XE216-512-TQ128) I thought it would require minimal changes. XUF* has internal QSPI flash memory.
I double checked the pinout, and the board developer, seems to have all the audio ports in the same config, that’s good
All I changed in the new .xn was the package id

Code: Select all

    <Package id="0" Type="XS2-UFnA-512-TQ128">  
I Also tried <Source Location="bootFlash"/> and even tried <Source Location="SPI:bootFlash"/>
And always with

Code: Select all

    <Device NodeId="0" Tile="0" Class="SQIFlash" Name="bootFlash">
      <Attribute Name="PORT_SQI_CS" Value="PORT_SQI_CS"/>
      <Attribute Name="PORT_SQI_SCLK" Value="PORT_SQI_SCLK"/>
      <Attribute Name="PORT_SQI_SIO" Value="PORT_SQI_SIO"/>
But again the files that I got as backup
All had the same md5 as before
And all contain only ~45KB, the rest of it up to 2MB is ff

So I wonder, why do I read all this ffff and not instructions-data?
Am I doing something wrong trying to read the internal flash memory SQI etc.?
Could the firmware be locked somehow and I can’t extract it, and only see the bootloader or something?
User avatar
Bianco
XCore Expert
Posts: 754
Joined: Thu Dec 10, 2009 6:56 pm

Post by Bianco »

45KB for the firmware sounds plausible...