Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » DSDP - Real-Time Software Components (RTSC) » Using sibling modules
Using sibling modules [message #1521] Tue, 24 February 2009 18:32 Go to next message
Ramsey Harris is currently offline Ramsey HarrisFriend
Messages: 22
Registered: July 2009
Junior Member
Champs,

I have a package with two modules, ModA and ModB. In ModB.c I include ModA.h. In the application config script, only ModB is included with xdc.useModule(). Should ModB.xs:module$use() include ModA with xdc.useModule() to ensure that ModA's module$meta$init() and module$use() functions are called? Or does this happen automatically?

Thank you
~ Ramsey
Re: Using sibling modules [message #1535 is a reply to message #1521] Wed, 25 February 2009 17:26 Go to previous messageGo to next message
Bob Frankel is currently offline Bob FrankelFriend
Messages: 12
Registered: July 2009
Junior Member
Ramsey Harris wrote:
> Champs,
>
> I have a package with two modules, ModA and ModB. In ModB.c I include
> ModA.h. In the application config script, only ModB is included with
> xdc.useModule(). Should ModB.xs:module$use() include ModA with
> xdc.useModule() to ensure that ModA's module$meta$init() and
> module$use() functions are called? Or does this happen automatically?
>
> Thank you
> ~ Ramsey

as a rule, whenever ModB #include's ModA.h, there should be a
corresponding xdc.useModule for ModA in ModB.xs. without "using" ModB
in this manner, the module$use() function of ModB will *not* be called.
failure to "use" modules at config time that are "used" in your target
code can often result in linker errors.

as for module$meta$init(), this function is called when the package
containing the corresponding module is loaded -- independent of whether
the module is "used" or not.... the purpose of module$meta$init is to
essentially "finish" some initialization of config params that could not
be handled statically in the .xdc file. for example, the default value
of Task.stackSize might be a function of the current target/platform --
known only at config time.
Re: In AGR While Creating Datapool, "Link to Datapool" is not visible [message #1788227] Wed, 30 May 2018 16:21 Go to previous message
Eclipse UserFriend
1
Previous Topic:Using XDC with CCSv3.3
Next Topic:RTSC with Eclipse CDT
Goto Forum:
  


Current Time: Mon Oct 07 20:57:33 GMT 2024

Powered by FUDForum. Page generated in 0.03646 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top