You copied the Doc URL to your clipboard.

ARM Compiler armclang Reference Guide : __attribute__((cmse_nonsecure_entry)) function attribute

__attribute__((cmse_nonsecure_entry)) function attribute

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


#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