docs/develop: Add documentation on how to build native .mpy modules.

This commit is contained in:
Damien George
2019-12-16 23:04:01 +11:00
parent e58c7ce3d6
commit 8449e41818
3 changed files with 209 additions and 0 deletions

View File

@@ -1,3 +1,5 @@
.. _cmodules:
MicroPython external C modules
==============================
@@ -17,6 +19,10 @@ more sense to keep this external to the main MicroPython repository.
This chapter describes how to compile such external modules into the
MicroPython executable or firmware image.
An alternative approach is to use :ref:`natmod` which allows writing custom C
code that is placed in a .mpy file, which can be imported dynamically in to
a running MicroPython system without the need to recompile the main firmware.
Structure of an external C module
---------------------------------