mpy-cross: Add RISC-V RV64IMC support in MPY files.

MPY files can now hold data to be run on RV64IMC.  This can be
accomplished by passing the `-march=rv64imc` flag to mpy-cross.

Signed-off-by: Alessandro Gatti <a.gatti@frob.it>
This commit is contained in:
Alessandro Gatti
2024-09-29 17:40:17 +02:00
committed by Damien George
parent ec1bfcfbb7
commit 1b92bda5b8
6 changed files with 16 additions and 4 deletions

View File

@@ -58,7 +58,7 @@ If importing an .mpy file fails then try the following:
sys_mpy = sys.implementation._mpy
arch = [None, 'x86', 'x64',
'armv6', 'armv6m', 'armv7m', 'armv7em', 'armv7emsp', 'armv7emdp',
'xtensa', 'xtensawin', 'rv32imc'][sys_mpy >> 10]
'xtensa', 'xtensawin', 'rv32imc', 'rv64imc'][sys_mpy >> 10]
print('mpy version:', sys_mpy & 0xff)
print('mpy sub-version:', sys_mpy >> 8 & 3)
print('mpy flags:', end='')