System target files determine the structure of code generation. this tutorial gives you an idea on how to get started on this. you can modify existing TLCs and there by change the format of code generated or even generate code in some other language. i tried to wrap C code generated into a cpp class. I succeeded little bit. in this tutorial i am describing the path that i went through. This tutorial is not of much use now as Mathworks no longer allow users to modify system target files :-). But for those who want to go a bit far can understand about inherent working of autocode generator through this .
Gives basics of RTW...
Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.