1.36 -mcmse

Enables the generation of code for the Secure state of the ARMv8-M Security Extensions. This option is required when creating a Secure image.


Specifying -mcmse targets the Secure state of the ARMv8-M Security Extensions. The following are available:
  • The Test Target, TT, instruction.
  • TT instruction intrinsics.
  • Non-secure function pointer intrinsics.
  • __attribute__((cmse_nonsecure_call)) and __attribute__((cmse_nonsecure_entry)) function attributes.


The value of the __ARM_FEATURE_CMSE predefined macro indicates what ARMv8-M Security Extension features are supported.


This example shows how to create a Secure image using an input import library, oldimportlib.o, and a scatter file, secure.scf:
armclang -mfloat-abi=soft --target=arm-arm-none-eabi -march=armv8m.main -mcmse secure.c -o secure.o
armlink secure.o -o secure.axf --import-cmse-lib-out importlib.o --import-cmse-lib-in oldimportlib.o --scatter secure.scf
armlink also generates the Secure code import library, importlib.o that is required for a Non-secure image to call the Secure image.


ARM® Compiler 6 does not support hardware floating-point linkage when using the -mcmse option. Hence there is no support for the armclang option -mfloat-abi=hard when using the -mcmse option.
Related reference
1.33 -march
1.40 -mfpu
1.48 --target
3.3 __attribute__((cmse_nonsecure_call)) function attribute
3.4 __attribute__((cmse_nonsecure_entry)) function attribute
5.1 Predefined macros
5.4 TT instruction intrinsics
5.5 Non-secure function pointer intrinsics
Related information
Building Secure and Non-secure Images Using ARMv8-M Security Extensions
TT, TTT, TTA, TTAT instruction
--fpu linker option
--import_cmse_lib_in linker option
--import_cmse_lib_out linker option
--scatter linker option
Non-ConfidentialPDF file icon PDF versionARM DUI0774E
Copyright © 2014-2016 ARM. All rights reserved.