-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
ESP-IDF gives the error "GPIO was not declared in this scope" when compiling with ESP-IDF v5.1 #2628
Comments
Thanks for raising this. The Espressif software team like to change things that are not broken! The fix is in the link you provided. I will try this next week. |
Adding the include to the relevant processor header files does not break the library for the Arduino environment so I will add it in the next update. For example for the ESP32 add the following line here:
|
Hello, I have added the line as you said in the ESP32_S3.h file (my board is esp32-s3) and now the other errors are disappeared but this error came up:
|
I'm devrim-oguz, this is my business account. Here is an update of the errors when I switched to v5.1-rc2:
It says to change the gpio_get_level commands to the ones with ll, so I did. But now it gives this error, and I don't know how to convert the pin numbers into (gpio_dev_t *)
|
Update: I managed to find what the gpio_ll_get_level expects. It expected a device pointer. So I changed the lines in ESP32_S3.c like this:
and this solved the issue. However, I didn't create a pull request for this since this time the linker gives an error about something using the filesystem inside TFT_eSPI. I couldn't decide if this issue is actually caused by your library or by the arduino-esp32 component itself. Still, here is the linker error if you would like to investigate further into this:
From what I understand, it complains that it can't find fs::FileImpl class for some reason. However, this error disappears when I don't include the library and the project build succeeds. |
Another update: It gives the same error when I call SPIFFS.begin(); without including this library. So, I think the error comes from the Arduino core for the esp32. These two changes should fix the library but I can't test it now. So I am not creating a pull request, but maybe you might add these lines in the future. |
Doing this the error dissapeares, but the display of my Lilgo T-Display is not working. |
SPIFFS is removed from IDF 5.x. It has been deprecated for some years, and is now (finally/actually) removed. You should switch to LittleFS, but there is no migration path available (AFAICS). |
Not me, but the library needs to switch. It is using the SPIFFS internally. So, it wouldn’t compile for IDF v5.1 |
I can confirm that I got this library working with the LilyGO T-display-S3 screen on ESP-IDF v5.1, ran into much of the same issues as the OP here but not the SPIFFS issues, thank god. |
I can confirm that the fix @alba-ado added works with the LilyGO T-display-S3 using the Arduino 2 IDE. Excellent work, this should be merged to the library. |
Same problem here. Inserted the line with #include "hal/gpio_ll.h" and errors disappeared. But programs are not working (thou at least display lights up). |
Arduino IDE 2.3.3 Had this very same bug about GPIO Program Compile and upload fine Revert back to esp32 by espressif 2.0.17 and before made compiling possible , but had trouble uploading Compile and upload ok, and LCD works with |
Hello, thank you for creating this library.
I've been using this library with ESP-IDF v4.4 in a project for a while. But when I upgrade to the ESP-IDF version v5.1, the compilation gives the following errors:
It seems like, in the new ESP-IDF, the GPIO construct is not readily available to all users like it used to be. And there is a related issue on the idf page: espressif/esp-idf#9184
From what I understand from that issue, the GPIO was never supposed to be available to users. Instead, it is a low-level library. I guess it is used in the library for fast pin updates by using the pin registers directly. But with the new version, it causes an error. I don't know what to do, so I'm writing an issue here. Maybe we can also collaborate with the idf developers to resolve this problem. I'm available if you need to ask anything more. Thanks for your help.
The text was updated successfully, but these errors were encountered: