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: 1126
Joined: Thu May 27, 2010 10:08 am

What's the difference between JTAG and xSCOPE printing?

Post by infiniteimprobability »

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: 1126
Joined: Thu May 27, 2010 10:08 am

Post by infiniteimprobability »

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: 1126
Joined: Thu May 27, 2010 10:08 am

Post by infiniteimprobability »

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.