micropython/ports/embed
Damien George e2ff00e811 py/emitglue: Introduce mp_proto_fun_t as a more general mp_raw_code_t.
Allows bytecode itself to be used instead of an mp_raw_code_t in the simple
and common cases of a bytecode function without any children.

This can be used to further reduce frozen code size, and has the potential
to optimise other areas like importing.

Signed-off-by: Damien George <damien@micropython.org>
2024-02-16 14:17:01 +11:00
..
port py/emitglue: Introduce mp_proto_fun_t as a more general mp_raw_code_t. 2024-02-16 14:17:01 +11:00
README.md embed: Add new "embed" port which builds a simple C package. 2023-01-20 22:28:50 +11:00
embed.mk all: Rename *umodule*.c to remove the "u" prefix. 2023-06-08 17:54:17 +10:00

README.md

MicroPython embed port

This is a port of MicroPython that outputs a set of .c and .h files for embedding into a wider project. This port essentially targets the C language, instead of a particular hardware architecture or platform.

To use this port in a project there are three main steps:

  1. Provide configuration for the project via an mpconfigport.h file.

  2. Build this embed port against that configuration, using the provided embed.mk. The output is a set of self-contained source files for building MicroPython. These files can be placed outside this repository.

  3. Build the project. This requires compiling all .c files from the above step.

See examples/embedding for an example.