What's the difference between JTAG and xSCOPE printing? Topic is solved

If you have a simple question and just want an answer.
User avatar
infiniteimprobability
XCore Legend
Posts: 1124
Joined: Thu May 27, 2010 10:08 am

What's the difference between JTAG and xSCOPE printing?

Postby infiniteimprobability » Tue May 05, 2015 6:42 am

There are two ways of printing to the console. Via JTAG to the host and via xSCOPE to the host. Which should I use?

View Solution
User avatar
infiniteimprobability
XCore Legend
Posts: 1124
Joined: Thu May 27, 2010 10:08 am

Postby infiniteimprobability » Tue May 05, 2015 6:47 am

JTAG

Pros:
-Always available (because you are using JTAG to load programs and debug anyway)
-Works by default for print.h, stdio.h, debug_print.h etc..
-Works by defualt in xtimecomposer run configuration (JTAG for Target I/O). If using command line, you will need the --io switch
Cons:
-Breaks real-time. It's slow and stops all cores on the tile printing whilst printing happens. Traps are used to make the JTAG communications to the host. Suitable for hello world or non real-time stuff only. Most XMOS stuff is real-time because peripherals are soft.. so JTAG printing very limited in use in practical systems.


xSCOPE
Pros:
-Very fast. Only a handful of cycles consumed per character. Suitable for real-time stuff 
-Only pauses the core the print is executed from.
-Also enables use of xSCOPE graphical stuff (brilliant for in system tuning/monitoring etc.)
Cons:
-Need to connect links (xconnect) to debug adapter (additional 4 wires). All recent XMOS kits have it enabled. We strongly recommend user boards have it wired up too..
-Have to enable it in your project and select in the run configuration options. (or add --xscope to xrun)

The last point is not an issue because it's very simple to enable.

To do this, add the below linked file to your project, and select xSCOPE in the I/O option of the run configuration..

config.xscope.zip

On some slicekits, you may need to set the "XLINK" or "XCONNECT" switch near the debug adapter to on, otherwise xscope prints won't make it to the XTAG adpater and host.. Since link transactions are acknowledged, it may cause your target to hang if not enabled. So switch it "on"!

 

You can find out more about xSCOPE here:

 https://www.xmos.com/support/tools/docu ... ion=latest

User avatar
infiniteimprobability
XCore Legend
Posts: 1124
Joined: Thu May 27, 2010 10:08 am

Postby infiniteimprobability » Thu Apr 07, 2016 11:51 am

Spoiler alert - a small, but hopefully useful, change in the run configurations dialogue box is coming in the next tools release.

Hopefully loss of real-time when using JTAG IO trap that gets many newcomers will be removed! (at least those using the IDE)
You do not have the required permissions to view the files attached to this post.

Who is online

Users browsing this forum: No registered users and 7 guests