aboutsummaryrefslogtreecommitdiff
path: root/py
diff options
context:
space:
mode:
authorDamien George <damien@micropython.org>2022-05-23 17:58:30 +1000
committerDamien George <damien@micropython.org>2022-05-23 23:01:25 +1000
commit17ac68770caa4f60141fa89e233829744a24cba8 (patch)
treecadb7e994c3f29effeb222e8477c2a6633607ca1 /py
parenta5324a10747dfba921bb363ed904f05ebb6de010 (diff)
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>
Diffstat (limited to 'py')
-rw-r--r--py/persistentcode.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/py/persistentcode.h b/py/persistentcode.h
index 55428e73a..29ccce4a3 100644
--- a/py/persistentcode.h
+++ b/py/persistentcode.h
@@ -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