Skip to content

Commit 5943a2e

Browse files
rimbidpgeorge
authored andcommitted
docs/develop/porting.rst: Fix build and import problems in the example.
1 parent 5679fe6 commit 5943a2e

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

docs/develop/porting.rst

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,9 @@ The following is an example of an ``mpconfigport.h`` file:
146146
#define MICROPY_ERROR_REPORTING (MICROPY_ERROR_REPORTING_TERSE)
147147
#define MICROPY_FLOAT_IMPL (MICROPY_FLOAT_IMPL_FLOAT)
148148
149+
// Enable u-modules to be imported with their standard name, like sys.
150+
#define MICROPY_MODULE_WEAK_LINKS (1)
151+
149152
// Fine control over Python builtins, classes, modules, etc.
150153
#define MICROPY_PY_ASYNC_AWAIT (0)
151154
#define MICROPY_PY_BUILTINS_SET (0)
@@ -296,7 +299,7 @@ like this:
296299
mphalport.c \
297300
...
298301
299-
SRC_QSTR += modport.c
302+
SRC_QSTR += modmyport.c
300303
301304
If all went correctly then, after rebuilding, you should be able to import the new module:
302305

0 commit comments

Comments
 (0)