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
xpcEnetDemo1Rx model, change the Simulink mode to rapid
accelerator, and run the model, Simulink displays this error:
### Build procedure for model: 'xpcEnetDemo1Rx' aborted due to an error. Unable to build a standalone executable to simulate the model 'xpcEnetDemo1Rx' 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 them by using accelerator mode or rapid accelerator mode.
Change the simulation mode to normal mode or external mode.