Iam now trying for several hours to use xscope on my project, because it seems to pose some weired behaviour with the debug prints.
After long experimenting and using several tutorials/forum posts to help (like: https://www.xcore.com/forum/viewtopic.php?f=8&t=2120) I got no direct errors from the compiler anymore, yet it does not work.
I try offline mode, and it won't generate that intermediate file, which I placed in my user folder.
(C:\Users\Flip\Documents\xscope.xmt).
The used Processor is the XEF216-512-TQ128-C20.
and the xTimeComposer: Version: Community_14.1.2 (build 17961, Dec-04-2015)
Link definition:
Code: Select all
<Links>
<Link Encoding="5wire">
<LinkEndpoint NodeId="0" Link="8" Delays="52clk,52clk"/>
<LinkEndpoint NodeId="1" Link="XL0" Delays="1clk,1clk"/>
</Link>
<Link Encoding="2wire" Delays="4,4" Flags="XSCOPE">
<LinkEndpoint NodeId="0" Link="XL0"/>
<LinkEndpoint RoutingId="0x8000" Chanend="1"/>
</Link>
</Links>
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); -->
<!--<Probe name="DataRight" type="CONTINUOUS" datatype="UINT" units="Value" enabled="true"/> -->
</xSCOPEconfig>
Makefile:
Code: Select all
# The TARGET variable determines what target system the application is
# compiled for. It either refers to an XN file in the source directories
# or a valid argument for the --target option when compiling
TARGET = XEF216-512-TQ128-C20
# The APP_NAME variable determines the name of the final .xe file. It should
# not include the .xe postfix. If left blank the name will default to
# the project name
APP_NAME = DiscreteDAC
# The USED_MODULES variable lists other module used by the application.
USED_MODULES =
# The flags passed to xcc when building the application
# You can also set the following to override flags for a particular language:
# XCC_XC_FLAGS, XCC_C_FLAGS, XCC_ASM_FLAGS, XCC_CPP_FLAGS
# If the variable XCC_MAP_FLAGS is set it overrides the flags passed to
# xcc for the final link (mapping) stage.
XCC_FLAGS = -O2 -g -fxscope
XCC_FLAGS_Debug = -g -O0 -fxscope
XCC_FLAGS_Release = -g -O3 -fxscope
# The XCORE_ARM_PROJECT variable, if set to 1, configures this
# project to create both xCORE and ARM binaries.
XCORE_ARM_PROJECT = 0
# The VERBOSE variable, if set to 1, enables verbose output from the make system.
VERBOSE = 0
XMOS_MAKE_PATH ?= ../..
-include $(XMOS_MAKE_PATH)/xcommon/module_xcommon/build/Makefile.common
LIB_DIRS =
Code: Select all
#include <xscope.h>
void xscope_user_init ( void ) {
xscope_register (2,
XSCOPE_CONTINUOUS , " Data Left ", XSCOPE_INT , "mV",
XSCOPE_CONTINUOUS , " Data Right ", XSCOPE_INT , "mV"
);
}
[[combinable]]
void ConvertToInternalData(streaming chanend Input, chanend OutputLi, chanend OutputRe, int Mode)
{
while(1)
{
select
{
case Input :> int Data:
switch(Mode)
{
case 0: //TestDaten
OutputLi <: Data;
break;
case 1: //S/PDIF
if ((Data & 0xf) == FRAME_Y)
{
Data &= 0x0FFFFFF0;
#ifndef ssrc
Data = Data >> 4;
Data = Data + 0x00800000;
#else
Data = Data << 4;
#endif
OutputRe <: Data;
xscope_int(1, Data);
}
else if ((Data & 0x0F) == FRAME_X || (Data & 0x0F) == FRAME_Z)
{
Data &= 0x0FFFFFF0;
#ifndef ssrc
Data = Data >> 4;
Data = Data + 0x00800000;
#else
Data = Data << 4;
#endif
//OutputLi <: Data;
xscope_int(0, Data);
}
break;
}
break;
}
}
}
I will greatly appreciate any help whatsoever.