Configuring in a sub-system

Bernard Leak
Posts: 18
Joined: Fri Aug 15, 2008 3:42 pm
Location: Armitage, Staffordshire, England

Configuring in a sub-system

Postby Bernard Leak » Wed Sep 03, 2008 6:50 pm

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.

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
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

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.

Site Admin - Expert
Posts: 616
Joined: Wed Mar 07, 2007 11:23 pm
Location: Marseille - France

Re: Configuring in a sub-system

Postby LubinKerhuel » Wed Sep 03, 2008 11:04 pm

Hi Bernard,

Thanks for the bug report. It is corrected.

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


Return to “bug reports”

Who is online

Users browsing this forum: No registered users and 1 guest