How to debug on xCORE-200 Multichannel Audio Platform ? Topic is solved

If you have a simple question and just want an answer.
Dyang
Member++
Posts: 17
Joined: Tue Nov 01, 2016 2:06 am

How to debug on xCORE-200 Multichannel Audio Platform ?

Post by Dyang »

I buy the xCORE-200 Multichannel Audio Platform,When I debug a xxxxxx.xe,I can't see any printf info.
What should I do if I want to see some printf info?
Ps:
When I debug a sample ex: hello world.I can see the printf ......
Help~Thanks!


View Solution
henk
Respected Member
Posts: 347
Joined: Wed Jan 27, 2016 5:21 pm

Post by henk »

It may be to do with the xscope configuration.

Make sure the there is an XSCOPE link in the XN file. make sure the config.xscope file has the first line

Code: Select all

<xSCOPEconfig ioMode="basic" enabled="true">
and execute with

Code: Select all

xrun --io --xscope xxxx.xe
Dyang
Member++
Posts: 17
Joined: Tue Nov 01, 2016 2:06 am

Post by Dyang »

@henk :
There hasn't any XSCOPE link in the XN file,so,I add
<xSCOPEconfig ioMode="basic" enabled="true"/>
into the xn file,
But it doesn't work...


The Console says:
Warning: XN11128 Node <xSCOPEconfig> is not recognised; ignoring.

How can I resolve this warning ?
Thank you!
henk
Respected Member
Posts: 347
Joined: Wed Jan 27, 2016 5:21 pm

Post by henk »

hi Dyang,

There is two files here; one is the XN file that specifies the board hardware; that needs to have an XSCOPE link in it to tell the tools where in the hardware your XSCOPE link is. That would be something
like the following:

Code: Select all

  <Nodes>
    <Node Id="2" Type="device:" RoutingId="0x8000">
      <Service Id="0" Proto="xscope_host_data(chanend c);">
        <Chanend Identifier="c" end="3"/>
      </Service>
    </Node>
  </Nodes>
  <Links>
    <Link Encoding="2wire" Delays="5clk" Flags="XSCOPE">
      <LinkEndpoint NodeId="0" Link="XL0"/>
      <LinkEndpoint NodeId="2" Chanend="1"/>
    </Link>
  </Links>
But note that it depends on the precise hardware as to where this link is, and if there is an xscope link.

Then there is a configuration for the tool xscope to tell it how to use xscope; that specifies whether you want IO over xscope or not, and whether there are any probes. This is the config.xscope file, and needs the lines

Code: Select all

<xSCOPEconfig ioMode="basic" enabled="true">
    <!-- For example: -->
    <!-- <Probe name="Probe Name" type="CONTINUOUS" datatype="UINT" units="Value" enabled="true"/> -->
    <!-- From the target code, call: xscope_int(PROBE_NAME, value); -->
</xSCOPEconfig>
Then compile all with -fxscope, and execute with xrun --io --xscope.

If you have no XSCOPE link on the board, then there will be no XSCOPE link int he XN file, you will set enabled to FALSE in the xscope.conf file, compile without -fxscope, and run with xrun --io.
Dyang
Member++
Posts: 17
Joined: Tue Nov 01, 2016 2:06 am

Post by Dyang »

pardon me...
I find those code

Code: Select all

  <Nodes>
    <Node Id="2" Type="device:" RoutingId="0x8000">
      <Service Id="0" Proto="xscope_host_data(chanend c);">
        <Chanend Identifier="c" end="3"/>
      </Service>
    </Node>
  </Nodes>
  <Links>
    <Link Encoding="2wire" Delays="5clk" Flags="XSCOPE">
      <LinkEndpoint NodeId="0" Link="XL0"/>
      <LinkEndpoint NodeId="2" Chanend="1"/>
    </Link>
  </Links>
But I didn't found the xscope.conf ,so I tried to add a new file into the project,

Code: Select all

    <xSCOPEconfig ioMode="basic" enabled="true">
    	<Probe name="1" type="CONTINUOUS" datatype="UINT" units="Value" enabled="true"/>
    </xSCOPEconfig>
and I added this to my audiohw.xc file

Code: Select all

      xscope_int(1,1);
Then ,I use xrun --io --xscope app_usb_aud_xk_216_mc_2i10o10xsxxxx.xe,I can't see printf info ...
can you tell me which step I did is wrong?
henk
Respected Member
Posts: 347
Joined: Wed Jan 27, 2016 5:21 pm

Post by henk »

The final check - Is there a -fxscope in the flags of the Makefile?

Cheers,
Henk
Dyang
Member++
Posts: 17
Joined: Tue Nov 01, 2016 2:06 am

Post by Dyang »

@henk :
I am sorry to replay so late,I am interesting in it ,But now ,I have some other working...so,Can I replay you later ? Thank you very much! I will replay you soon...
Dyang
Member++
Posts: 17
Joined: Tue Nov 01, 2016 2:06 am

Post by Dyang »

@henk :
dear,I resovled this question by
Take a look at the examples : https://www.xmos.com/support/examples,
In those pdf,I find when I debug ,I can chose "Run XScope output server" ,and
with file "config.xscope" in dir "src",

Code: Select all

<xSCOPEconfig ioMode="basic" enabled="true"/>
then ,I can see the printk!Thank for you help!