Skip to content

Commit c8ade2b

Browse files
committed
docs/develop: Add notes on prerequisite tools for building native .mpy.
Signed-off-by: Damien George <[email protected]>
1 parent 81f2162 commit c8ade2b

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

docs/develop/natmod.rst

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@ language which can be compiled to stand-alone machine code can be put into a
2121

2222
A native .mpy module is built using the ``mpy_ld.py`` tool, which is found in the
2323
``tools/`` directory of the project. This tool takes a set of object files
24-
(.o files) and links them together to create a native .mpy files.
24+
(.o files) and links them together to create a native .mpy files. It requires
25+
CPython 3 and the library pyelftools v0.25 or greater.
2526

2627
Supported features and limitations
2728
----------------------------------
@@ -179,6 +180,14 @@ The file ``Makefile`` contains:
179180
Compiling the module
180181
--------------------
181182

183+
The prerequisite tools needed to build a native .mpy file are:
184+
185+
* The MicroPython repository (at least the ``py/`` and ``tools/`` directories).
186+
* CPython 3, and the library pyelftools (eg ``pip install 'pyelftools>=0.25'``).
187+
* GNU make.
188+
* A C compiler for the target architecture (if C source is used).
189+
* Optionally ``mpy-cross``, built from the MicroPython repository (if .py source is used).
190+
182191
Be sure to select the correct ``ARCH`` for the target you are going to run on.
183192
Then build with::
184193

0 commit comments

Comments
 (0)