You are here

Using Shared Libraries of Code with Multiple PSoC3/5 Creator Projects | Cypress Semiconductor

Using Shared Libraries of Code with Multiple PSoC3/5 Creator Projects

Summary: 2 Replies, Latest post by tommoxon on 16 Sep 2011 01:36 PM PDT
Verified Answers: 0
Last post
Log in to post new comments.
user_7880656's picture
49 posts

I've been working on a shared library of code for PSoC1/3/5 and needed to be able to reference
a shared respository of source code and include files that are located outside my project directory.

Solution description :

You have library of shared source code that you would like to re-use in several PSoC3/5 projects.
This library takes the form of :
C:/my_lib/include /* include (*.h) files */
C:/my_lib/src /* source (*.c) files

You would like these include file and source file to be part of several PSoC projects,
 and what you want is a "shared source code library".

For each of the projects that wants to use the "shared source code library",
do the following :

1) Add the Search path to the include directory as described in my previous post :
     "Adding additional include file search path (for include files outside your workspace)"

2)  From the "Workspace Explorer" pane, right click on "Source Files" catalog, and select the
     "Add -> New folder" drop down menu entry, and rename it as "my_lib_src".

3)  From the "Workspace Explorer" pane, select the "my_lib_src" folder that you just created.
     Then right click and select the "Add -> Existing Item" drop down menu entry.
      When the file selection dialog box open, navigate to your C:/my_lib/src  folder
and select all the .c source files that you would like to add, and finish by clicking "Open".
      The selected files will then be added to your project, but still reside in the source folder location.

You can then repeat that process in other projects that want to re-use those same source files.

best regards,

Tom Moxon


rtcy's picture
Cypress Employee
112 posts


we really appreciate experienced users like you to share their solutions. This forum is a great place to share and learn from each other.

Do you also create your own components?


user_7880656's picture
49 posts


I have not had the opportunity to create PSoC3/5 components yet. Although I do it all the time with FPGA's.

Acutally, Im more interested in developing custom code for the DFB, however no compiler tool has

been made available for that block yet.



Tom Moxon


Log in to post new comments.