__ARM_PROFILE_M__
In this section:
Description
An integer that is set based on the compiler option ‑‑cpu. The symbol is set to 1 if the selected processor architecture is a profile M core. The symbol is undefined for other cores.
This preprocessor symbol is related to the ACLE (Arm C Language Extensions) macro __ARM_ARCH_PROFILE.