← index #8041PR #14127
Related · high · value 2.719
QUERY · ISSUE

ESP32: "user C modules" should be able to add components to the build

openby aguavivaopened 2021-11-28updated 2023-12-18
port-esp32

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

CANDIDATE · PULL REQUEST

Support board level configurations

closedby gentijoopened 2024-03-19updated 2026-02-24
port-esp32

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.

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