FORUM TOPIC · READ ONLY

Configuring in a sub-system

Configuring in a sub-system

Forum : bug reports

2 message(s) · archive en lecture seule

Bernard Leak
I want to use a fixed configuration hidden from ordinary users,

so hiding it inside a masked sub-system makes sense. However,

the resulting <model>_main.c tries to include the generated

headers from the sub-system, as

<model>/<subsystem name>.h and <model>/<subsystem name>_private.h

instead of

<model>.h and <model>_private.h

as expected (and as actually generated).



At present only the Compiler Configuration and Master blocks

are hidden in this way: I think it is the Master block which is

causing trouble. The other generated files do not have the problem.



RTWGenSettings.MyModelName

for my model is "ALT_WINDOW_SIM/Target Board Setup"

and presumably gives the same result everywhere in the model.

The string _private.h is only present in the *.tlc files as a suffix to

%<MyModelName>, which in turn is always defined as

CAST("String",RTWGenSettings.MyModelName)

It seems to me that the definition of MyModelName is an attempt

to second-guess just what RTW actually generates, and in this

case gets it wrong, unless the Master block is in the root of the

model.



There is an obvious work-around - just keep the Master block

in the root of the model - but is there any chance of changing

this behaviour? The comments associate with the definition of

MyModelName suggests that this is really a rather hard problem!



Bernard Leak.
LubinKerhuel

Re: Configuring in a sub-system

Hi Bernard,



Thanks for the bug report. It is corrected.



The correction will be available in the next release (current release is 0.98fc)



Lubin