You copied the Doc URL to your clipboard.

-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.

Usage

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.

Note

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

Example

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.

Note

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.
Was this page helpful? Yes No