1 Reply Latest reply on Mar 7, 2019 8:26 PM by LinglingG_46

    How can I change the CmoplusStart.c  ?

    LODA_2997366

      Hi:

         I used the Psoc4 to BLDC motor Driver,have to add some custom code to close the motor in the CY_ISR(IntDefaultHandler).However once  rebuild the project ,the code will be removed.What can I do to prevent the code is deleted by the building operation.

        • 1. Re: How can I change the CmoplusStart.c  ?
          LinglingG_46

          找到cyapicallbacks.h, 申明一下callback函数。

           

          #ifndef CYAPICALLBACKS_H
          #define CYAPICALLBACKS_H
             

              /*Define your macro callbacks here */
              /*For more information, refer to the Writing Code topic in the PSoC Creator Help.*/
          #ifndef CY_BOOT_INT_DEFAULT_HANDLER_ENOMEM_EXCEPTION_CALLBACK
              #define CY_BOOT_INT_DEFAULT_HANDLER_ENOMEM_EXCEPTION_CALLBACK
              void  CyBoot_IntDefaultHandler_Enomem_Exception_Callback(void);
          #endif
             
             
          #endif /* CYAPICALLBACKS_H */  
          /* [] */

           

          然后在mian.c里面定义一下下面这个函数:

           

          void  CyBoot_IntDefaultHandler_Enomem_Exception_Callback()
          {

          }

           

          重点:: 也许你不是要把自己的函数写到这个中断回调函数里面,但是方法是一样的。