summaryrefslogtreecommitdiff
path: root/examples/embedding/hello-embed.c
AgeCommit message (Collapse)Author
2023-01-20examples/embedding: Rework example to use ports/embed.Damien George
Signed-off-by: Damien George <damien@micropython.org>
2022-05-25py/builtin: Clean up and simplify import_stat and builtin_open config.Damien George
The following changes are made: - If MICROPY_VFS is enabled then mp_vfs_import_stat and mp_vfs_open are automatically used for mp_import_stat and mp_builtin_open respectively. - If MICROPY_PY_IO is enabled then "open" is automatically included in the set of builtins, and points to mp_builtin_open_obj. This helps to clean up and simplify the most common port configuration. Signed-off-by: Damien George <damien@micropython.org>
2021-02-04all: Rename BYTES_PER_WORD to MP_BYTES_PER_OBJ_WORD.Damien George
The "word" referred to by BYTES_PER_WORD is actually the size of mp_obj_t which is not always the same as the size of a pointer on the target architecture. So rename this config value to better reflect what it measures, and also prefix it with MP_. For uses of BYTES_PER_WORD in setting the stack limit this has been changed to sizeof(void *), because the stack usually grows with machine-word sized values (eg an nlr_buf_t has many machine words in it). Signed-off-by: Damien George <damien@micropython.org>
2019-08-28py: Add global default_emit_opt variable to make emit kind persistent.Damien George
mp_compile no longer takes an emit_opt argument, rather this setting is now provided by the global default_emit_opt variable. Now, when -X emit=native is passed as a command-line option, the emitter will be set for all compiled modules (included imports), not just the top-level script. In the future there could be a way to also set this variable from a script. Fixes issue #4267.
2018-09-14examples/embedding: Fix hard-coded MP_QSTR_ value.Damien George
2018-09-14examples/embedding: Fix reference to freed memory, lexer src name.Dave Hylands
This issue was brought up by BramPeters in the forum: https://forum.micropython.org/viewtopic.php?p=30066
2017-07-31all: Use the name MicroPython consistently in commentsAlexander Steffen
There were several different spellings of MicroPython present in comments, when there should be only one.
2017-03-14examples/embedding: Place lexer constructor within NLR handler block.Damien George
The lexer constructor may now raise an exception and it needs to be caught.
2016-07-22examples/embedding: Example for embedding MicroPython in an app.Paul Sokolovsky