zephyr: Support for USER_C_MODULES
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
esp32: Integrate with the rp2 port mechanism to support user modules in cmake based builds.
This work started as new work to try and restore the User Module support to the ESP32 port. However now this work builds upon the rp2 port work which is working to upstreamed from their repository back into micropython master in pull request #6960.
Some of the work done here in py/usermod.cmake has been folded into #6960 so the changes in the most recent rebase are much simpler.
I've updated this initial message to better reflect the latest status of this pull request.
Using the latest changes you can build the firmware with user modules as follows:
$ cd ports/esp32
$ make USER_C_MODULES=/path/to/module/micropython.cmake