Skip to content

Commit 30741fa

Browse files
committed
docs: describe the foo.<arch>.mpy import order
1 parent 98b0a67 commit 30741fa

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

‎docs/troubleshooting.rst‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,3 +56,10 @@ all available in the
5656
`Adafruit bundle <https://github.com/adafruit/Adafruit_CircuitPython_Bundle/releases/latest>`_
5757
and the `Community bundle <https://github.com/adafruit/CircuitPython_Community_Bundle/releases/latest>`_.
5858
Make sure to download a version with 7.0.0 or higher in the filename.
59+
60+
The error can also come from a ``.mpy`` file that contains native code for a different
61+
kind of chip. On boards that can run native code, ``import foo`` looks for ``foo.py``,
62+
then ``foo.<arch>.mpy``, then ``foo.mpy``, where ``<arch>`` is
63+
``microcontroller.cpu.architecture``, for example ``foo.armv7emsp.mpy``. A
64+
``foo.<arch>.mpy`` built for another architecture or CircuitPython version raises this
65+
error instead of falling back to ``foo.mpy``.

0 commit comments

Comments
 (0)