This is a short step-by-step guide to create a project with the Hercules CMSIS DSP library. We'll use the arm_fft_bin_example that comes with the library download.
I'm expecting that you know how to work with HALCoGen and Code Composer Studio. If not, first try one of the Project0 examples for Hercules.
Download and Install the Library
HERCULES-DSPLIB Hercules™ Safety MCU Cortex™-R4 CMSIS DSP Library
Step 2Configure Your Project with HALCoGen
Open HalCoGen and create a new project with HALCogen. Select your correct device. Don't do any configuration. Just generate the code. We are not going to use any peripherals.
Step 3Create and Run Code Composer Studio Project
In CCS, select Project -> New CCS Project...
In the Properties dialog, set the following Path Variable in the Linked Resources tab:
CMSIS_DSP_HOME
C:\ti\Hercules\Cortex-R4 CMSIS DSP Library\1.0.0
Include the directory created by HALCoGen. Include the DSP library:
"${CMSIS_DSP_HOME}/include"
In the File Search Path include the DSP Lib (check the correct one based on the endian settings of your controller:
library:
ti_math_Cortex_R4_bspf.libsearch
path:
"${CMSIS_DSP_HOME}/Lib"
In Advanced Options -> Predefined symbols, add these two:
CCS
UART_SUPPORT
Copy these two source files from the DSP install dir (I kept the defaults, and the files are in C:\ti\Hercules\Cortex-R4 CMSIS DSP Library\1.0.0\Examples\arm_fft_bin_example) to your project:
arm_fft_bin_data.c
arm_fft_bin_example_f32.c
If necessary, do the other settings in CCS that are needed for your device - maybe you need to change debug flash settings?
Exclude (HL)_sys_main.c from build (right click on it and select 'Exclude from Build').
That should be it. Compile, debug and enjoy!
Comments
Please log in or sign up to comment.