py/persistentcode: Select ARMV6M as maximum when __thumb2__ not defined.

If __thumb2__ is defined by the compiler then .mpy files marked as ARMV6M
and above (up to ARMV7EMDP) are supported.  If it's not defined then only
ARMV6M .mpy files are supported.  This makes sure that on CPUs like
Cortex-M0+ (where __thumb2__ is not defined) only .mpy files marked as
ARMV6M can be imported.

Signed-off-by: Damien George <damien@micropython.org>
pull/8694/head
Damien George 2022-05-23 17:58:30 +10:00
rodzic a5324a1074
commit 17ac68770c
1 zmienionych plików z 1 dodań i 1 usunięć

Wyświetl plik

@ -63,7 +63,7 @@
#define MPY_FEATURE_ARCH (MP_NATIVE_ARCH_ARMV7EM)
#endif
#else
#define MPY_FEATURE_ARCH (MP_NATIVE_ARCH_ARMV7M)
#define MPY_FEATURE_ARCH (MP_NATIVE_ARCH_ARMV6M)
#endif
#define MPY_FEATURE_ARCH_TEST(x) (MP_NATIVE_ARCH_ARMV6M <= (x) && (x) <= MPY_FEATURE_ARCH)
#elif MICROPY_EMIT_ARM