How to reference .tlc files

36 visualizaciones (últimos 30 días)
Valeriy
Valeriy el 23 de Dic. de 2025
Respondida: Raghavendra el 13 de En. de 2026 a las 10:31
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?

Respuesta aceptada

Raghavendra
Raghavendra el 13 de En. de 2026 a las 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

Más respuestas (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by