External User-Defined Subroutines
You can have an external user subroutine in your MicroC model. To define a subroutine to be external, set the Selected Implementation to External Code/None. In this case, MicroC generates only the call to the subroutine—not the prototype or body.
When a user-defined function is not defined in the model (that is, unresolved text) the code generator does not generate a prototype for that function. To generate an external user defined function prototype in the model, complete the following steps:
2. Define a dummy implementation for that function. The implementation cannot empty; otherwise, MicroC aborts code generation.
3. Set the design attribute for the user-defined function “External Function” to “yes.” The OSI'smainloop_sc
andmainloop_sc_ext
has that attribute for functions.