I get a build error when building a model in accelerator mode or rapid accelerator mode when the model contains Simulink Real-Time blocks (for example, model blocks that represent hardware).
Simulink Real-Time does not support accelerator mode or rapid accelerator mode
simulation of models with blocks that represent hardware. For example, if you open the
slrt_ex_serialasciitest model, change the Simulink mode to rapid
accelerator, and run the model, Simulink displays this error:
Unable to build a standalone executable to simulate the model 'slrt_ex_serialasciitest' in rapid accelerator mode.
This error occurs because accelerator mode and rapid accelerator mode produce compiled code that runs on the development computer, not on the Simulink Real-Time target computer. Any blocks that access hardware report a build error if you compile the model by using accelerator mode or rapid accelerator mode.
Change the simulation mode to normal mode or external mode.