ARM-software / CMSIS-DSP

CMSIS-DSP embedded compute library for Cortex-M and Cortex-A
https://arm-software.github.io/CMSIS-DSP
Apache License 2.0
518 stars 133 forks source link

how to re-build the cmsisdsp source code to reflect changes in python wrapper as well #137

Closed mehreenjabeen closed 9 months ago

mehreenjabeen commented 9 months ago

Hi,

If I want to add some print statements in transform functions . What steps do I have to follow to reflect the changes? Which folder do I exactly need to re-build. I am trying to see the output of the print statement that I added via the python wrapper.

Inside the pythpn wrapper folder, i ran make and then once i run python setup.py install, I get the following error:

$ python setup.py install
running install
running bdist_egg
running egg_info
writing cmsisdsp.egg-info/PKG-INFO
writing dependency_links to cmsisdsp.egg-info/dependency_links.txt
writing requirements to cmsisdsp.egg-info/requires.txt
writing top-level names to cmsisdsp.egg-info/top_level.txt
package init file 'cmsisdsp/cg/__init__.py' not found (or not a regular file)
error: package directory 'cmsisdsp/cg/nodes' does not exist

Thanks

christophe0606 commented 9 months ago

@mehreenjabeen I have not rebuilt the Python wrapper since the CMSIS Compute graph has moved to a new repository : CMSIS-Stream and a new python package cmsis-stream.

But it looks like I'll need some work to remove the remaining dependencies in the Python wrapper.

You can try to remove all references to cg (for compute graph); In the MANIFEST.in, in setup.py.

I think it should solve your problem.

mehreenjabeen commented 9 months ago

Thanks @christophe0606 . I tried running pip install -e . but got ERROR: Failed building editable for cmsisdsp Failed to build cmsisdsp ERROR: Could not build wheels for cmsisdsp, which is required to install pyproject.toml-based projects. python setup.py build is also rresulting in error x86_64-linux-gnu-gcc` -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions -Wl,-z,relro -g -fwrapv -O2 -Wl,-Bsymbolic-functions -Wl,-z,relro -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 build/temp.linux-x86_64-3.8/PythonWrapper/cmsisdsp_pkg/src/cmsisdsp_filtering.o PythonWrapper/build_linux/bin_dsp/libCMSISDSP.a -o build/lib.linux-x86_64-3.8/cmsisdsp_filtering.cpython-38-x86_64-linux-gnu.so x86_64-linux-gnu-gcc: error: PythonWrapper/build_linux/bin_dsp/libCMSISDSP.a: No such file or directory error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

christophe0606 commented 9 months ago

In your error message I see this:

error: PythonWrapper/build_linux/bin_dsp/libCMSISDSP.a: No such file or directory

You need to first build the CMSIS-DSP library. The Python wrapper will then link this library libCMSISDSP.a

To build, you must customize the paths in the create.sh script in your build_linux folder. Once you have succeeded in running this create.sh, then you can just type make

mehreenjabeen commented 9 months ago

Thanks @christophe0606 , it worked.