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

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

cross mob
Anonymous
Not applicable

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)"
    http://www.cypress.com/?app=forum&id=2492&rID=54106

   

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
www.moxon.com

   

www.westmarkco.com

0 Likes
2 Replies
Anonymous
Not applicable

Tom,

   

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?

   

Robert

   
0 Likes
Anonymous
Not applicable

Robert,

   

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.

   

 

   

regards,

   

Tom Moxon

   

www.moxon.com

   

www.westmarkco.com

0 Likes