zephyrproject-rtos / zephyr

Primary Git Repository for the Zephyr Project. Zephyr is a new generation, scalable, optimized, secure RTOS for multiple hardware architectures.
https://docs.zephyrproject.org
Apache License 2.0
10.73k stars 6.55k forks source link

How to use CMSIS DSP Library on nRF52832 running zephyr LTS Version(V1.14) ? #19791

Closed icephyr closed 5 years ago

icephyr commented 5 years ago

I met a question here. Hope anybody can help on it, thanks.

I'm evaluating whether it is feasible to run the FFT algorithm on zephyr LTS project, with the nRF52832 board. I saw some sayings that it can work with the CMSIS DSP library, but I only found the CMSIS-rtos-v1 and CMSIS-rtos-v2 in zephyr source code (LTS version 1.14), not DSP. So I wonder whether the DSP library is available in zephyr. Need I download the CMSIS DSP project manually and intergrate into the zephyr project by myself ? Or the library has been integrated into the SDK, just need to include the head files ? It seems not work when I just include the head files with zephyr_include_directories API. /opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/8.3.0/../../../../arm-zephyr-eabi/bin/ld: ../app/libapp.a(main.c.obj): in functionmain': /home/icephyr/projects/ams/zephyr-sensor/zephyr/samples/bluetooth/beacon/src/main.c:369: undefined reference to arm_cfft_f32' /opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/8.3.0/../../../../arm-zephyr-eabi/bin/ld: /home/icephyr/projects/ams/zephyr-sensor/zephyr/samples/bluetooth/beacon/src/main.c:373: undefined reference toarm_cmplx_mag_f32' /opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/8.3.0/../../../../arm-zephyr-eabi/bin/ld: /home/icephyr/projects/ams/zephyr-sensor/zephyr/samples/bluetooth/beacon/src/main.c:376: undefined reference to arm_max_f32' /opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/8.3.0/../../../../arm-zephyr-eabi/bin/ld: /home/icephyr/projects/ams/zephyr-sensor/zephyr/samples/bluetooth/beacon/src/main.c:393: undefined reference toarm_cfft_sR_f32_len1024' `

So I think the CMSIS souce code shall be downloaded and included manually, but I am not sure about this, hope anybody knows how to use FFT on zephyr. Some samples can be provided is better.

SebastianBoe commented 5 years ago

So I think the CMSIS souce code shall be downloaded and included manually

This is correct. I am not aware of anyone that has done this, but if the code is easy to build it shouldn't be too difficult.

SebastianBoe commented 5 years ago

hope anybody knows how to use FFT on zephyr

I am not aware of which FFT implementation other FFT users have used.

icephyr commented 5 years ago

So I think the CMSIS souce code shall be downloaded and included manually

This is correct. I am not aware of anyone that has done this, but if the code is easy to build it shouldn't be too difficult.

Well noted, I will have a try, thanks.