How to reference .tlc files
조회 수: 34 (최근 30일)
이전 댓글 표시
In my C2000 Blockset project I want to add custom backgroundTask() function inside the while(1){} loop. Modifying just the codetarget_file_process.tlc file is not enough to do that as this file in turn calls codertarget_mainwithoutOS.tlc where the ert_main.c file contents are created. I modified the codertarget_mainwithoutOS.tlc file to do what I need, but if I move the file from the location where it was installed (C:\Program Files\MATLAB\R2024b\toolbox\target\codertarget\rtw\codertarget_mainwithoutOS.tlc) to the folder inside my project it is no longer being copied to the \codegen\<project>\tlc folder and it is not found during build process.
How should I make sure the modified codertarget_mainwithoutOS.tlc is part of my project and is used to generate the code?
댓글 수: 0
채택된 답변
Raghavendra
2026년 1월 13일 10:31
Hello Valeriy,
It is not recommended to modify the shipped TLC file to include a background task.
Instead, you can use the Idle Task block provided in Simulink to specify the functions that need to execute as background tasks.
Thanks,
Raghavendra Prasad
댓글 수: 0
추가 답변 (0개)
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!