You are here

CmOStart.c -- No return exception handler -- callback? | Cypress Semiconductor

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

Summary: 4 Replies, Latest post by pdxkmw on 30 Aug 2016 02:21 PM PDT
Verified Answers: 1
Last post
Log in to post new comments.
pdxkmw's picture
User
4 posts

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 */

user_1377889's picture
User
9839 posts

#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

pdxkmw's picture
User
4 posts

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

user_1377889's picture
User
9839 posts

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

pdxkmw's picture
User
4 posts

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.  

Log in to post new comments.