summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--docs/develop/porting.rst5
1 files changed, 4 insertions, 1 deletions
diff --git a/docs/develop/porting.rst b/docs/develop/porting.rst
index ae0cfd8b0..d08fd74e4 100644
--- a/docs/develop/porting.rst
+++ b/docs/develop/porting.rst
@@ -146,6 +146,9 @@ The following is an example of an ``mpconfigport.h`` file:
#define MICROPY_ERROR_REPORTING (MICROPY_ERROR_REPORTING_TERSE)
#define MICROPY_FLOAT_IMPL (MICROPY_FLOAT_IMPL_FLOAT)
+ // Enable u-modules to be imported with their standard name, like sys.
+ #define MICROPY_MODULE_WEAK_LINKS (1)
+
// Fine control over Python builtins, classes, modules, etc.
#define MICROPY_PY_ASYNC_AWAIT (0)
#define MICROPY_PY_BUILTINS_SET (0)
@@ -296,7 +299,7 @@ like this:
mphalport.c \
...
- SRC_QSTR += modport.c
+ SRC_QSTR += modmyport.c
If all went correctly then, after rebuilding, you should be able to import the new module: