Getting "error: 'cmse_nonsecure_entry' attribute not available to functions with arguments passed on the stack" during compilation when custom secure service API has more than 4 arguments defined

Hello,

We are developing a library which is intended to use the trustzone feature available with nrf5340 DK. We followed the instructions available in  Using a custom Secure Partition Manager with your application and succeeded in adding custom secure services. However, we are getting the error "error: 'cmse_nonsecure_entry' attribute not available to functions with arguments passed on the stack" during compilation when the number of arguments of a custom secure service is more than 4.

Is it a bug or a limitation imposed? Could you please help clarify and also any solution to fix this problem other than trying to keep the number of arguments <=4?

Code with error:

__TZ_NONSECURE_ENTRY_FUNC
int testErrorNonSecureEntryFunc6Args_nse(int arg1,
                                                    int arg2,
                                                    int arg3,
                                                    int arg4,
                                                    int arg5,
                                                    int arg6)
{
  return 0;
}

Code without error:

__TZ_NONSECURE_ENTRY_FUNC
int testErrorNonSecureEntryFunc6Args_nse(int arg1,
                                                    int arg2,
                                                    int arg3,
                                                    int arg4
)
{
  return 0;
}

Parents Reply Children
No Data
Related