I'm following the installation instructions in AN02014 but am getting errors.
I've got the XTC 15.3.1 command prompt and Python 3.12 virtual environment set, but when I try pip install -Ur requirements.txt I get the following error message:
The requirements.txt file contains:
# python_version 3.12
# pip_version 24.*
notebook
-e ../lib_audio_dsp/python/
Which doesn't tally with the folder structure of the application note source code.
The application note documentation also specifies the application folder as app_dsp_and_usb however in the source code download it's called app_an02014.
How do I get this application note code up and running in Jupyter Notebook please?
Kind regards,
Al
AN02014 Installation Issue
-
- Experienced Member
- Posts: 96
- Joined: Sun Apr 08, 2018 11:19 pm
AN02014 Installation Issue
You do not have the required permissions to view the files attached to this post.
-
Verified
- Active Member
- Posts: 54
- Joined: Wed May 22, 2024 2:36 pm
Are you looking at the latest version of the doc? https://www.xmos.com/documentation/XM-0 ... 02014.html
I can't see any reference to app_dsp_and_usb
Regarding the requirements.txt I am not seeing any issues there so hopefully this will also be resolved by looking at the latest version of the doc.
thanks,
Huw
I can't see any reference to app_dsp_and_usb
Regarding the requirements.txt I am not seeing any issues there so hopefully this will also be resolved by looking at the latest version of the doc.
thanks,
Huw
XMOS Software Engineer


-
- Experienced Member
- Posts: 96
- Joined: Sun Apr 08, 2018 11:19 pm
Hi xhuw,
Thanks very much, as far as I can see the only relevant difference between the v1.0.1 version of AN02014 I was using and the latest v2.0.0 version is that the name of the application folder has been corrected to app_an2014.
The instruction pip install -Ur requirements.txt is the same in both versions of the documentation. So whilst 'root directory' has a very specific meaning, I am interpreting the documentation to mean to navigate to the folder an02014 where requirements.txt is located. So I think I'm following the instructions in the documentation correctly but still get the same error.
Thanks very much, as far as I can see the only relevant difference between the v1.0.1 version of AN02014 I was using and the latest v2.0.0 version is that the name of the application folder has been corrected to app_an2014.
The instruction pip install -Ur requirements.txt is the same in both versions of the documentation. So whilst 'root directory' has a very specific meaning, I am interpreting the documentation to mean to navigate to the folder an02014 where requirements.txt is located. So I think I'm following the instructions in the documentation correctly but still get the same error.
You do not have the required permissions to view the files attached to this post.
-
Verified
- Active Member
- Posts: 54
- Joined: Wed May 22, 2024 2:36 pm
hmm, The docs assumed you downloaded the whole sandbox from here: https://www.xmos.com/file/an02014-integ ... nce-design
When unzipped you get both the app note and lib_audio_dsp (which is what is missing in your screenshot)
Where did you find the app note source code?
Thanks
When unzipped you get both the app note and lib_audio_dsp (which is what is missing in your screenshot)
Where did you find the app note source code?
Thanks
You do not have the required permissions to view the files attached to this post.
XMOS Software Engineer


-
- Experienced Member
- Posts: 96
- Joined: Sun Apr 08, 2018 11:19 pm
Hi xhuw,
I got the software from the XMOS website as you identify, however Windows is inconsistent in how it extracts Zipped files, I found that I had to extract to my Desktop first to preserve the folder structure and then copy over to my Workspace (extracting directly to my Workspace didn't preserve the 'root' folder with the same file name as the .zip file).
So I now have this location as my 'root' folder for the app note:
C:\Workspace\XMOS\XTC_15.3.1\AN02014_-Integrating-DSP-into-the-XMOS-USB-reference-design-_sw_2_0_0
I then started the Python virtual environment in this location. but the pip install -Ur requirements.txt still fails as the requirements.txt file isn't in this location, so I have to change directory to an02014 for it to execute correctly. I suggest the term 'root directory' is not helpful in the documentation and the required specific folder name should be used instead.
The sequence of steps in the user documentation should change to:
py -3.12 -m venv .venv
.venv\Scripts\activate
cd an2014
pip install -Ur requirements.txt
cd app_an2014
jupyter notebook dsp.ipynb
when I start the notebook, I get an 'Error displaying widget: model found' at the bottom of the cell.
When I try Run All Cells, it starts ok but fails on the Configuration stage. What is the cause please?
CMake Warning (dev) at C:/Program Files/XMOS/XTC/15.3.1/build/xcommon_cmake/xcommon.cmake:34 (enable_language):
project() should be called prior to this enable_language() call.
Call Stack (most recent call first):
CMakeLists.txt:2 (include)
This warning is for project developers. Use -Wno-dev to suppress it.
-- Configuring application: app_an02014
-- Adding dependency lib_xua
-- Adding dependency lib_adat
-- Adding dependency lib_locks
-- Adding dependency lib_logging
-- Adding dependency lib_spdif
-- Adding dependency lib_sw_pll
-- Adding dependency lib_xassert
-- Adding dependency lib_mic_array
-- Adding dependency lib_xcore_math
-- Adding dependency lib_xud
-- Adding dependency lib_i2c
-- Adding dependency lib_i2s
-- Adding dependency lib_audio_dsp
-- Adding dependency lib_board_support
-- Configuring done (6.1s)
CMake Error at C:/Program Files/XMOS/XTC/15.3.1/build/xcommon_cmake/xcommon.cmake:758 (target_sources):
Cannot find source file:
C:/Workspace/XMOS/XTC_15.3.1/AN02014_-Integrating-DSP-into-the-XMOS-USB-reference-design-_sw_2_0_0/lib_xcore_math/lib_xcore_math/src/etc/xmath_fft_lut/xmath_fft_lut.c
Call Stack (most recent call first):
C:/Program Files/XMOS/XTC/15.3.1/build/xcommon_cmake/xcommon.cmake:767 (configure_lib)
C:/Workspace/XMOS/XTC_15.3.1/AN02014_-Integrating-DSP-into-the-XMOS-USB-reference-design-_sw_2_0_0/lib_xcore_math/lib_xcore_math/lib_build_info.cmake:131 (XMOS_REGISTER_MODULE)
C:/Program Files/XMOS/XTC/15.3.1/build/xcommon_cmake/xcommon.cmake:830 (include)
C:/Program Files/XMOS/XTC/15.3.1/build/xcommon_cmake/xcommon.cmake:726 (XMOS_REGISTER_DEPS)
C:/Program Files/XMOS/XTC/15.3.1/build/xcommon_cmake/xcommon.cmake:767 (configure_lib)
C:/Workspace/XMOS/XTC_15.3.1/AN02014_-Integrating-DSP-into-the-XMOS-USB-reference-design-_sw_2_0_0/lib_mic_array/lib_mic_array/lib_build_info.cmake:16 (XMOS_REGISTER_MODULE)
C:/Program Files/XMOS/XTC/15.3.1/build/xcommon_cmake/xcommon.cmake:830 (include)
C:/Program Files/XMOS/XTC/15.3.1/build/xcommon_cmake/xcommon.cmake:726 (XMOS_REGISTER_DEPS)
C:/Program Files/XMOS/XTC/15.3.1/build/xcommon_cmake/xcommon.cmake:767 (configure_lib)
C:/Workspace/XMOS/XTC_15.3.1/AN02014_-Integrating-DSP-into-the-XMOS-USB-reference-design-_sw_2_0_0/lib_xua/lib_xua/lib_build_info.cmake:53 (XMOS_REGISTER_MODULE)
C:/Program Files/XMOS/XTC/15.3.1/build/xcommon_cmake/xcommon.cmake:830 (include)
C:/Program Files/XMOS/XTC/15.3.1/build/xcommon_cmake/xcommon.cmake:625 (XMOS_REGISTER_DEPS)
app_an02014/CMakeLists.txt:29 (XMOS_REGISTER_APP)
-- Generating done (0.1s)
CMake Generate step failed. Build files cannot be regenerated correctly.
I got the software from the XMOS website as you identify, however Windows is inconsistent in how it extracts Zipped files, I found that I had to extract to my Desktop first to preserve the folder structure and then copy over to my Workspace (extracting directly to my Workspace didn't preserve the 'root' folder with the same file name as the .zip file).
So I now have this location as my 'root' folder for the app note:
C:\Workspace\XMOS\XTC_15.3.1\AN02014_-Integrating-DSP-into-the-XMOS-USB-reference-design-_sw_2_0_0
I then started the Python virtual environment in this location. but the pip install -Ur requirements.txt still fails as the requirements.txt file isn't in this location, so I have to change directory to an02014 for it to execute correctly. I suggest the term 'root directory' is not helpful in the documentation and the required specific folder name should be used instead.
The sequence of steps in the user documentation should change to:
py -3.12 -m venv .venv
.venv\Scripts\activate
cd an2014
pip install -Ur requirements.txt
cd app_an2014
jupyter notebook dsp.ipynb
when I start the notebook, I get an 'Error displaying widget: model found' at the bottom of the cell.
When I try Run All Cells, it starts ok but fails on the Configuration stage. What is the cause please?
CMake Warning (dev) at C:/Program Files/XMOS/XTC/15.3.1/build/xcommon_cmake/xcommon.cmake:34 (enable_language):
project() should be called prior to this enable_language() call.
Call Stack (most recent call first):
CMakeLists.txt:2 (include)
This warning is for project developers. Use -Wno-dev to suppress it.
-- Configuring application: app_an02014
-- Adding dependency lib_xua
-- Adding dependency lib_adat
-- Adding dependency lib_locks
-- Adding dependency lib_logging
-- Adding dependency lib_spdif
-- Adding dependency lib_sw_pll
-- Adding dependency lib_xassert
-- Adding dependency lib_mic_array
-- Adding dependency lib_xcore_math
-- Adding dependency lib_xud
-- Adding dependency lib_i2c
-- Adding dependency lib_i2s
-- Adding dependency lib_audio_dsp
-- Adding dependency lib_board_support
-- Configuring done (6.1s)
CMake Error at C:/Program Files/XMOS/XTC/15.3.1/build/xcommon_cmake/xcommon.cmake:758 (target_sources):
Cannot find source file:
C:/Workspace/XMOS/XTC_15.3.1/AN02014_-Integrating-DSP-into-the-XMOS-USB-reference-design-_sw_2_0_0/lib_xcore_math/lib_xcore_math/src/etc/xmath_fft_lut/xmath_fft_lut.c
Call Stack (most recent call first):
C:/Program Files/XMOS/XTC/15.3.1/build/xcommon_cmake/xcommon.cmake:767 (configure_lib)
C:/Workspace/XMOS/XTC_15.3.1/AN02014_-Integrating-DSP-into-the-XMOS-USB-reference-design-_sw_2_0_0/lib_xcore_math/lib_xcore_math/lib_build_info.cmake:131 (XMOS_REGISTER_MODULE)
C:/Program Files/XMOS/XTC/15.3.1/build/xcommon_cmake/xcommon.cmake:830 (include)
C:/Program Files/XMOS/XTC/15.3.1/build/xcommon_cmake/xcommon.cmake:726 (XMOS_REGISTER_DEPS)
C:/Program Files/XMOS/XTC/15.3.1/build/xcommon_cmake/xcommon.cmake:767 (configure_lib)
C:/Workspace/XMOS/XTC_15.3.1/AN02014_-Integrating-DSP-into-the-XMOS-USB-reference-design-_sw_2_0_0/lib_mic_array/lib_mic_array/lib_build_info.cmake:16 (XMOS_REGISTER_MODULE)
C:/Program Files/XMOS/XTC/15.3.1/build/xcommon_cmake/xcommon.cmake:830 (include)
C:/Program Files/XMOS/XTC/15.3.1/build/xcommon_cmake/xcommon.cmake:726 (XMOS_REGISTER_DEPS)
C:/Program Files/XMOS/XTC/15.3.1/build/xcommon_cmake/xcommon.cmake:767 (configure_lib)
C:/Workspace/XMOS/XTC_15.3.1/AN02014_-Integrating-DSP-into-the-XMOS-USB-reference-design-_sw_2_0_0/lib_xua/lib_xua/lib_build_info.cmake:53 (XMOS_REGISTER_MODULE)
C:/Program Files/XMOS/XTC/15.3.1/build/xcommon_cmake/xcommon.cmake:830 (include)
C:/Program Files/XMOS/XTC/15.3.1/build/xcommon_cmake/xcommon.cmake:625 (XMOS_REGISTER_DEPS)
app_an02014/CMakeLists.txt:29 (XMOS_REGISTER_APP)
-- Generating done (0.1s)
CMake Generate step failed. Build files cannot be regenerated correctly.
You do not have the required permissions to view the files attached to this post.
-
- Experienced Member
- Posts: 96
- Joined: Sun Apr 08, 2018 11:19 pm
So looking at the issue with fresh eyes, the application note is built in:
C:\Workspace\XMOS\XTC_15.3.1\AN02014_-Integrating-DSP-into-the-XMOS-USB-reference-design-_sw_2_0_0\an2014\app_2014\build\
The error appears to occur because the script is looking for the location for the build file in the wrong place:
CMake Error at C:/Program Files/XMOS/XTC/15.3.1/build/xcommon_cmake/xcommon.cmake:758 (target_sources):
Cannot find source file:
How can this be fixed please?
Kind regards,
Al
C:\Workspace\XMOS\XTC_15.3.1\AN02014_-Integrating-DSP-into-the-XMOS-USB-reference-design-_sw_2_0_0\an2014\app_2014\build\
The error appears to occur because the script is looking for the location for the build file in the wrong place:
CMake Error at C:/Program Files/XMOS/XTC/15.3.1/build/xcommon_cmake/xcommon.cmake:758 (target_sources):
Cannot find source file:
How can this be fixed please?
Kind regards,
Al
-
Verified
- Active Member
- Posts: 54
- Joined: Wed May 22, 2024 2:36 pm
I understand that you have done the following:
1. downloaded sandbox
2. unzipped it
3. copied the unzipped directory to C:/Workspace/XMOS/XTC_15.3.1/AN02014_-Integrating-DSP-into-the-XMOS-USB-reference-design-_sw_2_0_0/
The error you have pasted shows that it cant find this file:
C:/Workspace/XMOS/XTC_15.3.1/AN02014_-Integrating-DSP-into-the-XMOS-USB-reference-design-_sw_2_0_0/lib_xcore_math/lib_xcore_math/src/etc/xmath_fft_lut/xmath_fft_lut.c
My guess is that there were some errors when you unzipped the sandbox. This can happen if the resultant path of the file that is being unzipped is longer than the windows max path length (260 chars). You could try unzipping the sandbox again and keep an eye out for warnings or errors.
Alternatively, if you delete the "lib_xcore_math" directory from the sandbox then xcommon_cmake will attempt to clone it from github when it realises that the required dependency is missing
1. downloaded sandbox
2. unzipped it
3. copied the unzipped directory to C:/Workspace/XMOS/XTC_15.3.1/AN02014_-Integrating-DSP-into-the-XMOS-USB-reference-design-_sw_2_0_0/
The error you have pasted shows that it cant find this file:
C:/Workspace/XMOS/XTC_15.3.1/AN02014_-Integrating-DSP-into-the-XMOS-USB-reference-design-_sw_2_0_0/lib_xcore_math/lib_xcore_math/src/etc/xmath_fft_lut/xmath_fft_lut.c
My guess is that there were some errors when you unzipped the sandbox. This can happen if the resultant path of the file that is being unzipped is longer than the windows max path length (260 chars). You could try unzipping the sandbox again and keep an eye out for warnings or errors.
Alternatively, if you delete the "lib_xcore_math" directory from the sandbox then xcommon_cmake will attempt to clone it from github when it realises that the required dependency is missing
XMOS Software Engineer

