Questions on source code of AN00201: a startkit demo
-
- Active Member
- Posts: 48
- Joined: Fri Mar 16, 2018 2:30 pm
How to fix those two errors?
-
- XCore Legend
- Posts: 1913
- Joined: Thu Jun 10, 2010 11:43 am
Create a fresh project, select the xe216-512-tq128 cpu target OR your exact kit, if shown in the list and allow for the ide to create an empty c file. Compile. Any errors? Wondering if the issue is with the selection of the target. Post a zipped project for a review.
-
- Active Member
- Posts: 48
- Joined: Fri Mar 16, 2018 2:30 pm
create a fresh project..It might be too complicated . I have tried before ,but failed because the compiler kept telling me it can't find the "dsp.h" which I had included. So I avoid the error and adapted AN00162 to my own project. Does that matter?mon2 wrote:Create a fresh project, select the xe216-512-tq128 cpu target OR your exact kit, if shown in the list and allow for the ide to create an empty c file. Compile. Any errors? Wondering if the issue is with the selection of the target. Post a zipped project for a review.
And ...How to upload a zipped file?
-
- XCore Legend
- Posts: 1913
- Joined: Thu Jun 10, 2010 11:43 am
And fresh project can have an empty can file and then you can add printf for "hello world".
To add anything in your post, see below and click on attachments.
To add anything in your post, see below and click on attachments.
-
- Active Member
- Posts: 48
- Joined: Fri Mar 16, 2018 2:30 pm
I'm afraid that I didn't get you. I certainly can print a "Hello world".
And the following is my zipped project. Could you please run it on your computer and see what will happen?
I would be very appreciated if you could help me find what is on earth wrong with my xSCOPE settings. It just doesn't work .It is very flake. To summarize, I'd say:
1)Debug with printf in real-time
This method, in a word I call which a "redirect stdio",doesn't work. I followed the pdf but didn't get the same result. It seems that once the "printf" is used, the hardwares wouldn't work because it kept printing "0" which is a init value.
2)Using the xSCOPE to debug.
I have been working with this method for the whole day and I met various errors which can make a long story.
I refered to the xTIMEcomposer studio User guide and didn't get the correct result,either.Generally speaking,there are 2 situations:
a. build errors,often like these:
The desired sound can't be played by the speaker(AN00162) and it just makes a buzz. There are no curves of signals on the display pane. Only two straight lines blinked in the middle of the pane.
Thank you very much !!!!
And the following is my zipped project. Could you please run it on your computer and see what will happen?
I would be very appreciated if you could help me find what is on earth wrong with my xSCOPE settings. It just doesn't work .It is very flake. To summarize, I'd say:
1)Debug with printf in real-time
This method, in a word I call which a "redirect stdio",doesn't work. I followed the pdf but didn't get the same result. It seems that once the "printf" is used, the hardwares wouldn't work because it kept printing "0" which is a init value.
2)Using the xSCOPE to debug.
I have been working with this method for the whole day and I met various errors which can make a long story.
I refered to the xTIMEcomposer studio User guide and didn't get the correct result,either.Generally speaking,there are 2 situations:
a. build errors,often like these:
b. no build errors,but things go wrongDescription Resource Path Location Type
Undefined reference to '__sodEnd' (using xScope without specifying -fxscope?) AN00196_Getting_started_with_real_time_xSCOPE_in_xTIMEcomposer_Studio C/C++ Problem
Description Resource Path Location Type
Undefined reference to '__sodFlag' (using xScope without specifying -fxscope?) AN00196_Getting_started_with_real_time_xSCOPE_in_xTIMEcomposer_Studio C/C++ Problem
The desired sound can't be played by the speaker(AN00162) and it just makes a buzz. There are no curves of signals on the display pane. Only two straight lines blinked in the middle of the pane.
Thank you very much !!!!
You do not have the required permissions to view the files attached to this post.
-
- XCore Legend
- Posts: 1913
- Joined: Thu Jun 10, 2010 11:43 am
Ok. Downloaded the zip file -> extracted to a local folder -> imported into my workspace -> used an existing project folder and the compiler raised an error of missing lib_i2c, lib_gpio, lib_i2s (believe this was the list).
So then clicked on the lib_i2s from the bottom left side of the screen and allowed for the tool to import the lib_i2s library which also imported a mix of others and now those errors are gone. Here is what I see now:
Is this what you see or are you also missing some libraries?
So then clicked on the lib_i2s from the bottom left side of the screen and allowed for the tool to import the lib_i2s library which also imported a mix of others and now those errors are gone. Here is what I see now:
Is this what you see or are you also missing some libraries?
-
- Active Member
- Posts: 48
- Joined: Fri Mar 16, 2018 2:30 pm
This is exactly what I see.mon2 wrote:Ok. Downloaded the zip file -> extracted to a local folder -> imported into my workspace -> used an existing project folder and the compiler raised an error of missing lib_i2c, lib_gpio, lib_i2s (believe this was the list).
So then clicked on the lib_i2s from the bottom left side of the screen and allowed for the tool to import the lib_i2s library which also imported a mix of others and now those errors are gone. Here is what I see now:
Is this what you see or are you also missing some libraries?
-
- XCore Legend
- Posts: 1913
- Joined: Thu Jun 10, 2010 11:43 am
I think there is some confusion on the target definition. From where did you get the xr-audio-216-mc definition? Not audio developer so not sure why that is there as compared to xk-audio-216-mc. Need to get ready for work but will review again with some free time.
To understand and summarize, you have the XMOS audio kit and you wish to use XSCOPE (for printf in realtime) with it - nothing fancy? I did the same yesterday with the simulator and all was fine. Will test against the XCORE-200 Explorer kit which is similar but it is in the lab at work...bye for now.
To understand and summarize, you have the XMOS audio kit and you wish to use XSCOPE (for printf in realtime) with it - nothing fancy? I did the same yesterday with the simulator and all was fine. Will test against the XCORE-200 Explorer kit which is similar but it is in the lab at work...bye for now.
-
- Active Member
- Posts: 48
- Joined: Fri Mar 16, 2018 2:30 pm
But..for AN00162 ,Ijust can't build it...correctlymon2 wrote:I think there is some confusion on the target definition. From where did you get the xr-audio-216-mc definition? Not audio developer so not sure why that is there as compared to xk-audio-216-mc. Need to get ready for work but will review again with some free time.
To understand and summarize, you have the XMOS audio kit and you wish to use XSCOPE (for printf in realtime) with it - nothing fancy? I did the same yesterday with the simulator and all was fine. Will test against the XCORE-200 Explorer kit which is similar but it is in the lab at work...bye for now.
-
- XCore Legend
- Posts: 1913
- Joined: Thu Jun 10, 2010 11:43 am
Hi. I think this example compiled for me ok.
Try the following:
1) Exit your XMOS IDE and relaunch but start with a fresh project folder.
2) Download a fresh copy of the same AN00162 from here:
https://www.xmos.com/support/appnotes/AN00162
Extract this downloaded zip file to a local folder.
3) Select File -> Import -> General -> Existing Projects into Workspace -> Browse to the folder that has the expanded file from the code example.
4) Proceed to allow for the code example to download the support library files, etc. Proceed to compile and all should be good.
Try the following:
1) Exit your XMOS IDE and relaunch but start with a fresh project folder.
2) Download a fresh copy of the same AN00162 from here:
https://www.xmos.com/support/appnotes/AN00162
Extract this downloaded zip file to a local folder.
3) Select File -> Import -> General -> Existing Projects into Workspace -> Browse to the folder that has the expanded file from the code example.
4) Proceed to allow for the code example to download the support library files, etc. Proceed to compile and all should be good.