- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
is it possible to detect if a given component is present and to retrieve it's informations?
For example, the Bootloadable and Bootloader components seem to be able to detect if their counterpart is already present in a design. But I don't know if they check the project type or if it's possible to check if a component of a given type is present.
Regards,
Ralf
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi abnoname,
okay, simple solution, but in this case you've to know the name of the component.
Regards,
Ralf
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.