Using own custom "rt_main.c" with system target file grt.tlc in Simulink Coder

조회 수: 11 (최근 30일)
Konstantinos
Konstantinos 2021년 9월 28일
댓글: Konstantinos 2023년 8월 31일
Hi,
I would like to know whether it is possible to make grt.tlc target to point to my own custom "rt_main.c" in my own project path instead of the predefined "rt_main.c" in Matlab's installation path. Basically the line 181 in the generated makefile should ultimately be:
MAIN_SRC = <my own paht>/rt_main.c
Thanks!

답변 (1개)

Shanmukha Voggu
Shanmukha Voggu 2021년 10월 1일
Hi Konstantinos,
I Understood that you want to have custom rt_main.c file in your project. This option is available in the Embedded Coder but not in the Simulink Coder.
Refer this for more information.
Hope this helps!
  댓글 수: 3
Konstantinos
Konstantinos 2023년 8월 31일
Hi Shanmukha,
I've managed to find a solution by including makecfg.m in my custom simulink library and utilizing the functions
  1. setTargetProvidesMain() and
  2. addSourceFiles() for including my rt_main.cpp implementation.
Best,
Konstantinos

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Simulink Coder에 대해 자세히 알아보기

제품


릴리스

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by