← index #17878Issue #18292
Related · high · value 0.500
QUERY · ISSUE

zephyr: Support for USER_C_MODULES

openby jonnoropened 2025-08-10updated 2025-09-20
enhancementport-zephyr

Description

Support including user modules like on other ports.
Should be via the USER_C_MODULES variable, in the same way as on other cmake-based ports.

Code Size

No impact

Implementation

I intend to implement this feature and would submit a Pull Request if desirable

Code of Conduct

Yes, I agree

CANDIDATE · ISSUE

Can't build with USER_C_MODULES on mimxrt

closedby sfe-SparkFroopened 2025-10-17updated 2026-01-31
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

Keyboard

j / / n
next pair
k / / p
previous pair
1 / / h
show query pane
2 / / l
show candidate pane
c
copy suggested comment
r
toggle reasoning
g i
go to index
?
show this help
esc
close overlays

press ? or esc to close

copied