필터 지우기
필터 지우기

Simulink Coder-Customizing grt.tlc generated source code.

조회 수: 3 (최근 30일)
Joseph Stalin
Joseph Stalin 2013년 2월 25일
Dear Techies, I am working in Code generation using Simulink Coder.(dont have Embedded Coder license).I am using grt.tlc.
The generated code is messy.It is having my algorithm and some other RTW codes.I want to customize to remove RTW code dependencies.Currently the generated code contains the following in model.h file.I want to generate code without these interfaces.
Anybody can help me in this regard?
Ex: /* Macros for accessing real-time model data structure */ #ifndef rtmGetBlkStateChangeFlag # define rtmGetBlkStateChangeFlag(rtm) ((rtm)->ModelData.blkStateChange) #endif
#ifndef rtmSetBlkStateChangeFlag # define rtmSetBlkStateChangeFlag(rtm, val) ((rtm)->ModelData.blkStateChange = (val)) #endif
regards, Joseph

채택된 답변

TAB
TAB 2013년 2월 25일
There are very few code customization options are available with GRT target. AFAIK, there is no option in grt to remove the part of code you have mentioned.
There are 2 alternatives:- You can write a matlab script to post process the generated code OR use ERT target.
  댓글 수: 6
Joseph Stalin
Joseph Stalin 2013년 2월 27일
Thanks a lot for your answers.I will look into this documentation.
Joseph Stalin
Joseph Stalin 2013년 3월 12일
Hi Tab,
Is it possible to pass buildinfo structure (To access the generated source codes for edition) as parameter to mycustomization ? like below function GenerateMyCode(mdlName) rtwbuild(mdlName); % Generated the code MyCustomization(buildinfo ); % Call your script to edit generated code end

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

추가 답변 (0개)

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by