STM32F4 Build Error "ARM CMSIS SIN COS"

12 views (last 30 days)
DKalale
DKalale on 24 Jul 2019
Answered: DKalale on 30 Jul 2019
Hi,
I am using Simulink Embedded coder with the STM32F4xx Series processor. I have MATLAB 2014a, STM32-MAT version 4.3.0, and STM32CubeMX v4.15.0 currently installed and working where it generates STM compatible C code that I can then compile and deploy via an IAR Workbench environment (v7.40.3.8938). This configuration all works fine.
I would like to update to the latest versions of tools (i.e. upgrade STM32-MAT, STM32CubeMX, and MATLAB 2019a). When I attempt to build (ctrl+b) the same simulink model in 2019a, I receive the following error:
CRL: "ARM CMSIS SIN COS" cannot be found in the registry.
In 2014a, under "Model Configuration Parameters >> Code Generation >> Interface >> Code replacement library", I have ARM CMSIS SIN COS selected. In 2019a, I believe this option is set the same, but when I select something else like "AUTOSAR 4.0", the "ARM CMSIS SIN COS" option disappears. This leads me to believe that I somehow don't have this option installed in MATLAB 2019a.
Is there some ARM hardware support package that I am not installing that will get rid of this error? Running the following code generates the output where I have the ARM Cortex-M processor support package, but that doesn't seem to be fixing the error.
matlab.addons.installedAddons
ans =
23×4 table
Name Version Enabled Identifier
_______________________________________________________________________ ________ _______ ______________________________________
"Embedded Coder Support Package for ARM Cortex-M Processors" "19.1.1" true "ECCORTEXM"
Thanks in advance for the help.

Accepted Answer

DKalale
DKalale on 30 Jul 2019
So with the help of Mathworks support, I was able to resolve the "ARM CMSIS SIN COS" error.
Running the following code from the command prompt fixed the issue:
RTW.TargetRegistry.getInstance('reset');
After this, for those that are interested, I had to do some interesting configuration edits on the STM side of things to have my 2014a setup working in 2019a matlab. First, I followed the instructions here and replaced the STM32/script/customRoutineProcess.tlc with the one in this forum post.
It also appears that in the change from 2018b to 2019a the "codeFormat" field is somehow not referenced correctly. This is referenced in the STM32/script/stm32_make_rtw_hook.m file. I figured this wasn't really a big deal, so I just commented line 202 out by adding a % sign. Essentially, it was this:
% Called after code generation is complete, and just prior to kicking
% off make process (assuming code generation only is not selected.) All
% arguments are valid at this stage.
fprintf('\n### Code Format : %s\n',buildOpts.codeFormat);
And I changed it to this:
% Called after code generation is complete, and just prior to kicking
% off make process (assuming code generation only is not selected.) All
% arguments are valid at this stage.
% fprintf('\n### Code Format : %s\n',buildOpts.codeFormat);

More Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!