Depends on what language you are going to write the S-Function in.
To use an m-code S-Function with Simulink Coder you will need to write a tlc file.
TO use a c-mex S-Function with Simulink Coder you do not need to write a tlc file unless you want to in-line the code.