Hello Norhafifah Nordin,
thank you for your question, I did not do that before but I heard from my another colleague that it is possible for matlab to generate code for Freescale device, and this generated code can be pasted into CW.
but unfortunately I don't have tutorial material to forward you. I would advice you submit a question to Matlab support, for which you might need a valid Matlab license.