Questions on source code of AN00201: a startkit demo

New to XMOS and XCore? Get started here.
User avatar
mon2
XCore Legend
Posts: 1849
Joined: Thu Jun 10, 2010 11:43 am

Re: Questions on source code of AN00201: a startkit demo

Postby mon2 » Mon Apr 02, 2018 11:20 pm

To remove the error, modify the makefile using right click -> OPEN WITH -> text editor and add the following flag:


Image

Then CTRL-S to save this modified text file with the new flag -> compile again.
cjf1699
Active Member
Posts: 48
Joined: Fri Mar 16, 2018 2:30 pm

Postby cjf1699 » Tue Apr 03, 2018 4:20 am

Thank you, I re-imported the project and have already compiled it sucessfully. Now the problem is that I followed this:
And I have added -fxscope to the XCC_FLAG in the makefile and included <xscope.h>.(And by the way, the default .xn file of AN00162 is XR-AUDIO-216-MC and the project is exactly for my board )

To use xscope, I added the function:

Code: Select all

void xscope_user_init(void)
{
  xscope_register(2,
                  XSCOPE_CONTINUOUS, "Input Value", XSCOPE_INT, "Value",
                  XSCOPE_CONTINUOUS, "Output Value", XSCOPE_INT, "Value");

}
and called it at the beginning of the i2s_loopback function.
Finally, I called xscope_int() function in the case "i2s_receive" and "i2s_send" in the switch construct.
Having done all the above, I setup the hardware, run the project and played music by the PC.

But , what I got ,is still two straight lines as the picture below shows. Obviously, the audio data isn't captured correctly by the xscope.

Image
And I got message from the console:
xSCOPE warning ... System is already registered, new registration call ignored
And I also attach my zipped code. As I said above ,I only made several changes in the main.xc file and I have marked them. Is there anything wrong?
What should I do next?Thank you so much.
You do not have the required permissions to view the files attached to this post.
cjf1699
Active Member
Posts: 48
Joined: Fri Mar 16, 2018 2:30 pm

Postby cjf1699 » Tue Apr 03, 2018 7:00 am

mon2 wrote:To remove the error, modify the makefile using right click -> OPEN WITH -> text editor and add the following flag:


Image

Then CTRL-S to save this modified text file with the new flag -> compile again.
Have you fixed the errors this way ? I have already added the flag but the error still exists.....

Who is online

Users browsing this forum: No registered users and 4 guests