-
1. Re: Is it possible to detect if a given component is present?
user_14586677 Apr 9, 2014 6:36 AM (in response to user_246598725)One could imagine a version control system incorporated in the code at
an absolute address to accomplish this ? Then a script or other code could
read that area for version/config info.
Regards, Dana.
-
2. Re: Is it possible to detect if a given component is present?
user_246598725 Apr 10, 2014 2:41 AM (in response to user_246598725)Hi Dana,
I'm not sure if we are talking about the same. I want to know if a component can detect the presence of another component.
Regards,
Ralf
-
3. Re: Is it possible to detect if a given component is present?
user_95319268 Apr 10, 2014 2:46 AM (in response to user_246598725)Simple check for the presence of the components API #define (look into their api.h):
#if defined(CY_PRS_COMP_NAME_H)
COMP_NAME_Start(param);
#endif
-
4. Re: Is it possible to detect if a given component is present?
user_246598725 Apr 10, 2014 5:18 AM (in response to user_246598725)Hi abnoname,
okay, simple solution, but in this case you've to know the name of the component.
Regards,
Ralf
-
5. Re: Is it possible to detect if a given component is present?
user_14586677 Apr 10, 2014 7:58 AM (in response to user_246598725)I might be confused here but the #if defined is a Linker command so
the module start command gets incorporated into the code, started,
but no other module is "aware" of it other than its impact (having been
started, like a clock) HW wise on another module.
I still think that product to product variations have to be taken care of with
a descriptor table of some sort, known part to part, or an incredibly complex
binary code parser that pulls apart the code base seeking out module
"footprints" from a rule based on how they were created.
Regards, Dana.