What's the best way to share components between projects. Working with PSoC Creator 4.2 using PSoC 4 and 5

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
DaGr_294516
Level 3
Level 3
10 sign-ins 10 questions asked First solution authored

What is the correct way to have multiple projects using the same component, while maintaining the ability to edit the source component easily.

The only way have having one custom component in many projects I've found so far is to import one from one project into another. If I make modifications to the component, I have to re-import it to the other projects.

This seems rather clunky so I'm sure there is a better method. What is the best way to achieve this effect and how is updating the component managed?

Thanks in advance

Dan

0 Likes
1 Solution
Rakshith
Moderator
Moderator
Moderator
250 likes received 1000 replies posted 750 replies posted

Hi DaGr_294516​,

Please try the following method and let me know if it works for you -

1. Create a project (say <Depend_Project>) and create all your custom components in this project.

2. In all the other projects add <Depend_Project> as a dependency.

3. To add dependency right click on the project and click on Dependencies as shown.

pastedImage_1.png

4. In the Dependencies window under User Dependencies browse and add <Depend_Project>.

5. All your custom components will be available in the project.

6. If the components need to be modified, modify the components in the <Depend_Project> and it will be reflected in other projects.

Thanks and Regards,

Rakshith M B

Thanks and Regards,
Rakshith M B

View solution in original post

2 Replies
Rakshith
Moderator
Moderator
Moderator
250 likes received 1000 replies posted 750 replies posted

Hi DaGr_294516​,

Please try the following method and let me know if it works for you -

1. Create a project (say <Depend_Project>) and create all your custom components in this project.

2. In all the other projects add <Depend_Project> as a dependency.

3. To add dependency right click on the project and click on Dependencies as shown.

pastedImage_1.png

4. In the Dependencies window under User Dependencies browse and add <Depend_Project>.

5. All your custom components will be available in the project.

6. If the components need to be modified, modify the components in the <Depend_Project> and it will be reflected in other projects.

Thanks and Regards,

Rakshith M B

Thanks and Regards,
Rakshith M B