2 Replies Latest reply on Sep 9, 2014 4:59 AM by userc_41592

    Including CMSIS library to PSoC project

       1. How to include CMSIS library to the PSoC project?




      Here are the steps that needs to be followed to include the CMSIS library in your project:


      1. Please copy the CMSIS library into your project's directory.


      2. In workspace explorer(in creator), right click your project and select 'Build settings'->compiler->General. In the 'Additional include directories', add the path of the header files(include folder of CMSIS library).


      3. In the same window, change 'preprocessor definitions' to 'ARM_MATH_CM3'.


      4. In the same window, please go to linker->general and add 'additional libraries' as 'm'. Apply changes and close the window.


      5. In arm_math.h file, add this line "include <device.h>".


      6. Since PSoC 5 already contains part of the CMSIS library in "Generated_Source\cy_boot", we have to delete the following definitions.


      In core_cmInstr.h, remove the definition of following functions:




      In core_cmFunc.h, remove


      __get_PSP, __set_PSP, __get_MSP, __set_MSP, _get_PRIMASK, _set_PRIMASK, _enable_fault_irq, _disable_fault_irq, __get_BASEPRI, _set_BASEPRI, __get_FAULTMASK, __set_FAULTMASK, _enable_irq, _disable_irq, _get_CONTROL, _set_CONTROL.


      7. Right click source files (workspace explorer), select add->existing item->'and add all necessary source files that you are using'.


      Now, the project will build.


      Note: Step 6 is not needed in creator 3.0.