How to build MicroPython with multiple external user C modules #11660
-
Hello, I want to build MicroPython with 2 external user C modules namely: st7789 and ulab. make BOARD=GENERIC_S3_SPIRAM_OCT USER_C_MODULES="$REPO_ROOT/ulab/code/micropython.cmake" Thanks, |
Beta Was this translation helpful? Give feedback.
Replies: 6 comments 1 reply
-
I care about this too. |
Beta Was this translation helpful? Give feedback.
-
This seems well documented at https://docs.micropython.org/en/latest/develop/cmodules.html#compiling-the-cmodule-into-micropython, is there anything wrong with it? I haven’t done this myself on CMake-based ports so I cannot comment. |
Beta Was this translation helpful? Give feedback.
-
I am doing this currently. I have a common In
and the cmake file is:
I can then build with
|
Beta Was this translation helpful? Give feedback.
-
Could |
Beta Was this translation helpful? Give feedback.
-
The standard usage is to have The example in https://docs.micropython.org/en/latest/develop/cmodules.html#compiling-the-cmodule-into-micropython is set to https://github.com/micropython/micropython/tree/master/examples/usercmodule which contains three separate extensions. On It's only for the more annoying |
Beta Was this translation helpful? Give feedback.
-
It seems like most external modules have their code nested some level under the root. For example,
To put them all a single directory would require another directory of relative symlinks. If USER_C_MODULES was a list, then it would be possible to inject multiple external modules with only a change to build parameters and it would work if the modules can't all be in a single directory because the upstream projects that provide them are not organized this way. |
Beta Was this translation helpful? Give feedback.
I am doing this currently. I have a common
.cmake
file that invokes thecmake
files for the modules I wish to build ... for example:In
mymods
directory I have the command cmake file and the (git cloned) st7789 and ulab source:and the cmake file is:
I can then build with