Cannot select ARM Cortex-A code replacement library

I have a project that is using MATLAB Coder to convert to C++. In the configuration settings for MATLAB Coder, I can select a Code Replacement Library to replace certain functions calls with better library calls.
However, when I configure my project to build for an ARM Cortex-A system (Whether that be a NVIDIA Jetson, a Raspberry Pi, or a generic ARM Cortex A), I do not have the option to select the ARM Cortex-A Code replacement library. I know this is an options as it is mentioned in the MATLAB Embedded Coder release notes for R2021a.
The only options that I see are
  • GNU C99 Extensions
  • AUTOSAR 4.0
How do I use the ARM Cortex-A Code replacement library?

7 Comments

Hi Gabriel. In the configuration settings of the MATLAB Coder app, if you select "Raspberry Pi" for the Hardware Board setting (or any other hardware board that shows "ARM Compatible" as the Device Vendor and "ARM Cortex" as the Device Type) and then either "C99 (ISO)" or "C89/C90 (ANSI)" for the Standard Math Library setting, do you see "GCC Arm Cortex-A" listed as a Code Replacement Library ?
@Mukund Sankaran AHA. That did it. Why do I need to select the older math library?.
Also, for some reason Cortex-M shows up as well, even though the Raspberry Pi is a Cortex-A chip. I will file a bug report on that.
@Mukund Sankaran: Hi together; I have the same issue. My models are typically configured ert.tlc with C++11 and C++ class interface. With this setup, the GCC ARM Cortex-A CRL is not listed. Is this desired behavior? If yes, why?
The original question was about using Embedded Coder with MATLAB code, but it seems that you are using Embedded Coder with Simulink, so the details for how to configure this will be different.
Please ensure that you have the relevant support package installed: https://www.mathworks.com/hardware-support/arm-cortex-a.html. This support package should provide the code replacement library.
Best,
Matthew
thank you for your quick reply and yes, I was aware that the original question was about EC w/ Matlab Code and I also installed the ARM support package prior to my question.
Anyway, the problem remains: The GCC ARM Cortex-A CRL is only available if the "Language" option in the "Code Generation" pane is set to "C". If set to "C++", the ARM CRL option disappears.
Any more ideas?
Again, thanks for your support,
Marc
The code replacement library "GCC ARM Cortex-A" can only be used when for C code generation ("C99 (ISO)" or "C89/C90 (ANSI)").
I apologize for any inconvenience caused by this limitation. For more information about this CRL, please see this documentation page: https://www.mathworks.com/help/releases/R2020a/supportpkg/armcortexa/supported-matlab-functions-for-arm-cortexa.html
Best,
Matthew
ok thank you for the support.
Best, Marc

Sign in to comment.

Answers (0)

Products

Release

R2021a

Asked:

on 12 Apr 2021

Commented:

on 19 May 2022

Community Treasure Hunt

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

Start Hunting!