I’m using micropython on an XBee3 Cellular LTE-M/NB-IoT, and would like to be able to cross-compile to generate .mpy files. Following the docs I got mpy-cross working and I tried:
mpy-cross -mno-unicode -msmall-int-bits=31 program.py
It generates program.mpy, which I then upload with the file manager in XCTU, but the Xbee doesn’t seem to like it, giving me:
Traceback (most recent call last):
File “”, line 1, in
ValueError: incompatible .mpy file
I also tried a few settings for the mpy-cross arch flag without success:
-march= : set architecture for native emitter; x86, x64, armv6, armv7m, xtensa
FYI, I could however compile the same code by uploading the .py and using os.compile(). But has anyone had success cross compiling? Thanks.