- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This question has been asked a few times, but never given a satisfactory answer.
What steps are required to use the CMSIS DSP library with the CY8CPROTO-062-4343W board, using Eclipse/ModusToolbox v2.x on Windows?
This discussion assumes ModusToolbox 1.x and depends on facilities not available in MT 2.x.
This discussion follows much of the same path as I did, but ends without a resolution.
This discussion never got an answer.
I've discovered that MT 2.x includes the CMSIS header files as part of the PDL. If I modify the project Makefile by adding "ARM_MATH_CM4" to the DEFINES variable, and changing the VFP_SELECT variable from "softfp" to "hardfp," my code will compile. But apparently the PDL includes only the header files - the build fails with "unresolved reference" linker errors (e.g. undefined reference to `arm_fir_decimate_init_f32').
I've downloaded the CMSIS project from the ARM GItHub repository, but that's just a huge box of parts - including it in my project has proven to be, um, non-trivial. Running gen_pack.bat fails with hundreds of errors. Instructions on downloading the pre-built binaries are basically non-existent.
I'm surprised there isn't an application note on this subject, or indeed even an answer to the many similar questions.
Has anyone done this? Does anyone know how to do this?
Thanks,
-Nick
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello Nick,
Did you try the steps mentioned in this thread: Re: Can't install CMSIS on ModusToolbox 2.0.0.1703-windows ?
Did you see any errors when you followed the steps mentioned in the above thread? Let me know your observations.
Regarding documentation, yes, we will be providing collateral on this soon. Thank you for the feedback, we definitely appreciate it
Regards,
Dheeraj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Dheeraj .
Yes, that's the second of the links I provided as examples of incomplete
answers. That thread ends with the user reporting "#error "No
appropriate startup file found!" but never following up with you to
resolve it. I got that far, too, and experienced the same error. And
yes, I have selected the appropriate BSP, CY8CPROTO-062-4343W.
By the way - the link provided in that article is to the CMSIS "develop"
branch. Most users will likely prefer the "master" branch.
The modifications you suggested are actually unnecessary, as the
auto-discovery process will find the files without them. But the CMSIS
code still won't build.
I tried adding terms to the Makefile's DEFINES variable as seemed
appropriate to avoid the reported errors, but every time that resolved
one error, it just led to another.
None of the procedures I've tried from the CMSIS GitHub page work, even
after fixing the obvious errors like misnamed directories.
The CMSIS README.md on their GitHub page says that pre-built binaries
are available, but gives no guidance beyond "install git lfs" as to how
to go about downloading them.
Any help you can provide will be appreciated.
Thanks,
-Nick
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello Nick,
Please download the latest CMSIS-5 release from here: Release CMSIS 5.7.0 · ARM-software/CMSIS_5 · GitHub
Extract it and place it one level below the application directory as we do not want the auto-discovery to detect all the files. There are a lot of unnecessary files, libraries, example codes that we don't want to be compiled as part of the application, and plus it won't build if you include them.
Open the Makefile and add the following:
(1) Create a new variable pointing to the DSP Directory:
DSP_DIR=../CMSIS_5/CMSIS/DSP/
(2) Add the header files of the DSP using the INCLUDES variable:
INCLUDES=$(DSP_DIR)/Include
(3) If you want to use a DSP library of hardfp variant then add the appropriate VFP as shown:
VFP_SELECT=hardfp
(4) Include the library:
LDLIBS=$(wildcard -l$(DSP_DIR)/Lib/GCC/libarm_cortexM4lf_math.a)
(5) Add the header file to main.c to make use of the DSP functions:
#include "arm_math.h"
You can now click build and it should build and link successfully.
Regards,
Dheeraj