You copied the Doc URL to your clipboard.

__attribute__((cmse_nonsecure_entry)) function attribute [BETA]

Declares an entry function that can be called from Non-secure state or Secure state.


This topic describes a [BETA] feature.


#include <arm_cmse.h>
void __attribute__((cmse_nonsecure_entry)) entry_func(int val) {
  int state = cmse_nonsecure_caller();

  if (state)
  { // called from non-secure
    // do non-secure work
  } else
  { // called from within secure
    // do secure work