How do I use the sc_xscope_support-master directory?

Technical discussions around xCORE processors (e.g. General Purpose (L/G), xCORE-USB, xCORE-Analog, xCORE-XA).
User avatar
asid61
Active Member
Posts: 36
Joined: Sat May 31, 2014 6:39 am

Post by asid61 »

sethu_jangala wrote:For testing the application, I just did a small change to the code:

Code: Select all

int main() {
    xscope_user_init();
    unsigned sample=1;
    while (1) {
        sample++;
        xscope_int(0, sample);
    }
    return 0;
}
build the code using xmake from the command line and run the binary using the following command:
xrun --xscope-realtime --xscope-port 127.0.0.1:12346 Socket_test.xe
Host side, change the hook_data_receive function as shown below:

Code: Select all

void hook_data_received(int sockfd, int xscope_probe, void *data, int data_len)
{
  // Do nothing
int * a= (int *) data;
 printf("%d", *(a));
}
Run the host application using the following command:
./dsp_control -s 127.0.0.1 -p 12346
Note:First run the host application and then run the binary on the device.

After running both the application you see the host receiving the data that is being sent by the device.
Hope this helps.

Sethu.
I made the changes you suggested, but it is still not working. It still gives me the

Code: Select all

ERROR: socket bind.(0)
ERROR: socket listen.(0)
ERROR: socket accept.(0)
message on the command line that I run xrun on.
I think I might backup my workspace and programs, then do a reinstall of Xtime Composer just to be sure that my installation isn't weird or something is messed up.


User avatar
yuvaraj
Member
Posts: 8
Joined: Fri Oct 18, 2013 9:23 am

Post by yuvaraj »

Hi,

Check whether the local loop in working on your computer.
ping 127.0.0.1 should do it.

-Yuvaraj
User avatar
asid61
Active Member
Posts: 36
Joined: Sat May 31, 2014 6:39 am

Post by asid61 »

yuvaraj wrote:Hi,

Check whether the local loop in working on your computer.
ping 127.0.0.1 should do it.

-Yuvaraj
That seems to work fine. Thanks for the suggestion.
User avatar
sethu_jangala
XCore Expert
Posts: 589
Joined: Wed Feb 29, 2012 10:03 am

Post by sethu_jangala »

If you are still not able to run and see the output on the host side application, can you check if your XN file contains xSCOPE defined:

Code: Select all

<Node Id="1" Type="device:" routingId="0x8000" RoutingId="32768" Reference="xscope_tile">
      <Service Id="0" Proto="xscope_host_data(chanend c);">
        <Chanend Identifier="c" end="3"/>
      </Service>
    </Node>
User avatar
asid61
Active Member
Posts: 36
Joined: Sat May 31, 2014 6:39 am

Post by asid61 »

Fantastic! Thank you so much Sethu, I just did a reinstall and it works now! Now I just need to get everything else to function properly...