diff options
author | Damien George <damien@micropython.org> | 2020-09-23 22:47:25 +1000 |
---|---|---|
committer | Damien George <damien@micropython.org> | 2020-09-25 12:25:29 +1000 |
commit | c8ade2bd7f5d0e089098bcc07eb77a770f3da726 (patch) | |
tree | 2d658aea5100ecd3a673fb20bcb0985ee65bd260 /docs/develop | |
parent | 81f2162ca0e926c9a4a1787a3863d94d86be0b36 (diff) |
docs/develop: Add notes on prerequisite tools for building native .mpy.
Signed-off-by: Damien George <damien@micropython.org>
Diffstat (limited to 'docs/develop')
-rw-r--r-- | docs/develop/natmod.rst | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/docs/develop/natmod.rst b/docs/develop/natmod.rst index dc9f82e77..a4c188719 100644 --- a/docs/develop/natmod.rst +++ b/docs/develop/natmod.rst @@ -21,7 +21,8 @@ language which can be compiled to stand-alone machine code can be put into a A native .mpy module is built using the ``mpy_ld.py`` tool, which is found in the ``tools/`` directory of the project. This tool takes a set of object files -(.o files) and links them together to create a native .mpy files. +(.o files) and links them together to create a native .mpy files. It requires +CPython 3 and the library pyelftools v0.25 or greater. Supported features and limitations ---------------------------------- @@ -179,6 +180,14 @@ The file ``Makefile`` contains: Compiling the module -------------------- +The prerequisite tools needed to build a native .mpy file are: + +* The MicroPython repository (at least the ``py/`` and ``tools/`` directories). +* CPython 3, and the library pyelftools (eg ``pip install 'pyelftools>=0.25'``). +* GNU make. +* A C compiler for the target architecture (if C source is used). +* Optionally ``mpy-cross``, built from the MicroPython repository (if .py source is used). + Be sure to select the correct ``ARCH`` for the target you are going to run on. Then build with:: |