XScope on XK-1A

Technical discussions related to any XMOS development kit or reference design. Eg XK-1A, sliceKIT, etc.
Post Reply
PetrStrnad
Newbie
Posts: 1
Joined: Fri Apr 25, 2014 9:58 am

XScope on XK-1A

Post by PetrStrnad »

Hello,

I'm trying to get the XScope running on my XK-1A through XTAG2. Without XScope, the programs (be it my own, or the app_xscope_printing_timed_example from XMOS) run without problems, and if I remove the config.xscope file, I even see the printf output in the console.
Problem is, whenever I switch in the XScope tab of Run Configurations to either Offline or Real-Time, the program hangs on startup. I tried both Run and Debug with same results, and when I press Suspend in Debug to see where the program is waiting, it shows xscope_constructor().
Is there something I'm missing? It looks like either the device can't connect to the XScope server, or I'm supposed to somehow tell the server to start the app, but I don't see where.

The Run Configuration I'm using:
(I also tried the "xSCOPE (via xCONNECT/UART)" in the "Target I/O options")
xscope1.png
(34.72 KiB) Not downloaded yet
xscope1.png
(34.72 KiB) Not downloaded yet
xscope2.png
(18.56 KiB) Not downloaded yet
xscope2.png
(18.56 KiB) Not downloaded yet
Makefile:

Code: Select all

TARGET = XK-1A

APP_NAME =

USED_MODULES =

XCC_FLAGS = -g -O3 -fxscope
VERBOSE = 1

XMOS_MAKE_PATH ?= ../..
ifneq ($(wildcard $(XMOS_MAKE_PATH)/xcommon/module_xcommon/build/Makefile.common),)
include $(XMOS_MAKE_PATH)/xcommon/module_xcommon/build/Makefile.common
else
include ../module_xcommon/build/Makefile.common
endif
config.xscope

Code: Select all

<xSCOPEconfig ioMode="timed" enabled="true"/>
xscope_printing_timed.xc

Code: Select all

#include <xs1.h>
#include <platform.h>
#include <stdio.h>
#include <xscope.h>

int main (void) {
  for (int i = 0; i < 10; i++) {
    printf("value of i is %d\n", i);
  }
}
XK-1A.xn (the default supplied by the XMOS)

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<Network xmlns="http://www.xmos.com"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.xmos.com http://www.xmos.com">
  <Type>Board</Type>
  <Name>XK-1A Development Board</Name>
  <BoardId>0005021X</BoardId>

  <Declarations>
    <Declaration>tileref tile[1]</Declaration>
  </Declarations>

  <Packages>
    <Package id="0" Type="XS1-L1A-TQ128">
      <Nodes>
        <Node Id="0" InPackageId="0" Type="XS1-L1A" Oscillator="20MHz" SystemFrequency="400MHz">
          <Boot>
            <Source Location="SPI:bootFlash"/>
          </Boot>
          <Tile Number="0" Reference="tile[0]">
            <Port Location="XS1_PORT_1I" Name="PORT_UART_RX"/>
            <Port Location="XS1_PORT_1J" Name="PORT_UART_TX"/>
    
            <Port Location="XS1_PORT_1K" Name="PORT_BUT_1"/>
            <Port Location="XS1_PORT_1L" Name="PORT_BUT_2"/>
    
            <Port Location="XS1_PORT_1M" Name="PORT_SPI_MISO"/>
            <Port Location="XS1_PORT_1N" Name="PORT_SPI_SS"/>
            <Port Location="XS1_PORT_1O" Name="PORT_SPI_CLK"/>
            <Port Location="XS1_PORT_1P" Name="PORT_SPI_MOSI"/>

            <Port Location="XS1_PORT_4F" Name="PORT_LED"/>
          </Tile>
        </Node>
      </Nodes>
    </Package>
  </Packages>

  <Nodes>
  <Node Id="1" 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="4,4" Flags="XSCOPE">
        <LinkEndpoint NodeId="0" Link="X0LC" />
        <LinkEndpoint NodeId="1" Chanend="1" />
    </Link>
  </Links>

  <ExternalDevices>
    <Device NodeId="0" Tile="0" Class="SPIFlash" Name="bootFlash" Type="AT25FS010">
      <Attribute Name="PORT_SPI_MISO" Value="PORT_SPI_MISO"/>
      <Attribute Name="PORT_SPI_SS"   Value="PORT_SPI_SS"/>
      <Attribute Name="PORT_SPI_CLK"  Value="PORT_SPI_CLK"/>
      <Attribute Name="PORT_SPI_MOSI" Value="PORT_SPI_MOSI"/>
    </Device>
  </ExternalDevices>

  <JTAGChain>
     <JTAGDevice NodeId="0"/>
  </JTAGChain>

</Network>


rasz
New User
Posts: 2
Joined: Fri May 30, 2014 10:55 am

Post by rasz »

Xscope is broken, and looking at the forum XCORE has zero support staff so dont count on any help here.
User avatar
Folknology
XCore Legend
Posts: 1274
Joined: Thu Dec 10, 2009 10:20 pm
Contact:

Post by Folknology »

Last time I used IO redirection in Xscope I think I had to add initialisation :

Code: Select all

void xscope_user_init(void) {
   xscope_register(0, 0, "", 0, "");
   xscope_config_io(XSCOPE_IO_TIMED);
}
You could try adding that, however, I tend to use command line rather than xtimecomposer though assuming your setting are similar results should also be.

regards
Al
User avatar
sethu_jangala
XCore Expert
Posts: 589
Joined: Wed Feb 29, 2012 10:03 am

Post by sethu_jangala »

Folknology wrote:Last time I used IO redirection in Xscope I think I had to add initialisation :

Code: Select all

void xscope_user_init(void) {
   xscope_register(0, 0, "", 0, "");
   xscope_config_io(XSCOPE_IO_TIMED);
}
You could try adding that, however, I tend to use command line rather than xtimecomposer though assuming your setting are similar results should also be.
You can initialise like this or by specifying configuration information in config.xscope file.

Sethu.
Post Reply