Questions on source code of AN00201: a startkit demo

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

Post by mon2 »

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

Post by cjf1699 »

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.
Attachments
AN00162_i2s_loopback_demo.zip
(1.52 MiB) Downloaded 184 times
AN00162_i2s_loopback_demo.zip
(1.52 MiB) Downloaded 184 times
cjf1699
Active Member
Posts: 48
Joined: Fri Mar 16, 2018 2:30 pm

Post by cjf1699 »

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.....
Post Reply