Skip to content

esp-idf 5.0: periph_module_enable() not found (AIV-467) #189

Description

@pius-braun

Thank you all for this great repository.

I just installed ESP-IDF 5.0 and then compiled the latest version of "examples/human_face_detection/terminal",
prompting a compiler error "implicit declaration of function".
With esp-idf 4.3, it compiled successfully.

I'm on WIndows 10, my target is the AI-Thinker esp32-cam.
This is a snippet of the error messages.

...
C:/ESP32/esp-who/components/esp32-camera/target/esp32/ll_cam.c:281:5: error: implicit declaration of function 'periph_module_enable'; did you mean 'esp_intr_enable'? [-Werror=implicit-function-declaration]
     periph_module_enable(PERIPH_I2S0_MODULE);
     ^~~~~~~~~~~~~~~~~~~~
...
C:/ESP32/esp-who/components/esp32-camera/target/esp32/ll_cam.c:281:26: error: 'PERIPH_I2S0_MODULE' undeclared (first use in this function); did you mean 'PERIPHS_IO_MUX_MTDO_U'?
     periph_module_enable(PERIPH_I2S0_MODULE);
                          ^~~~~~~~~~~~~~~~~~
...
C:/ESP32/esp-who/components/bus/i2s_lcd_esp32_driver.c:438:9: error: implicit declaration of function 'periph_module_enable'; did you mean 'i2s_adc_enable'? [-Werror=implicit-function-declaration]
         periph_module_enable(PERIPH_I2S0_MODULE);
         ^~~~~~~~~~~~~~~~~~~~

My workaround:
I added to C:\ESP32\esp-who\components\esp32-camera\target\esp32\ll_cam.c

#include "esp_private/periph_ctrl.h"
#include "soc/periph_defs.h"

and to C:\ESP32\esp-who\components\bus\i2s_lcd_esp32_driver.c

#include "esp_private/periph_ctrl.h"

It does look wrong, to include from an "esp_private" directory. Any other fix?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions