Page 2 of 2

Re: How do I use the sc_xscope_support-master directory?

Posted: Fri Sep 19, 2014 3:41 am
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.

Re: How do I use the sc_xscope_support-master directory?

Posted: Fri Sep 19, 2014 7:30 am
by yuvaraj
Hi,

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

-Yuvaraj

Re: How do I use the sc_xscope_support-master directory?

Posted: Sun Sep 21, 2014 5:59 am
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.

Re: How do I use the sc_xscope_support-master directory?

Posted: Sun Sep 21, 2014 12:47 pm
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>

Re: How do I use the sc_xscope_support-master directory?

Posted: Fri Sep 26, 2014 5:15 am
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...