diff options
author | Cem Eliguzel <cemeliguzel@gmail.com> | 2022-01-06 13:53:43 +0300 |
---|---|---|
committer | Damien George <damien@micropython.org> | 2022-02-04 11:15:46 +1100 |
commit | 5943a2ec79e51df91e0bb5d57ead68c57569f5cd (patch) | |
tree | 2e3f5490cddcfdf16ed81612adf21fcdd21195dc | |
parent | 5679fe6aee7811447ab9dfc9b4539526b23b1d84 (diff) |
docs/develop/porting.rst: Fix build and import problems in the example.
-rw-r--r-- | docs/develop/porting.rst | 5 |
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: |