Simulink Embedded Coder Generation & FreeRTOS

metinturgut35 wrote on Friday, November 15, 2019:

Hello everyone. I am a novice embedded system developer who is self taught about FreeRTOS and embedded systems. We use FreeRTOS to develop our real time applications on our controllers. We are considering a switch to Simulink Embedded Coder to develop our applications. My question is this; is FreeRTOS meant to be used with hard coding ? As i have seen, there are methods integrating our rtos environment to our code generation models but is this frowned upon ? What is the advantage of using FreeRTOS with hard coding and what is the disadvantages using it with code generation tools in terms of debugging, scalability, portability ? Thank you all in advance for your answers…

rtel wrote on Friday, November 15, 2019:

Gosh that is a very broad question, and I think very subjective too. It has been a very long time since I used code generated by Matlab but at that time we were auto generating some control algorithms that needed to be called periodically with high temporal accuracy, and we used an RTOS (not FreeRTOS, I’m going back to a time before FreeRTOS existed!) to execute the auto generated code in a task. Back then there was no execution framework (equalivalent to an RTOS) generated by the tool, at least not the way we were using it, so running it in a task was a natural thing to do. Also, as I recall (?), the autogenerated tool was not very ‘human’ friendly so I dont’ think it would have been something we could have confidently picked apart, so it was either execute the whole thing periodically or don’t execute it at all.

…I’m afraid I’m probable quite behind what the state of the art is today though.