ESP32: "user C modules" should be able to add components to the build
Right now the list of components is hard coded in
https://github.com/micropython/micropython/blob/97a7cc243b028833bdcb8ce0bc19b2bce7545851/ports/esp32/main/CMakeLists.txt#L96
USer C modules should be able to add new components without having to modify the above file
My current use case is a user module that adds support for the esp32-camera
Fixing this will help others extend micropython with minimal modifications in the core files
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