Simulink with Pixhawk 2.4.8

I want to build a control model through Simulink, generate c code, and deploy it to Pixhawk 2.4.8. And I want to realize a live flight with simulink modeling. But I don’t know how to do it, and I don’t know how feasible it is. I searched the Internet for a long time, but I couldn’t find any tutorials or examples to use. I hope someone could give me some advice. I would really appreciate it!

Thanks!