Generate c-code from Simulink models and compile in QNX

Hi, I am new to QNX. I have read the previous topics about how to generate c-code from Simulink models and compile in QNX. But i am still not quite clear how to do it. Could any one give me some step-by-step detailed information about how to generate c-code from Simulink models and compile in QNX? This is very important for me. I really appreciate your help.