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
Support board level configurations
This PR allows ESP32 board level configuration at both the idf_component.yml file and the USER_C_MODULES.
The idf_component.yml control occurs by looking for a main directory that also incorporates the MICROPY_BOARD variable as part of the name main_{arch} (i.e. main_esp32) , if a folder does not exist then it falls back to previous behaviour.
For the USER_C_MODULES, the usermod.cmake will look in the USER_C_MODULES directory for ${MICROPY_BOARD}_micropython.cmake, if that does not exist then it will look for a micropython.cmake after that it will fall back to the previous behavior to do a directory scan.
This will allow boards to specify which USER_C_MODULES will be incorporated and allow unused modules to exist without adding extra code to the build.