summaryrefslogtreecommitdiffstatshomepage
path: root/py
diff options
context:
space:
mode:
authorAlessandro Gatti <a.gatti@frob.it>2024-06-16 20:40:28 +0200
committerDamien George <damien@micropython.org>2024-06-21 15:06:29 +1000
commit99f5659cf5fa84d3b9dc8bbd286315fcf56ad899 (patch)
treefc55cd22a9d5c266d20879f189c87119a0040bf2 /py
parent8338f663523d675847b8c0b9b92977b76995de8f (diff)
downloadmicropython-99f5659cf5fa84d3b9dc8bbd286315fcf56ad899.tar.gz
micropython-99f5659cf5fa84d3b9dc8bbd286315fcf56ad899.zip
mpy-cross: Add RISC-V RV32IMC support in MPY files.
MPY files can now hold generated RV32IMC native code. This can be accomplished by passing the `-march=rv32imc` flag to mpy-cross. Signed-off-by: Alessandro Gatti <a.gatti@frob.it>
Diffstat (limited to 'py')
-rw-r--r--py/persistentcode.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/py/persistentcode.h b/py/persistentcode.h
index d2b310f241..3f3c67764d 100644
--- a/py/persistentcode.h
+++ b/py/persistentcode.h
@@ -71,6 +71,8 @@
#define MPY_FEATURE_ARCH (MP_NATIVE_ARCH_XTENSA)
#elif MICROPY_EMIT_XTENSAWIN
#define MPY_FEATURE_ARCH (MP_NATIVE_ARCH_XTENSAWIN)
+#elif MICROPY_EMIT_RV32
+ #define MPY_FEATURE_ARCH (MP_NATIVE_ARCH_RV32IMC)
#else
#define MPY_FEATURE_ARCH (MP_NATIVE_ARCH_NONE)
#endif
@@ -95,6 +97,7 @@ enum {
MP_NATIVE_ARCH_ARMV7EMDP,
MP_NATIVE_ARCH_XTENSA,
MP_NATIVE_ARCH_XTENSAWIN,
+ MP_NATIVE_ARCH_RV32IMC,
};
enum {