cancel
Showing results for 
Search instead for 
Did you mean: 

Knowledge Base Articles

Including CMSIS5 Library in a PSoC Creator project – KBA232412

Chelladurai
Community Manager
Community Manager

Including CMSIS5 Library in a PSoC Creator project – KBA232412

Version: **

This article is for CMSIS5. For information about a previous CMSIS version, see KBA90457.

Do the following to include the CMSIS5 Library in a PSoC® Creator™ project:

  1. Download the latest Arm® CMSIS pack from here - ARM.CMSIS.5.7.0.pack.
  2. Change the extension of the downloaded file from .pack to .zip.
  3. Extract the archive file.
  4. Copy the Core and DSP folders in the extracted CMSIS folder and place them in your PSoC Creator project directory.
  5. Right-click on the project in PSoC Creator Workspace Explorer and open Build Settings.
  6. Add .\Core\Include and .\DSP\Include to Additional Include Directories under ARM GCC <version> > Compiler > General as shown.
    Chelladurai_2-1626092053073.png

     

     Note: For PSoC 6 MCU devices, Additional Include Directories will be under <ARM_CPU> ARM GCC <version> > Compiler > General, where <ARM_CPU> represents the Arm CPU that you want to use. It can be CM0+ or CM4. Add the configurations only to the CPU that needs to run the CMSIS-DSP code.
  7. Add the ARM_MATH_XX preprocessor definition where ‘XX’ stands for the corresponding Arm CPU of the device. Some of the preprocessor definitions for Arm CPUS are – ARM_MATH_CM0, ARM_MATH_CM0PLUS, ARM_MATH_CM3, ARM_MATH_CM4.
  8. Add m (math library) under Linker > General > Additional Libraries as follows:Chelladurai_1-1626091884763.png

     

  9. Add the link file in the DSP\Lib\GCC\ directory corresponding to the Arm CPU for the target device in the Additional Link Files field. For example, for an Arm Core M3 device, select DSP\Lib\GCC\libarm_cortexM3l_math.a.

    Note: For the CM4 CPU in PSoC 6 MCU devices, libarm_cortexM4lf_math.a cannot be used directly because it uses hardfp which cannot be enabled directly using PSoC Creator. See KBA222890 to learn how to enable hardfp for PSoC 6 MCU devices in PSoC Creator.

  10. Click Apply and then click OK.
  11. Right-click on Source Files in Workspace Explorer, select Add > Existing Item, and add all the necessary source files that you are using. You can also add folders to organize the files.
  12. Build the project.
0 Likes
Version history
Revision #:
1 of 1
Last update:
‎Jul 12, 2021 05:22 AM
Updated by:
 
Contributors