cancel
Showing results for 
Search instead for 
Did you mean: 

PSoC Creator & Designer Software

Contributor II

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

0 Likes
Reply
5 Replies
Esteemed Contributor

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.

0 Likes
Reply
Contributor II

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

0 Likes
Reply
Anonymous
Not applicable

 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  

0 Likes
Reply
Contributor II

Hi abnoname,

   

 

   

okay, simple solution, but in this case you've to know the name of the component.

   

 

   

Regards,

   

 

   

Ralf

0 Likes
Reply
Esteemed Contributor

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.

0 Likes
Reply