Looking at the error, it looks like you are missing install support for ARM Cortex-R Processors. You can use: Add-Ons > Get Hardware Support Packages.This documentation will help you install it: Install Support for ARM Cortex-R Processors - MATLAB & Simulink (mathworks.com)
To get started with the ARM Cortex-R Support Package in MATLAB for generating binary code for the TI Hercules RM57Lx board, it is recommended to follow the instructions provided in the following link: Getting Started with ARM Cortex-R Support Package.
It also has an example: Parameter Tuning with External Mode Simulation - MATLAB & Simulink Example (mathworks.com)