Skip to content

Add CMSIS DSP support as built-in library #685

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Oct 15, 2019
Merged

Conversation

fpistm
Copy link
Member

@fpistm fpistm commented Oct 7, 2019

To use it, add:
#include <CMSIS_DSP.h>

arm_math.h is then automatically include.

Fixes #682

Wiki:
https://github.com/stm32duino/wiki/wiki/API#cmsis-dsp

@fpistm fpistm self-assigned this Oct 7, 2019
@fpistm fpistm added enhancement New feature or request fix 🩹 Bug fix New feature labels Oct 7, 2019
@fpistm fpistm added this to the 1.8.0 milestone Oct 7, 2019
@fpistm fpistm mentioned this pull request Oct 7, 2019
@superpanza
Copy link

Hi @fpistm,
i've just tested your fix but something does not work. CMSIS_DSP.h is not found.
Tell me if i can help you some way

@fpistm
Copy link
Member Author

fpistm commented Oct 8, 2019

How did you test this PR?
With the git repository and fetch the PR?

@superpanza
Copy link

How did you test this PR?
With the git repository and fetch the PR?

yes i'm testing this PR. Download it and put in place

@fpistm
Copy link
Member Author

fpistm commented Oct 8, 2019

On top of the repo or of the 1.7.0?
Could you describe exactly how you setup with this PR?

@superpanza
Copy link

On top of the repo or of the 1.7.0?
Could you describe exactly how you setup with this PR?

I had installed stm32duino via arduino IDE.
The board manager url used is: https://github.com/stm32duino/BoardManagerFiles/raw/master/STM32/package_stm_index.json
Then from board manager interface i had installed the stm32 cores v.1.7.0.
Now i've downloaded the PR, deleted all the contents of packages/STM32/hardware/stm32/1.7.0/ and paste the new version.
Screenshot 2019-10-08 14 11 59

@fpistm
Copy link
Member Author

fpistm commented Oct 8, 2019

Well in that case I don't know why it does not work.
Could you provide the full log with all verbose and warnings, please.

@superpanza
Copy link

Well in that case I don't know why it does not work.
Could you provide the full log with all verbose and warnings, please.

Ouch my bad!! :-( wrong board selected. Code compiled succesfully! i'm gonna test the FFT in minutes

@fpistm
Copy link
Member Author

fpistm commented Oct 11, 2019

Ouch my bad!! :-( wrong board selected. Code compiled succesfully! i'm gonna test the FFT in minutes

So is it ok now?
I wonder if I should add the math_helper provided by arm in the DSP library examples.
I think no as it has to be included manually if needed like in the example.

To use it, add:
#include <CMSIS_DSP.h>

Fixes stm32duino#682

Signed-off-by: Frederic Pillon <[email protected]>
Update one with floating point unit (FPU) enabled

Note: for cortex-M7, single precision (sp) is used.

Signed-off-by: Frederic Pillon <[email protected]>
@fpistm fpistm merged commit dc51f12 into stm32duino:master Oct 15, 2019
@fpistm fpistm deleted the CMSIS_DSP branch October 15, 2019 05:19
@yglim
Copy link

yglim commented Dec 12, 2019

Hi. all

Check compiler.arm.cmsis.c.flags into the platform.txt
the origin is below.
compiler.arm.cmsis.c.flags="-I{runtime.tools.CMSIS-5.5.1.path}/CMSIS/Core/Include/" "-I{build.system.path}/Drivers/CMSIS/Device/ST/{build.series}/Include/" "-I{build.system.path}/Drivers/CMSIS/Device/ST/{build.series}/Source/Templates/gcc/" "

so I add DSP related location.

compiler.arm.cmsis.c.flags="-I{runtime.tools.CMSIS-5.5.1.path}/CMSIS/Core/Include/" "-I{build.system.path}/Drivers/CMSIS/Device/ST/{build.series}/Include/" "-I{build.system.path}/Drivers/CMSIS/Device/ST/{build.series}/Source/Templates/gcc/"
"-I{runtime.tools.CMSIS-5.5.1.path}/CMSIS/DSP/Include"

stm32duino 1.7.0 noew I'm using.

Happy coding

@fpistm
Copy link
Member Author

fpistm commented Dec 12, 2019

@yglim
This will be released with the 1.8.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request fix 🩹 Bug fix
Projects
None yet
Development

Successfully merging this pull request may close these issues.

DSP functions
3 participants