0

Code generation MATLAB

Has anyone been working with code generation in MATLAB, where .tlc file is generated from S-Function builder block, and edited that .tlc file afterwards?

7th May 2024, 12:53 AM
Dejan Francuz🥇
Dejan Francuz🥇 - avatar
3 odpowiedzi
+ 2
When you use MATLAB Coder to generate code from Simulink models, the .tlc file is generated along with other generated files in a folder structure within your MATLAB working directory. The exact location of the .tlc file depends on several factors, including the settings you specify during code generation and the structure of your Simulink model. By default, MATLAB Coder creates a folder named codegen in the MATLAB working directory to store all generated files. Within the codegen folder, there will be subfolders corresponding to each generated target (e.g., lib, exe, mex, etc.). Inside these target-specific folders, you'll find the .tlc file along with other generated files and folders necessary for building or using the generated code.
7th May 2024, 1:10 AM
`ᴴᵗᵗየ
`ᴴᵗᵗየ - avatar
+ 1
Dejan Francuz🥇 To do so look for settings or parameters in the .tlc file related to CAN communication. This might include configurations for the CAN peripheral, initialization code, and interrupt handling. You can visit their STMicroelectronics Community forum and asking for help. Many developers share their STM32 projects, examples, and tutorials on GitHub. You can search for repositories related to STM32CubeIDE, CAN communication, or STM32 development in general to find code examples and tutorials. Make sure to review the repository's README and documentation for usage instructions. 🖇️https://www.esacademy.com/
7th May 2024, 7:01 PM
`ᴴᵗᵗየ
`ᴴᵗᵗየ - avatar
0
Hi, thanks for answer, I know that. I was wondering how can I edit that wrapper .tlc file so I can accomodate my needs inside STM project (the point is just to call that file inside my code and it should work without writing any additional code in STM32CubeIDE), for example I want to establich CAN communication between some parts. Is there anywhere an example of how it should be done. I was trying to search but couldn't find anything
7th May 2024, 6:40 PM
Dejan Francuz🥇
Dejan Francuz🥇 - avatar