QUERY · ISSUE
Build embed with C modules isn't working
enhancementport-embed
Port, board and/or hardware
embed
MicroPython version
MicroPython v1.22.2 on 2024-08-13; linux [GCC 4.2.1] version
Reproduction
- Modify
examples/embedding/main.cby addingimport cexampleinto second example - From
examples/embeddingrun
make -f micropython_embed.mk USER_C_MODULES=<micropython_path>/examples/usercmodule
make
- Run embed binary
Expected behaviour
Expected to start without errors
Observed behaviour
Traceback (most recent call last):
File "<stdin>", in <module>
ImportError: module not found
Additional Information
No, I've provided everything above.
Code of Conduct
Yes, I agree
CANDIDATE · ISSUE
Can't build with USER_C_MODULES on mimxrt
bug
Port, board and/or hardware
mimxrt port
MicroPython version
Latest (9999553)
Reproduction
cd micropython/ports/mimxrt
make USER_C_MODULES=../../examples/usercmodule
Expected behaviour
Should compile the example user C modules without errors.
Observed behaviour
Build error:
In file included from ../../examples/usercmodule/cppexample/example.cpp:2:
../../examples/usercmodule/cppexample/examplemodule.h:2:10: fatal error: py/runtime.h: No such file or directory
2 | #include "py/runtime.h"
| ^~~~~~~~~~~~~~
Additional Information
Both ports rp2 and unix work just fine, but not mimxrt. Tested with a fresh clone of MicroPython on 2 different machines.
Code of Conduct
Yes, I agree