Simulink Coder RTEMS code generation
5 views (last 30 days)
I have been tasked with figuring out how to auto-generate code that can be executed in an RTEMS operating system after compilation using Simulink Coder. I have no experience with S functions or .tlc files but I am to figure out what needs to be done before I get into learning those.
I have checked the guide on RTEMS' page but I feel that it doesn't explain it very well for someone who isn't experienced with Simulink Coder and TLC files. After that I checked Create a Customized Asynchronous Library which tells me that in order to adapt the available template (which is built for VxWorks OS) I need to customize two blocks in particular: Task Sync and Async Interruption. I have managed to create another set of custom blocks that do exactly the same as these but are linked to a set of .tlc and .c files that I can edit freely. Anyway, upon experimenting some and looking at the files I have the following questions:
- Is the customized library guide right to assume that I only need to change these two blocks in particular? Shouldn't I need to create more blocks to encompass all of RTEMS' functions and features?
- The VxWorks example that is provided has "tornado.tlc" as the system target file in the code generation settings. Do I need to create another .tlc specifically for RTEMS? Or does "generic real time" option work, provided the blocks' .tlc files are correctly implemented? If I do need to do create another .tlc file, what would need to be set there?
- Do the S-functions simply assign parameters defined in the block's mask? That are later used by the .tlc of the block?
- Where does the .tlc file of each block tell Simulink Coder what to write? I am not familiar with VxWorks but those files didn't seem to contain the information I expected. I assumed that in some part of the file the code notation/formatting for the target OS is defined but I couldn't find where.
- I've read in two places that this is a somewhat straightforward process but it doesn't seem that way to me at all. Am I missing something?
- Any tips are welcome
Thanks in advance!