Filter löschen
Filter löschen

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

8 Ansichten (letzte 30 Tage)
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!

Antworten (1)

Shanmukha Voggu
Shanmukha Voggu am 1 Okt. 2021
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 Kommentare
Konstantinos
Konstantinos am 31 Aug. 2023
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

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Simulink Coder finden Sie in Help Center und File Exchange

Produkte


Version

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by