How to specify TargetType in System Target File?

4 views (last 30 days)
Sven
Sven on 9 May 2014
Commented: Ejaz H on 24 May 2018
I tried to write my own System Target File. I followed the instructions on the Helpsite "Customize System Target Files" to make sure not to forget anything. I also tried to use the customized STF with a simple model (SineWave and Scope), but I got the following warning:
Warning: The following error was caught while executing 'coder.internal.ModelBuilder' class destructor:
TargetType not specified in H:\TLC-Proto\proto\proto\proto.tlc
My Question is: What does this warning mean resp. How do i specify the TargetType? My System Target File looks like this:
%%SYSTLC: Control Block TMF: proto.tmf MAKE: make_rtw EXTMODE: ext_comm
%selectfile NULL_FILE
%assign CodeFormat = "Embedded-C"
%assign TargetType = "RT"
%assign Language = "C"
%if !EXISTS("AutoBuildProcedure")
%assign AutoBuildProcedure = !GenerateSampleERTMain
%endif
%if TargetHW == "STM32F2"
%selectfile STDOUT
*** STM32F2 was chosen as target
%include "controlblockstm32f2.tlc
%else
%selectfile STDOUT
*** No target was chosen
%include "codegenentry.tlc" %%Durch eigenes .tlc-file ersetzen
%endif
%%The contents between 'BEGIN_RTW_OPTIONS' and 'END_RTW_OPTIONS' in this file
%%are used to maintain backward compatibility to R13 and preR13 custom target
%%file only.
/%
BEGIN_RTW_OPTIONS
rtwoptions(1).prompt = 'Target Settings';
rtwoptions(1).type = 'Category';
rtwoptions(1).enable = 'on';
rtwoptions(1).default = 1;
rtwoptions(2).prompt = 'Choose Target';
rtwoptions(2).type = 'Popup';
rtwoptions(2).popupstrings = 'STM32F2|Alternative noch in Arbeit'
rtwoptions(2).default = 'STM32F2';
rtwoptions(2).enable = 'on';
rtwoptions(2).tlcvariable = 'TargetHW';
rtwoptions(2).makevariable = 'TARGETHW';
rtwoptions(2).tooltip = ['Choose Target Hardware'];
END_RTW_OPTIONS
%/
  2 Comments
EddieM
EddieM on 11 Nov 2017
Hi Sven, did you find a solution to this? I'm having the same problem
Ejaz H
Ejaz H on 24 May 2018
Did someone got the answer for the above question

Sign in to comment.

Answers (0)

Categories

Find more on Code Generation for ARM Cortex-M and ARM Cortex-A Processors in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!