Cypress Perform

Home > Design Support > Cypress Developer CommunityTM > Cypress Forums > PSoC® Software > Using Shared Libraries of Code with Multiple PSoC3/5 Creator Projects

Bookmark and Share
Cypress Developer CommunityTM
Forums | Videos | Blogs | Training | Rewards Program | Community Components



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

Post Reply
Follow this topic



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

tommoxon posted on 09 Sep 2011 4:26 PM PST
Top Contributor
45 Forum 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)"
    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

 




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

Robert-CY posted on 15 Sep 2011 01:22 PM PST
Cypress Employee
129 Forum Posts

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




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

tommoxon posted on 16 Sep 2011 11:36 AM PST
Top Contributor
45 Forum Posts

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

 






ALL CONTENT AND MATERIALS ON THIS SITE ARE PROVIDED "AS IS". CYPRESS SEMICONDUCTOR AND ITS RESPECTIVE SUPPLIERS MAKE NO REPRESENTATIONS ABOUT THE SUITABILITY OF THESE MATERIALS FOR ANY PURPOSE AND DISCLAIM ALL WARRANTIES AND CONDITIONS WITH REGARD TO THESE MATERIALS, INCLUDING BUT NOT LIMITED TO, ALL IMPLIED WARRANTIES AND CONDITIONS OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT OF ANY THIRD PARTY INTELLECTUAL PROPERTY RIGHT. NO LICENSE, EITHER EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE, IS GRANTED BY CYPRESS SEMICONDUCTOR. USE OF THE INFORMATION ON THIS SITE MAY REQUIRE A LICENSE FROM A THIRD PARTY, OR A LICENSE FROM CYPRESS SEMICONDUCTOR.

Content on this site may contain or be subject to specific guidelines or limitations on use. All postings and use of the content on this site are subject to the Terms and Conditions of the site; third parties using this content agree to abide by any limitations or guidelines and to comply with the Terms and Conditions of this site. Cypress Semiconductor and its suppliers reserve the right to make corrections, deletions, modifications, enhancements, improvements and other changes to the content and materials, its products, programs and services at any time or to move or discontinue any content, products, programs, or services without notice.

Spec No: None; Sunset Owner: KXP; Secondary Owner: VWA; Sunset Date: 01/01/20