Install CMSIS DSP for CY8CPROTO-062-4343W on ModusToolbox v2.1.0 on Windows

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
NiBu_4687336
Level 5
Level 5
5 solutions authored 50 replies posted 25 replies posted

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

0 Likes
3 Replies
DheerajK_81
Moderator
Moderator
Moderator
First comment on KBA First comment on blog 5 questions asked

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

0 Likes

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

0 Likes

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