Generating C Code from a Simulink Model

The legacy real-time code was essentially structured as while forever loop that polled a flag to see if new data was available or not. If new data is ready, grab it and process it. If it’s not ready, just sit and wait for it to become ready. In other words, it’s a very simple single-tasking polling architecture. while(1) ................
................