3.4 __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
Related reference
3.3 __attribute__((cmse_nonsecure_call)) function attribute
5.5 Non-secure function pointer intrinsics
Related information
Building Secure and Non-secure Images Using ARMv8-M Security Extensions
Non-ConfidentialPDF file icon PDF versionARM DUI0774E
Copyright © 2014-2016 ARM. All rights reserved.