diff options
Diffstat (limited to 'docs/reference')
| -rw-r--r-- | docs/reference/mpyfiles.rst | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/docs/reference/mpyfiles.rst b/docs/reference/mpyfiles.rst index 9687f5e46..58e45e158 100644 --- a/docs/reference/mpyfiles.rst +++ b/docs/reference/mpyfiles.rst @@ -58,12 +58,14 @@ 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', 'rv64imc'][sys_mpy >> 10] + 'xtensa', 'xtensawin', 'rv32imc', 'rv64imc'][(sys_mpy >> 10) & 0x0F] print('mpy version:', sys_mpy & 0xff) print('mpy sub-version:', sys_mpy >> 8 & 3) print('mpy flags:', end='') if arch: print(' -march=' + arch, end='') + if (sys_mpy >> 16) != 0: + print(' -march-flags=' + (sys_mpy >> 16), end='') print() * Check the validity of the .mpy file by inspecting the first two bytes of |
