You copied the Doc URL to your clipboard.

-mcmse [BETA]

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

Note

This topic describes a [BETA] feature.

Example

This example shows how to create a secure image using an input import library, oldimportlib.o, and a scatter file, secure.scf:

armclang -mfpu=none -target arm-arm-none-eabi -march=armv8m.main -mcmse secure.c -o secure.o
armlink secure.o -o secure.axf --fpu=softvfp --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 the non-secure image.

Note

The armclang option -mfpu=none and the armlink option --fpu=softvfp must be included to ensure that secure code does not link with any code that uses floating-point registers.

Related reference