Hello,
I installed the CMSIS DSP Library, and I am trying to select it in (code replacement library) pane in (configuration paramters) of simulink but I can not find it!!
Is it possible to know how can I solve this problem?
Many thanks in advance.
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Hello,
I installed the CMSIS DSP Library, and I am trying to select it in (code replacement library) pane in (configuration paramters) of simulink but I can not find it!!
Is it possible to know how can I solve this problem?
Many thanks in advance.
Hello Seely,
I am waiting for you to give me a recipe to do this optimization, actually I downloaded a "R4 CMSIS DSP Library" but don't know exactly how to use it with "crtool"
www.ti.com/.../hercules-dsplib
Best Regards,
Ah El
Hi,
I thought I should mention, you may not need to write your own code replacement library.
The Mathworks already has created a CMSIS DAP Code Replacement Library (CRL) for the ARM Cortex-M series of processors. Since, TI's CMSIS CRL is functionally the same as the ARM Cortex-M CMSIS DAP library, I believe you should be able to use this code replacement library with your Hercules processor. (I should mention that I haven't tested this out on a hercules processor yet)
Here is how you can get the CRL, and subsequently use this in your PIL Simulation:
1) Download and install the ARM Cortex-M CMSIS DSP Library Support Package. This particular support package requires both an Embedded Coder License, as well as a DSP Systems Toolbox License. If you do not have a DSP Systems Toolbox license, you we do ship a code replacement library for only Math and Fixed Point operations with the ARM Cortex-M Support Package.
2) Once you have installed the support package, in your Simulink model, you should see an entry that looks like this:
Now, if you generate code from your Simulink model, Math and DSP operations should be replaced with calls to the CMSIS's math and dsp functions.
3)I am assuming you want to run your model on your Hercules processor.
To do this you have two options:
Unfortunately, the official support package is only going to be available in the R2016b release which will be out on September 14th 2016. If you would like to evaluate this support package, I could give you an evaluation version of the support package that will work the R2016b Pre-release.
If you are using Anthony's PIL Target, after the math and DSP operations have been replaced, in order to make the generated executable link successfully, you will need to link in the relevant TI CMSIS Library.
Here's how you do it. Type:
>>edit TI_HERCULES_RM48Pil.TargetApplicationFramework
and in constructor, add these lines:
buildInfo = this.getBuildInfo;
buildInfo.addLinkObjects(‘ti_math_Cortex_R4_lspf.lib’, ‘C:\ti\Hercules\Cortex-R4 CMSIS DSP Library\1.0.0\Lib’, 1000, true, true);
%replace the path and library accordingly. LSPF should be for the RM48 but BSPF should be for the TMS570
Now, when you run a PIL Simulation, the TI CMSIS Libarary will get Linked into the generated executable.
I hope this helps.
In addition to adding the library to build, you need to add 1 include path as well as 1 define.
So in constructor, add these lines:
buildInfo = this.getBuildInfo;
lpath = 'C:\ti\Hercules\Cortex-R4 CMSIS DSP Library\1.0.0';
buildInfo.addLinkObjects(‘ti_math_Cortex_R4_lspf.lib’, fullfile(lpath, ‘Lib’), 1000, true, true);
%replace the path and library accordingly. LSPF should be for the RM48 but BSPF should be for the TMS570
buildInfo.addIncludePaths(fullfile(lpath, 'Include'));
buildInfo.addDefines({'CCS', 'UART_SUPPORT'});
I've verified that this makes the appropriate replacements.