Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for fatal error: driver/gpio.h: No such file or directory #166

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Sidicer
Copy link

@Sidicer Sidicer commented Dec 15, 2024

Resolves an issue when using the library with espidf framework.

components/ssd1306/src/ssd1306_hal/esp/platform.c:33:10: fatal error: driver/gpio.h: No such file or directory
   33 | #include "driver/gpio.h"
      |          ^~~~~~~~~~~~~~~
compilation terminated.
Compiling .pio/build/esp32dev/components/ssd1306/src/ssd1306_hal/template/platform.c.o
*** [.pio/build/esp32dev/components/ssd1306/src/ssd1306_hal/esp/platform.c.o] Error 1

It is now needed to specifically require the driver in components/ssd1306/CMakeLists.txt:

     idf_component_register(SRCS ${SOURCE_FILES}
-                           INCLUDE_DIRS "src")
+                           INCLUDE_DIRS "src"
+                           REQUIRES    driver)

Tested on

PLATFORM: Espressif 32 (6.9.0) > Espressif ESP32 Dev Module
HARDWARE: ESP32 240MHz, 320KB RAM, 4MB Flash
PACKAGES: 
 - framework-espidf @ 3.50301.0 (5.3.1) 
 - tool-cmake @ 3.16.4 
 - tool-esptoolpy @ 1.40501.0 (4.5.1) 
 - tool-ninja @ 1.7.1 
 - tool-riscv32-esp-elf-gdb @ 12.1.0+20221002 
 - tool-xtensa-esp-elf-gdb @ 12.1.0+20221002 
 - toolchain-esp32ulp @ 1.23800.240113 (2.38.0) 
 - toolchain-xtensa-esp-elf @ 13.2.0+20240530

PLATFORM: Espressif 32 (6.9.0)
framework-espidf (5.3.1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant