Using Shared Libraries of Code with Multiple PSoC3/5 Creator Projects | Cypress Semiconductor
Using Shared Libraries of Code with Multiple PSoC3/5 Creator Projects
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.