Community
Participate
Working Groups
A module that does not inherit from an interface and has an 'instance' section, must also define Instance_State even if that structure does not have any members. Otherwise, an error saying that Instance_State is missing is displayed. But, for modules that inherit from an interface that has 'instance' section, we allow the structure 'Instance_State' to be omitted. For example, ti.sysbios.gates.GateHwi inherits from xdc.runtime.IGatesProvider, but Instance_State is not defined in GateHwi.xdc.
The error message comes from xdc.services.spec.Unit. Previously, the existence of Instance_State wasn't flagged by Unit.pass2check(). This is fixed in xdc-w19, and all modules inheriting from an interface that has an 'instance' section must declare Instance_State.
Why not make it possible for modules without instance state to not have to declare an empty Instace_State? The empty structure statements are not valid C and seem unnecessary for modules that don't need the state.
In, xdc-w22 I made further changes that allow leaving out empty Instance_State structures and Instance_init functions. This makes this bug invalid.
closing "ancient" resolved bugs