sophie,
The KBA listed earlier, has you place the library code in a Library project (.cylib). Once you are happy with the code (it performs to your expectations) you compile the code under all the CPUs you wish to use the code. For example the CortexM4, CortexM0+, etc.
To do so, select the library project and then the Build Settings...
Select the Processors: then "Apply". Remember, different PSoC might be using different CPUs.
If you have any special Build options that need to be used, set them for each Processor and Build configuration (Debug or Release).
Then "Apply" when you are all finished.
You can now generate your library code for all Processors you selected.
Change the Build configuration from "Debug" to "Release" (or visa versa) and rebuild.
If no errors occur during the build, you will have directories with your object code (.o) files for each Processor selected:
and each Build configuration selected
Here is the output for each Processor/Build configuration. The files with the .o are the ones desired for the library to be shared.
Next you can create an archive of the Library to share with others.
Select "Complete" before selecting "Archive". Minimal will not include the directories where the .o files are compiled.
It will create the library archive. Note: This archive will include the source code (.c) files.
Lastly you want to remove the source code files from the archive. To do so, go into the archive and delete all the files with .c extension.
NOTE: You must leave the .h files. These files are needed by the user of the library to access the library functions, global variables and any #defines needed.
I hope this helps.
Len
"Engineering is an Art. The Art of Compromise."
Sophie,
Creating a Library Project as an Object Code – KBA90606
Len
"Engineering is an Art. The Art of Compromise."
Hi Len,
If I need to use generated source code, what should I do ?
Thanks
sophie
sophie,
The KBA listed earlier, has you place the library code in a Library project (.cylib). Once you are happy with the code (it performs to your expectations) you compile the code under all the CPUs you wish to use the code. For example the CortexM4, CortexM0+, etc.
To do so, select the library project and then the Build Settings...
Select the Processors: then "Apply". Remember, different PSoC might be using different CPUs.
If you have any special Build options that need to be used, set them for each Processor and Build configuration (Debug or Release).
Then "Apply" when you are all finished.
You can now generate your library code for all Processors you selected.
Change the Build configuration from "Debug" to "Release" (or visa versa) and rebuild.
If no errors occur during the build, you will have directories with your object code (.o) files for each Processor selected:
and each Build configuration selected
Here is the output for each Processor/Build configuration. The files with the .o are the ones desired for the library to be shared.
Next you can create an archive of the Library to share with others.
Select "Complete" before selecting "Archive". Minimal will not include the directories where the .o files are compiled.
It will create the library archive. Note: This archive will include the source code (.c) files.
Lastly you want to remove the source code files from the archive. To do so, go into the archive and delete all the files with .c extension.
NOTE: You must leave the .h files. These files are needed by the user of the library to access the library functions, global variables and any #defines needed.
I hope this helps.
Len
"Engineering is an Art. The Art of Compromise."