CmOStart.c -- No return exception handler -- callback?

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable

In our production code we'd like to have have the exception handler cause a reset.

   

Is the correct way to do this define this callback?  Where should this define and the callback function be handled?

   

 

   

 

   

#ifdef CY_BOOT_INT_DEFAULT_HANDLER_EXCEPTION_ENTRY_CALLBACK
        CyBoot_IntDefaultHandler_Exception_EntryCallback();
    #endif /* CY_BOOT_INT_DEFAULT_HANDLER_EXCEPTION_ENTRY_CALLBACK */

0 Likes
1 Solution
Anonymous
Not applicable

For others facing this problem:

   

cyapicallbacks.h must be in your .cydsn directory

   

Our project supports multiple processors, so our source is in a separate directory.  If cyapicallbacks.h is in any other directory, even adding it to the build settings compiler "additional include directories" won't work.  The generated source will not have "#include cyapicallbacks.h".  Moving this header file to the .cydsn and updating in the "header files" list in the source/workspace explorer view, worked.

   

Note that this worked even with an older (5.2) version of the cy_boot component.  

View solution in original post

4 Replies
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

#define CY_BOOT_INT_DEFAULT_HANDLER_EXCEPTION_ENTRY_CALLBACK in cyapicallbacks.h and provide a function named CyBoot_IntDefaultHandler_Exception_EntryCallback();

   

Look at Creator help under "callback macros"

   

 

   

Bob

0 Likes
Anonymous
Not applicable

Bob,

   

Thanks for the info.  One question that isn't covered in the Creator help.  CmOStart.c doesn't include cyapicallbacks.h, and CY_BOOT_INT_DEFAULT_HANDLER_EXCEPTION_ENTRY_CALLBACK shows up as not defined.  Am I missing a step?

   

 

   

-Keith

0 Likes
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

Make sure you have got boot component 5.40, which is the actual version, else update components and/or Creator to latest version.

   

Look into "System Reference Guide" (Creator Help) boot component. Search for "macro callbacks"

   

CY_BOOT_INT_DEFAULT_HANDLER_EXCEPTION_ENTRY_CALLBACK shows up as not defined   You have to #define that.

   

 

   

Bob

0 Likes
Anonymous
Not applicable

For others facing this problem:

   

cyapicallbacks.h must be in your .cydsn directory

   

Our project supports multiple processors, so our source is in a separate directory.  If cyapicallbacks.h is in any other directory, even adding it to the build settings compiler "additional include directories" won't work.  The generated source will not have "#include cyapicallbacks.h".  Moving this header file to the .cydsn and updating in the "header files" list in the source/workspace explorer view, worked.

   

Note that this worked even with an older (5.2) version of the cy_boot component.